Ignore:
Timestamp:
Sep 26, 2016, 7:46:19 PM (9 years ago)
Author:
[email protected]
Message:

Unreviewed, rolling out r206405.
https://bugs.webkit.org/show_bug.cgi?id=162588

This change caused LayoutTest crashes. (Requested by
ryanhaddad on #webkit).

Reverted changeset:

"Add some needed CatchScopes in code that should not throw."
https://bugs.webkit.org/show_bug.cgi?id=162584
http://trac.webkit.org/changeset/206405

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/JSObjectRef.cpp

    r206405 r206408  
    310310    }
    311311    ExecState* exec = toJS(ctx);
    312     VM& vm = exec->vm();
    313     JSLockHolder locker(vm);
    314     auto scope = DECLARE_CATCH_SCOPE(vm);
     312    JSLockHolder locker(exec);
    315313
    316314    JSObject* jsObject = toJS(object);
     
    318316    JSValue jsValue = toJS(exec, value);
    319317
    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     }
     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
    330326    handleExceptionIfNeeded(exec, exception);
    331327}
Note: See TracChangeset for help on using the changeset viewer.