Changeset 206459 in webkit for trunk/Source/JavaScriptCore/API/JSObjectRef.cpp
- Timestamp:
- Sep 27, 2016, 1:32:13 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSObjectRef.cpp
r206408 r206459 310 310 } 311 311 ExecState* exec = toJS(ctx); 312 JSLockHolder locker(exec); 312 VM& vm = exec->vm(); 313 JSLockHolder locker(vm); 314 auto scope = DECLARE_CATCH_SCOPE(vm); 313 315 314 316 JSObject* jsObject = toJS(object); … … 316 318 JSValue jsValue = toJS(exec, value); 317 319 318 if (attributes && !jsObject->hasProperty(exec, name)) { 319 PropertyDescriptor desc(jsValue, attributes); 320 jsObject->methodTable()->defineOwnProperty(jsObject, exec, name, desc, false); 321 } else { 322 PutPropertySlot slot(jsObject); 323 jsObject->methodTable()->put(jsObject, exec, name, jsValue, slot); 324 } 325 320 bool doesNotHaveProperty = attributes && !jsObject->hasProperty(exec, name); 321 if (LIKELY(!scope.exception())) { 322 if (doesNotHaveProperty) { 323 PropertyDescriptor desc(jsValue, attributes); 324 jsObject->methodTable()->defineOwnProperty(jsObject, exec, name, desc, false); 325 } else { 326 PutPropertySlot slot(jsObject); 327 jsObject->methodTable()->put(jsObject, exec, name, jsValue, slot); 328 } 329 } 326 330 handleExceptionIfNeeded(exec, exception); 327 331 }
Note:
See TracChangeset
for help on using the changeset viewer.