WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 201910
188789
Fail to throw TypeError when set a getter-only property in Array.prototype.pop
https://bugs.webkit.org/show_bug.cgi?id=188789
Summary
Fail to throw TypeError when set a getter-only property in Array.prototype.pop
sunlili
Reported
2018-08-21 05:39:28 PDT
Executing following code : --------------------------------------------- function foo() { var obj = {}; Object.prototype.push = Array.prototype.push; Object.prototype.pop = Array.prototype.pop; var x; Object.defineProperty(obj, "length", {get: function() {x = true; return 5;}}); //call set length while pop,but setter was undefined x = false; try { var len = obj.pop(); } catch (e) { print('caught exception:'); print(e); } print(x); } foo(); print("BT_FLAG"); ----------------------------------------------------- Output should be : caught exception: TypeError: setting getter-only property "length" true BT_FLAG However, output of JavaScriptCore: true BT_FLAG BT_GROUP 2018/8/21
Attachments
Add attachment
proposed patch, testcase, etc.
Alexey Shvayka
Comment 1
2020-06-07 06:38:22 PDT
r250275
fixed putLength() with unsuccessful [[Set]], including Array.prototype.pop case. test262 coverage:
https://github.com/tc39/test262/pull/2463
. *** This bug has been marked as a duplicate of
bug 201910
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug