Bug 156291

Summary: [IDL] Extend support for [EnabledAtRuntime] attributes / operations to all global objects, not just Window
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: BindingsAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, cgarcia, commit-queue, esprehn+autocc, ggaren, kondapallykalyan, rniwa, sam, youennf
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=156272
Bug Depends on:    
Bug Blocks: 156113    
Attachments:
Description Flags
Patch none

Description Chris Dumez 2016-04-06 09:24:58 PDT
Extend support for [EnabledAtRuntime] attributes / operations to all global objects, not just Window.
Comment 1 Chris Dumez 2016-04-06 09:42:45 PDT
Created attachment 275775 [details]
Patch
Comment 2 WebKit Commit Bot 2016-04-06 09:44:51 PDT
Attachment 275775 [details] did not pass style-queue:


ERROR: Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp:164:  One line control clauses should not use braces.  [whitespace/braces] [4]
ERROR: Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp:180:  One line control clauses should not use braces.  [whitespace/braces] [4]
ERROR: Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp:215:  One line control clauses should not use braces.  [whitespace/braces] [4]
ERROR: Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp:233:  One line control clauses should not use braces.  [whitespace/braces] [4]
ERROR: Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp:341:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebCore/bindings/scripts/test/ObjC/DOMTestGlobalObject.mm:30:  Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
Total errors found: 6 in 11 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Chris Dumez 2016-04-06 09:45:26 PDT
Diff on generated JSWorkerGlobalScope.cpp:
http://pastebin.com/4esG76hq
Comment 4 Alex Christensen 2016-04-06 09:46:40 PDT
Comment on attachment 275775 [details]
Patch

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

> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:381
> +    return $interface->name eq "DOMWindow" || $codeGenerator->InheritsInterface($interface, "WorkerGlobalScope") || $interface->name eq "TestGlobalObject";

Great! I was thinking last night, "there's no test for this".  Now I can sleep better.
Comment 5 Chris Dumez 2016-04-06 09:47:20 PDT
(In reply to comment #4)
> Comment on attachment 275775 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=275775&action=review
> 
> > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:381
> > +    return $interface->name eq "DOMWindow" || $codeGenerator->InheritsInterface($interface, "WorkerGlobalScope") || $interface->name eq "TestGlobalObject";
> 
> Great! I was thinking last night, "there's no test for this".  Now I can
> sleep better.

Yeah, I was tired last night :P
Comment 6 Chris Dumez 2016-04-06 10:33:58 PDT
Comment on attachment 275775 [details]
Patch

Clearing flags on attachment: 275775

Committed r199103: <http://trac.webkit.org/changeset/199103>
Comment 7 Chris Dumez 2016-04-06 10:34:03 PDT
All reviewed patches have been landed.  Closing bug.