RESOLVED FIXED 159604
[JSC] Array.from() and Array.of() try to build objects even if "this" is not a constructor
https://bugs.webkit.org/show_bug.cgi?id=159604
Summary [JSC] Array.from() and Array.of() try to build objects even if "this" is not ...
Benjamin Poulain
Reported 2016-07-09 12:19:47 PDT
[JSC] Array.from() and Array.of() try to build objects even if "this" is not a constructor
Attachments
Patch (10.34 KB, patch)
2016-07-09 12:21 PDT, Benjamin Poulain
no flags
Patch for landing (10.34 KB, patch)
2016-07-11 17:29 PDT, Benjamin Poulain
no flags
Benjamin Poulain
Comment 1 2016-07-09 12:21:20 PDT
Yusuke Suzuki
Comment 2 2016-07-09 23:42:47 PDT
Comment on attachment 283265 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=283265&action=review r=me > Source/JavaScriptCore/ChangeLog:5 > + Nice. And PromiseConstructor.js's FIXME should be also fixed in the other patch. > Source/JavaScriptCore/builtins/ArrayConstructor.js:64 > + var result = @isConstructor(thisObj) ? @Object(new thisObj()) : []; Is this @Object() necessary? I think [[Construct]] is guaranteed that it always returns an object. > Source/JavaScriptCore/builtins/ArrayConstructor.js:90 > + var result = @isConstructor(thisObj) ? @Object(new thisObj(arrayLikeLength)) : new @Array(arrayLikeLength); Ditto.
Benjamin Poulain
Comment 3 2016-07-11 17:29:24 PDT
Created attachment 283369 [details] Patch for landing
WebKit Commit Bot
Comment 4 2016-07-11 17:58:19 PDT
Comment on attachment 283369 [details] Patch for landing Clearing flags on attachment: 283369 Committed r203101: <http://trac.webkit.org/changeset/203101>
WebKit Commit Bot
Comment 5 2016-07-11 17:58:23 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.