WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
170650
test262: test262/test/annexB/language/expressions/object/__proto__-fn-name.js
https://bugs.webkit.org/show_bug.cgi?id=170650
Summary
test262: test262/test/annexB/language/expressions/object/__proto__-fn-name.js
Joseph Pecoraro
Reported
2017-04-08 19:47:11 PDT
Summary: There is special handling of __proto__ in object initializers. Spec:
https://tc39.github.io/ecma262/#sec-__proto__-property-names-in-object-initializers
Test: test262/test/annexB/language/expressions/object/__proto__-fn-name.js // Unlike other properties, the function assigned to __proto__ doesn't infer the name __proto__. assert( { foo: function(){} }.foo.name === "foo" ) assert( { __proto__: function(){} }.__proto__.name === "" )
Attachments
[PATCH] Proposed Fix
(11.86 KB, patch)
2017-04-08 19:52 PDT
,
Joseph Pecoraro
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews113 for mac-elcapitan
(379.00 KB, application/zip)
2017-04-08 20:46 PDT
,
Build Bot
no flags
Details
[PATCH] Proposed Fix
(11.87 KB, patch)
2017-04-08 23:39 PDT
,
Joseph Pecoraro
saam
: review+
saam
: commit-queue-
Details
Formatted Diff
Diff
[PATCH] For Landing
(11.88 KB, patch)
2017-04-09 12:41 PDT
,
Joseph Pecoraro
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Joseph Pecoraro
Comment 1
2017-04-08 19:52:24 PDT
Created
attachment 306597
[details]
[PATCH] Proposed Fix
Joseph Pecoraro
Comment 2
2017-04-08 19:55:38 PDT
Comment on
attachment 306597
[details]
[PATCH] Proposed Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=306597&action=review
> Source/JavaScriptCore/parser/Parser.h:110 > +enum class InferName { > + Allowed, > + Disallowed, > +};
I really couldn't come up with a good name for this, but since its static at almost every call site (except one) I do think an enum is better than a bool. Naming suggestions welcome!
Build Bot
Comment 3
2017-04-08 20:46:54 PDT
Comment on
attachment 306597
[details]
[PATCH] Proposed Fix
Attachment 306597
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/3503795
Number of test failures exceeded the failure limit.
Build Bot
Comment 4
2017-04-08 20:46:55 PDT
Created
attachment 306600
[details]
Archive of layout-test-results from ews113 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews113 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Joseph Pecoraro
Comment 5
2017-04-08 23:39:40 PDT
Created
attachment 306603
[details]
[PATCH] Proposed Fix
Saam Barati
Comment 6
2017-04-09 08:07:50 PDT
Comment on
attachment 306603
[details]
[PATCH] Proposed Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=306603&action=review
> JSTests/stress/inferred-names.js:125 > +// __proto__ name is not inferred in Object Literals if not computed.
This disagrees with what your test does below.
> JSTests/stress/inferred-names.js:135 > +assert( ({__proto__(){}}).__proto__.name === "__proto__" );
This isn't computed, but still has name "__proto__". Is that expected?
Joseph Pecoraro
Comment 7
2017-04-09 12:35:34 PDT
(In reply to Saam Barati from
comment #6
)
> Comment on
attachment 306603
[details]
> [PATCH] Proposed Fix > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=306603&action=review
> > > JSTests/stress/inferred-names.js:125 > > +// __proto__ name is not inferred in Object Literals if not computed. > > This disagrees with what your test does below. > > > JSTests/stress/inferred-names.js:135 > > +assert( ({__proto__(){}}).__proto__.name === "__proto__" ); > > This isn't computed, but still has name "__proto__". Is that expected?
This is a named function, nothing would or is being inferred in this case.
Joseph Pecoraro
Comment 8
2017-04-09 12:36:45 PDT
Comment on
attachment 306603
[details]
[PATCH] Proposed Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=306603&action=review
>>> JSTests/stress/inferred-names.js:125 >>> +// __proto__ name is not inferred in Object Literals if not computed. >> >> This disagrees with what your test does below. > > This is a named function, nothing would or is being inferred in this case.
I'll drop this part of the comment and just point to the spec.
Joseph Pecoraro
Comment 9
2017-04-09 12:41:09 PDT
Created
attachment 306629
[details]
[PATCH] For Landing
WebKit Commit Bot
Comment 10
2017-04-09 14:39:06 PDT
Comment on
attachment 306629
[details]
[PATCH] For Landing Clearing flags on attachment: 306629 Committed
r215165
: <
http://trac.webkit.org/changeset/215165
>
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