Bug 142853

Summary: Function.prototype.toString should not decompile the AST
Product: WebKit Reporter: Geoffrey Garen <ggaren>
Component: New BugsAssignee: Geoffrey Garen <ggaren>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, ddkilzer, msaboff, rniwa
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Archive of layout-test-results from ews100 for mac-mavericks
none
Patch sam: review+

Geoffrey Garen
Reported 2015-03-18 17:41:31 PDT
Function.prototype.toString should not decompile the AST
Attachments
Patch (186.30 KB, patch)
2015-03-19 19:18 PDT, Geoffrey Garen
no flags
Patch (186.87 KB, patch)
2015-03-19 21:17 PDT, Geoffrey Garen
no flags
Archive of layout-test-results from ews100 for mac-mavericks (533.56 KB, application/zip)
2015-03-19 22:29 PDT, Build Bot
no flags
Patch (191.54 KB, patch)
2015-03-20 10:53 PDT, Geoffrey Garen
sam: review+
Geoffrey Garen
Comment 1 2015-03-19 19:18:03 PDT
Geoffrey Garen
Comment 2 2015-03-19 21:17:11 PDT
Build Bot
Comment 3 2015-03-19 22:29:01 PDT
Comment on attachment 249081 [details] Patch Attachment 249081 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/5132974664187904 New failing tests: userscripts/window-onerror-for-isolated-world-1.html userscripts/window-onerror-for-isolated-world-2.html
Build Bot
Comment 4 2015-03-19 22:29:03 PDT
Created attachment 249086 [details] Archive of layout-test-results from ews100 for mac-mavericks The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-mavericks Platform: Mac OS X 10.9.5
Geoffrey Garen
Comment 5 2015-03-20 10:53:50 PDT
Geoffrey Garen
Comment 6 2015-03-20 13:12:46 PDT
Darin Adler
Comment 7 2015-03-20 14:13:46 PDT
Comment on attachment 249121 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=249121&action=review > Source/JavaScriptCore/runtime/FunctionConstructor.cpp:102 > + builder.append("("); append('(') > Source/JavaScriptCore/runtime/FunctionConstructor.cpp:105 > + builder.append(", "); appendLiteral(", ")
Joseph Pecoraro
Comment 8 2015-03-23 16:14:53 PDT
Comment on attachment 249121 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=249121&action=review > LayoutTests/js/class-syntax-default-constructor-expected.txt:14 > -FAIL A.prototype.constructor should be function B() { super(...arguments); }. Was function A() { }. > +FAIL A.prototype.constructor should be function () { super(...arguments); }. Was function () { }. Looks like this was Failing before, and needed to be updated. > LayoutTests/js/object-literal-computed-methods-expected.txt:11 > +FAIL o.foo.toString() should be function () { return 10; }. Was () { return 10; }. These are regressions. > LayoutTests/js/object-literal-methods-expected.txt:11 > +FAIL o.foo.toString() should be function foo() { return 10; }. Was () { return 10; }. Ditto.
Joseph Pecoraro
Comment 9 2015-03-23 16:16:17 PDT
Comment on attachment 249121 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=249121&action=review > LayoutTests/ChangeLog:43 > + * js/object-literal-methods-expected.txt: These tests fail because object > + literal methods do not register their function names appropriately. This > + was a pre-existing failure that is now more explicit. Oh!
Geoffrey Garen
Comment 10 2015-03-26 16:41:56 PDT
Andreas Kling
Comment 11 2015-03-26 17:27:43 PDT
Comment on attachment 249121 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=249121&action=review > Source/JavaScriptCore/ChangeLog:13 > + (1) It requires us to keep pieces of the AST live forever. This is an > + awkward design and a waste of memory. This patch does not fix that issue though, right?
Geoffrey Garen
Comment 12 2015-03-27 10:32:25 PDT
> > Source/JavaScriptCore/ChangeLog:13 > > + (1) It requires us to keep pieces of the AST live forever. This is an > > + awkward design and a waste of memory. > > This patch does not fix that issue though, right? No. We need one more patch to change how we re-parse functions, and then we'll be able to remove the refcounted parts of the AST.
Michael Saboff
Comment 13 2015-03-30 18:48:35 PDT
This change fixed rdar://problem/18828133.
Note You need to log in before you can comment on or make changes to this bug.