RESOLVED FIXED 155917
Date.prototype.toLocaleDateString uses overridable Object.create
https://bugs.webkit.org/show_bug.cgi?id=155917
Summary Date.prototype.toLocaleDateString uses overridable Object.create
Joseph Pecoraro
Reported 2016-03-25 20:44:41 PDT
* SUMMARY Date.prototype.toLocaleDateString uses overridable Object.create. * TEST <script> Object.create = function() { console.log("HERE"); } (new Date).toLocaleString() </script> * RESULTS "HERE" is logged and a TypeError is thrown. * NOTES The builtin implementation has: options = @Object.create(options) Seems this should be: options = @Object.@create(options); Otherwise it could be using a user overridden version of Object.create. Perhaps here we can just use a regular object literal here.
Attachments
[PATCH] Proposed Fix (5.89 KB, patch)
2016-03-25 21:25 PDT, Joseph Pecoraro
mark.lam: review+
joepeck: commit-queue-
[PATCH] For Landing (5.88 KB, patch)
2016-03-25 21:31 PDT, Joseph Pecoraro
no flags
Joseph Pecoraro
Comment 1 2016-03-25 21:25:04 PDT
Created attachment 274973 [details] [PATCH] Proposed Fix
Mark Lam
Comment 2 2016-03-25 21:28:38 PDT
Comment on attachment 274973 [details] [PATCH] Proposed Fix r=me
Joseph Pecoraro
Comment 3 2016-03-25 21:30:18 PDT
Comment on attachment 274973 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=274973&action=review > LayoutTests/js/script-tests/regress-155917.js:2 > +"Regression test for https://webkit.org/b/140579. This test should run without throwing an exception." Typo! This should be 155917
Joseph Pecoraro
Comment 4 2016-03-25 21:31:27 PDT
Created attachment 274974 [details] [PATCH] For Landing
WebKit Commit Bot
Comment 5 2016-03-25 22:31:24 PDT
Comment on attachment 274974 [details] [PATCH] For Landing Clearing flags on attachment: 274974 Committed r198711: <http://trac.webkit.org/changeset/198711>
WebKit Commit Bot
Comment 6 2016-03-25 22:31:27 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.