Changeset 248880 in webkit
- Timestamp:
- Aug 19, 2019 5:56:08 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r248878 r248880 1 2019-08-19 Alexey Shvayka <shvaikalesh@gmail.com> 2 3 Proxy constructor should throw if handler is revoked Proxy 4 https://bugs.webkit.org/show_bug.cgi?id=198755 5 6 Reviewed by Saam Barati. 7 8 * stress/proxy-revoke.js: Adjust error message. 9 * test262/expectations.yaml: Mark 2 test cases as passing. 10 1 11 2019-08-19 Yusuke Suzuki <ysuzuki@apple.com> 2 12 -
trunk/JSTests/stress/proxy-revoke.js
r201618 r248880 96 96 } catch(e) { 97 97 threw = true; 98 assert(e.toString() === "TypeError: If a Proxy's handler is another Proxy object, the other Proxy should not have been revoked");98 assert(e.toString() === "TypeError: A Proxy's 'target' shouldn't be a revoked Proxy"); 99 99 } 100 100 assert(threw); -
trunk/JSTests/test262/expectations.yaml
r248876 r248880 1322 1322 default: 'Test262Error: Expected a TypeError but got a TypeError' 1323 1323 strict mode: 'Test262Error: Expected a TypeError but got a TypeError' 1324 test/built-ins/Proxy/create-handler-is-revoked-proxy.js:1325 default: 'Test262Error: Expected a TypeError to be thrown but no exception was thrown at all'1326 strict mode: 'Test262Error: Expected a TypeError to be thrown but no exception was thrown at all'1327 1324 test/built-ins/RegExp/named-groups/groups-object-subclass-sans.js: 1328 1325 default: 'Test262Error: Expected SameValue(«b», «$<a>») to be true' -
trunk/Source/JavaScriptCore/ChangeLog
r248878 r248880 1 2019-08-19 Alexey Shvayka <shvaikalesh@gmail.com> 2 3 Proxy constructor should throw if handler is revoked Proxy 4 https://bugs.webkit.org/show_bug.cgi?id=198755 5 6 Reviewed by Saam Barati. 7 8 Reword error message and check if handler is revoked Proxy. 9 (step 4 of https://tc39.es/ecma262/#sec-proxycreate) 10 11 * runtime/ProxyObject.cpp: 12 (JSC::ProxyObject::finishCreation): Add isRevoked check. 13 1 14 2019-08-19 Yusuke Suzuki <ysuzuki@apple.com> 2 15 -
trunk/Source/JavaScriptCore/runtime/ProxyObject.cpp
r248796 r248880 92 92 } 93 93 if (ProxyObject* targetAsProxy = jsDynamicCast<ProxyObject*>(vm, target)) { 94 if (targetAsProxy-> handler().isNull()) {95 throwTypeError(exec, scope, " If a Proxy's handler is another Proxy object, the other Proxy should not have been revoked"_s);94 if (targetAsProxy->isRevoked()) { 95 throwTypeError(exec, scope, "A Proxy's 'target' shouldn't be a revoked Proxy"_s); 96 96 return; 97 97 } … … 100 100 throwTypeError(exec, scope, "A Proxy's 'handler' should be an Object"_s); 101 101 return; 102 } 103 if (ProxyObject* handlerAsProxy = jsDynamicCast<ProxyObject*>(vm, handler)) { 104 if (handlerAsProxy->isRevoked()) { 105 throwTypeError(exec, scope, "A Proxy's 'handler' shouldn't be a revoked Proxy"_s); 106 return; 107 } 102 108 } 103 109
Note: See TracChangeset
for help on using the changeset viewer.