Bug 155203 - FunctionExecutable::ecmaName() should not be based on inferredName().
Summary: FunctionExecutable::ecmaName() should not be based on inferredName().
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-03-08 15:36 PST by Mark Lam
Modified: 2016-03-09 11:37 PST (History)
10 users (show)

See Also:


Attachments
proposed patch. (12.33 KB, patch)
2016-03-08 22:37 PST, Mark Lam
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews103 for mac-yosemite (762.94 KB, application/zip)
2016-03-08 23:31 PST, Build Bot
no flags Details
Archive of layout-test-results from ews106 for mac-yosemite-wk2 (807.10 KB, application/zip)
2016-03-08 23:36 PST, Build Bot
no flags Details
Archive of layout-test-results from ews112 for mac-yosemite (1.77 MB, application/zip)
2016-03-09 00:25 PST, Build Bot
no flags Details
proposed patch: with rebased test result. (13.38 KB, patch)
2016-03-09 10:18 PST, Mark Lam
msaboff: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2016-03-08 15:36:33 PST
Currently, we're approximating ecmaName()'s behavior using the debugging inferredName of executables.  Will fix.
Comment 1 Mark Lam 2016-03-08 22:19:37 PST
The
Comment 2 Radar WebKit Bug Importer 2016-03-08 22:19:54 PST
<rdar://problem/25053826>
Comment 3 Mark Lam 2016-03-08 22:24:26 PST
The ES6 rules for how a function name should be inferred closely matches JSC's implementation with one exception:
    var o = {}
    o.foo = function() {}

JSC's inferredName for o.foo would be "foo".
ES6 specifies that o.foo.name is "".

The fix is to add a distinct FunctionExecutable::ecmaName() which applies the ES6 rules for inferring the initial value of Function.name.
Comment 4 Mark Lam 2016-03-08 22:37:29 PST
Created attachment 273394 [details]
proposed patch.
Comment 5 Build Bot 2016-03-08 23:31:10 PST
Comment on attachment 273394 [details]
proposed patch.

Attachment 273394 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/945691

New failing tests:
http/tests/media/media-source/mediasource-sourcebuffer-mode.html
Comment 6 Build Bot 2016-03-08 23:31:13 PST
Created attachment 273401 [details]
Archive of layout-test-results from ews103 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews103  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 7 Build Bot 2016-03-08 23:36:05 PST
Comment on attachment 273394 [details]
proposed patch.

Attachment 273394 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/945706

New failing tests:
http/tests/media/media-source/mediasource-sourcebuffer-mode.html
Comment 8 Build Bot 2016-03-08 23:36:08 PST
Created attachment 273403 [details]
Archive of layout-test-results from ews106 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 9 Build Bot 2016-03-09 00:25:24 PST
Comment on attachment 273394 [details]
proposed patch.

Attachment 273394 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/945783

New failing tests:
http/tests/media/media-source/mediasource-sourcebuffer-mode.html
Comment 10 Build Bot 2016-03-09 00:25:29 PST
Created attachment 273405 [details]
Archive of layout-test-results from ews112 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews112  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 11 Mark Lam 2016-03-09 09:18:20 PST
Comment on attachment 273394 [details]
proposed patch.

Taking off review while I investigate test failures.
Comment 12 Mark Lam 2016-03-09 10:18:43 PST
Created attachment 273441 [details]
proposed patch: with rebased test result.
Comment 13 WebKit Commit Bot 2016-03-09 10:21:03 PST
Attachment 273441 [details] did not pass style-queue:


ERROR: LayoutTests/ChangeLog:10:  Need whitespace between colon and description  [changelog/filechangedescriptionwhitespace] [5]
Total errors found: 1 in 11 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 14 Michael Saboff 2016-03-09 11:15:55 PST
Comment on attachment 273441 [details]
proposed patch: with rebased test result.

r=me.  Add a comment in the place where you don't call setEcmaName() to comply with the standard.
Comment 15 Mark Lam 2016-03-09 11:37:09 PST
Thanks for the review.  Added requested comment and landed in r197867: <http://trac.webkit.org/197867>.