Bug 160637 - [Web IDL] Add support for [Unscopable] extended attribute
Summary: [Web IDL] Add support for [Unscopable] extended attribute
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Bindings (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL: http://heycam.github.io/webidl/#Unsco...
Keywords: WebExposed
Depends on:
Blocks:
 
Reported: 2016-08-06 15:10 PDT by Chris Dumez
Modified: 2016-08-06 19:30 PDT (History)
11 users (show)

See Also:


Attachments
Patch (9.78 KB, patch)
2016-08-06 15:28 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (9.75 KB, patch)
2016-08-06 19:00 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2016-08-06 15:10:56 PDT
Add support for [Unscopable] extended attribute:
- http://heycam.github.io/webidl/#Unscopable
Comment 1 Chris Dumez 2016-08-06 15:28:38 PDT
Created attachment 285501 [details]
Patch
Comment 2 Darin Adler 2016-08-06 18:36:15 PDT
Comment on attachment 285501 [details]
Patch

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

> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:2186
> +    push(@implContent, "    JSObject* unscopables = constructEmptyObject(globalObject()->globalExec(), globalObject()->nullPrototypeObjectStructure());\n");

I would use a reference for this. I know we don’t do that in JavaScriptCore itself, but I would like to do that in bindings.

> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:2188
> +        push(@implContent, "    unscopables->putDirect(vm, Identifier::fromString(&vm, \"${unscopable}\"), jsBoolean(true));\n");

Braces are optional in ${unscopable} here and I would have omitted them.

> Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp:1353
> +    JSObject* unscopables = constructEmptyObject(globalObject()->globalExec(), globalObject()->nullPrototypeObjectStructure());

Ditto.
Comment 3 Chris Dumez 2016-08-06 19:00:45 PDT
Created attachment 285514 [details]
Patch
Comment 4 WebKit Commit Bot 2016-08-06 19:30:32 PDT
Comment on attachment 285514 [details]
Patch

Clearing flags on attachment: 285514

Committed r204234: <http://trac.webkit.org/changeset/204234>
Comment 5 WebKit Commit Bot 2016-08-06 19:30:40 PDT
All reviewed patches have been landed.  Closing bug.