Changeset 209023 in webkit


Ignore:
Timestamp:
Nov 28, 2016 2:39:10 PM (7 years ago)
Author:
mark.lam@apple.com
Message:

Fix exception scope verification failures in runtime/Weak* files.
https://bugs.webkit.org/show_bug.cgi?id=165096

Reviewed by Geoffrey Garen.

  • runtime/WeakMapConstructor.cpp:

(JSC::constructWeakMap):

  • runtime/WeakMapPrototype.cpp:

(JSC::protoFuncWeakMapSet):

  • runtime/WeakSetConstructor.cpp:

(JSC::constructWeakSet):

  • runtime/WeakSetPrototype.cpp:

(JSC::protoFuncWeakSetAdd):

Location:
trunk/Source/JavaScriptCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r209022 r209023  
     12016-11-28  Mark Lam  <mark.lam@apple.com>
     2
     3        Fix exception scope verification failures in runtime/Weak* files.
     4        https://bugs.webkit.org/show_bug.cgi?id=165096
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * runtime/WeakMapConstructor.cpp:
     9        (JSC::constructWeakMap):
     10        * runtime/WeakMapPrototype.cpp:
     11        (JSC::protoFuncWeakMapSet):
     12        * runtime/WeakSetConstructor.cpp:
     13        (JSC::constructWeakSet):
     14        * runtime/WeakSetPrototype.cpp:
     15        (JSC::protoFuncWeakSetAdd):
     16
    1172016-11-28  Mark Lam  <mark.lam@apple.com>
    218
  • trunk/Source/JavaScriptCore/runtime/WeakMapConstructor.cpp

    r206386 r209023  
    6666        return JSValue::encode(weakMap);
    6767
    68     JSValue adderFunction = weakMap->JSObject::get(exec, exec->propertyNames().set);
     68    JSValue adderFunction = weakMap->JSObject::get(exec, vm.propertyNames->set);
    6969    RETURN_IF_EXCEPTION(scope, encodedJSValue());
    7070
     
    7474        return JSValue::encode(throwTypeError(exec, scope));
    7575
     76    scope.release();
    7677    forEachInIterable(exec, iterable, [&](VM& vm, ExecState* exec, JSValue nextItem) {
    7778        auto scope = DECLARE_THROW_SCOPE(vm);
     
    9091        arguments.append(key);
    9192        arguments.append(value);
     93        scope.release();
    9294        call(exec, adderFunction, adderFunctionCallType, adderFunctionCallData, weakMap, arguments);
    9395    });
  • trunk/Source/JavaScriptCore/runtime/WeakMapPrototype.cpp

    r205462 r209023  
    106106
    107107    WeakMapData* map = getWeakMapData(callFrame, callFrame->thisValue());
     108    ASSERT(!!scope.exception() == !map);
    108109    if (!map)
    109110        return JSValue::encode(jsUndefined());
  • trunk/Source/JavaScriptCore/runtime/WeakSetConstructor.cpp

    r206386 r209023  
    6666        return JSValue::encode(weakSet);
    6767
    68     JSValue adderFunction = weakSet->JSObject::get(exec, exec->propertyNames().add);
     68    JSValue adderFunction = weakSet->JSObject::get(exec, vm.propertyNames->add);
    6969    RETURN_IF_EXCEPTION(scope, encodedJSValue());
    7070
     
    7474        return JSValue::encode(throwTypeError(exec, scope));
    7575
     76    scope.release();
    7677    forEachInIterable(exec, iterable, [&](VM&, ExecState* exec, JSValue nextValue) {
    7778        MarkedArgumentBuffer arguments;
  • trunk/Source/JavaScriptCore/runtime/WeakSetPrototype.cpp

    r205462 r209023  
    9393
    9494    WeakMapData* map = getWeakMapData(callFrame, callFrame->thisValue());
     95    ASSERT(!!scope.exception() == !map);
    9596    if (!map)
    9697        return JSValue::encode(jsUndefined());
Note: See TracChangeset for help on using the changeset viewer.