Changeset 10084 in webkit for trunk/JavaScriptCore/bindings/NP_jsobject.cpp
- Timestamp:
- Aug 7, 2005, 9:07:46 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/bindings/NP_jsobject.cpp
r9061 r10084 150 150 ExecState *exec = obj->executionContext->interpreter()->globalExec(); 151 151 Interpreter::lock(); 152 Value 152 ValueImp *func = obj->imp->get (exec, identiferFromNPIdentifier(i->value.string)); 153 153 Interpreter::unlock(); 154 154 155 if (func .isNull()) {155 if (func->isNull()) { 156 156 NPN_InitializeVariantAsNull(result); 157 157 return false; 158 158 } 159 else if ( func.type() == UndefinedType) {159 else if (func->isUndefined()) { 160 160 NPN_InitializeVariantAsUndefined(result); 161 161 return false; … … 163 163 else { 164 164 // Call the function object. 165 ObjectImp *funcImp = static_cast<ObjectImp*>(func .imp());166 Object thisObj = Object(const_cast<ObjectImp*>(obj->imp));165 ObjectImp *funcImp = static_cast<ObjectImp*>(func); 166 ObjectImp *thisObj = const_cast<ObjectImp*>(obj->imp); 167 167 List argList = listFromVariantArgs(exec, args, argCount); 168 168 Interpreter::lock(); 169 Value 169 ValueImp *resultV = funcImp->call (exec, thisObj, argList); 170 170 Interpreter::unlock(); 171 171 … … 194 194 195 195 ExecState *exec = obj->executionContext->interpreter()->globalExec(); 196 Object thisObj = Object(const_cast<ObjectImp*>(obj->imp)); 197 Value result; 196 ValueImp *result; 198 197 199 198 Interpreter::lock(); … … 206 205 if (type == Normal) { 207 206 result = completion.value(); 208 if ( result.isNull()) {207 if (!result) { 209 208 result = Undefined(); 210 209 } … … 235 234 236 235 PrivateIdentifier *i = (PrivateIdentifier *)propertyName; 237 if (i->isString) { 238 if (!obj->imp->hasProperty (exec, identiferFromNPIdentifier(i->value.string))) { 239 NPN_InitializeVariantAsNull(variant); 240 return false; 241 } 242 } 243 else { 244 if (!obj->imp->hasProperty (exec, i->value.number)) { 245 NPN_InitializeVariantAsNull(variant); 246 return false; 247 } 248 } 249 250 Interpreter::lock(); 251 Value result; 236 237 Interpreter::lock(); 238 ValueImp *result; 252 239 if (i->isString) { 253 240 result = obj->imp->get (exec, identiferFromNPIdentifier(i->value.string)); … … 258 245 Interpreter::unlock(); 259 246 260 if (result .isNull()) {247 if (result->isNull()) { 261 248 NPN_InitializeVariantAsNull(variant); 262 249 return false; 263 250 } 264 else if (result .type() == UndefinedType) {251 else if (result->isUndefined()) { 265 252 NPN_InitializeVariantAsUndefined(variant); 266 253 return false; … … 293 280 ExecState *exec = obj->executionContext->interpreter()->globalExec(); 294 281 Interpreter::lock(); 295 Value result;296 282 PrivateIdentifier *i = (PrivateIdentifier *)propertyName; 297 283 if (i->isString) { … … 395 381 ExecState *exec = obj->executionContext->interpreter()->globalExec(); 396 382 Interpreter::lock(); 397 Value 398 Interpreter::unlock(); 399 400 if (func .isNull() || func.type() == UndefinedType) {383 ValueImp *func = obj->imp->get (exec, identiferFromNPIdentifier(i->value.string)); 384 Interpreter::unlock(); 385 386 if (func->isUndefined()) { 401 387 return false; 402 388 } … … 418 404 ExecState *exec = obj->executionContext->interpreter()->globalExec(); 419 405 Interpreter::lock(); 420 Object 406 ObjectImp *err = Error::create(exec, GeneralError, message); 421 407 exec->setException (err); 422 408 Interpreter::unlock();
Note:
See TracChangeset
for help on using the changeset viewer.