Bug 215760 - Invalid early error for object literal method named "__proto__"
Summary: Invalid early error for object literal method named "__proto__"
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Trivial
Assignee: Alexey Shvayka
URL:
Keywords: InRadar, WebExposed
Depends on: 145138
Blocks:
  Show dependency treegraph
 
Reported: 2020-08-23 13:54 PDT by Alexey Shvayka
Modified: 2020-08-25 08:59 PDT (History)
8 users (show)

See Also:


Attachments
Patch (36.04 KB, patch)
2020-08-23 18:14 PDT, Alexey Shvayka
no flags Details | Formatted Diff | Diff
Patch (36.01 KB, patch)
2020-08-25 00:30 PDT, Alexey Shvayka
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Shvayka 2020-08-23 13:54:03 PDT
Invalid early error for object literal method named "__proto__"
Comment 1 Alexey Shvayka 2020-08-23 18:14:50 PDT
Created attachment 407084 [details]
Patch
Comment 2 Ross Kirsling 2020-08-24 09:45:10 PDT
Comment on attachment 407084 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=407084&action=review

r=me, this seems like a nice cleanup.

> Source/JavaScriptCore/parser/SyntaxChecker.h:107
> +        ALWAYS_INLINE Property(PropertyNode::Type type, bool isUnderscoreProtoSetter = false)

nit: I'm not certain that a default param value is really better than a default field value here?
Comment 3 Alexey Shvayka 2020-08-25 00:30:30 PDT
Created attachment 407179 [details]
Patch
Comment 4 Alexey Shvayka 2020-08-25 00:31:26 PDT
Comment on attachment 407179 [details]
Patch

(In reply to Ross Kirsling from comment #2)
> r=me, this seems like a nice cleanup.

I appreciate you reviewing this, Ross! The diff is quite tough.

> nit: I'm not certain that a default param value is really better than a
> default field value here?

I've moved the default value to field initializer (TIL `struct` can also do that), and brought back the `type` field.
PropertyNode::Type is the same size as `bool`, yet it's more useful to have (unlike `name`).
Comment 5 EWS 2020-08-25 08:58:45 PDT
Committed r266117: <https://trac.webkit.org/changeset/266117>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 407179 [details].
Comment 6 Radar WebKit Bug Importer 2020-08-25 08:59:17 PDT
<rdar://problem/67740285>