WebKit Bugzilla
Attachment 371809 Details for
Bug 177398
: JSC should throw if proxy set returns falsish in strict mode context
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-177398-20190611053514.patch (text/plain), 1.92 KB, created by
Alexey Shvayka
on 2019-06-10 19:35:15 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alexey Shvayka
Created:
2019-06-10 19:35:15 PDT
Size:
1.92 KB
patch
obsolete
>Index: Source/JavaScriptCore/ChangeLog >=================================================================== >--- Source/JavaScriptCore/ChangeLog (revision 246302) >+++ Source/JavaScriptCore/ChangeLog (working copy) >@@ -1,3 +1,16 @@ >+2019-06-10 Alexey Shvayka <shvaikalesh@gmail.com> >+ >+ JSC should throw if proxy set returns falsish in strict mode context >+ https://bugs.webkit.org/show_bug.cgi?id=177398 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Throw TypeError exception if Proxy's `set` trap returns falsy value. >+ (step 6.c of https://tc39.es/ecma262/#sec-putvalue) >+ >+ * runtime/ProxyObject.cpp: >+ (JSC::ProxyObject::put): Check result of performPut. >+ > 2019-06-10 Basuke Suzuki <Basuke.Suzuki@sony.com> > > [WinCairo] Remove build warning from RemoteInspector. >Index: Source/JavaScriptCore/runtime/ProxyObject.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/ProxyObject.cpp (revision 246067) >+++ Source/JavaScriptCore/runtime/ProxyObject.cpp (working copy) >@@ -478,7 +478,12 @@ bool ProxyObject::put(JSCell* cell, Exec > JSObject* target = jsCast<JSObject*>(thisObject->target()); > return target->methodTable(vm)->put(target, exec, propertyName, value, slot); > }; >- return thisObject->performPut(exec, value, slot.thisValue(), propertyName, performDefaultPut); >+ auto scope = DECLARE_THROW_SCOPE(vm); >+ bool success = thisObject->performPut(exec, value, slot.thisValue(), propertyName, performDefaultPut); >+ RETURN_IF_EXCEPTION(scope, encodedJSValue()); >+ if (!success && slot.isStrictMode()) >+ throwVMTypeError(exec, scope, makeString("Proxy object's 'set' trap returned falsy value for property '", String(propertyName.uid()), "'")); >+ RELEASE_AND_RETURN(scope, success); > } > > bool ProxyObject::putByIndexCommon(ExecState* exec, JSValue thisValue, unsigned propertyName, JSValue putValue, bool shouldThrow)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 177398
:
371809
|
371843
|
371847
|
371864
|
371877
|
371906