WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 118191
77966
Remove the [ExtendsDOMGlobalObject] IDL attribute
https://bugs.webkit.org/show_bug.cgi?id=77966
Summary
Remove the [ExtendsDOMGlobalObject] IDL attribute
Kentaro Hara
Reported
2012-02-07 04:42:36 PST
The [ExtendsDOMGlobalObject] attribute might be verbose. It is used only by DOMWindow.idl and IDL files with [IsWorkerContext] attribute. (Note: It would be OK to handle DOMWindow.idl specially in code generators (rather than introducing a new IDL attribute just for DOMWindow.idl), since DOMWindow.idl is already handled specially here and there.)
Attachments
Patch
(4.71 KB, patch)
2012-02-07 04:47 PST
,
Kentaro Hara
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Kentaro Hara
Comment 1
2012-02-07 04:47:47 PST
Created
attachment 125818
[details]
Patch
Alexey Proskuryakov
Comment 2
2012-02-07 09:44:08 PST
I agree with what Darin said in webkit-deb thread - adding more special cases to code generating scripts is a step in the wrong direction.
Darin Adler
Comment 3
2012-02-07 12:07:07 PST
I do not think removing this keyword is an improvement. It’s probably the best-named one of the DOMWindow-related keywords. I think the other special cases of DOMWindow should be merged into this keyword or possibly one of the others if the concerns are really orthogonal. Hardcoding the actual name DOMWindow in the scripts is not nearly as good; we should work instead to wipe that out. Especially if features like workers eventually lead us to wanting to refactor this.
Eric Seidel (no email)
Comment 4
2012-02-07 16:03:26 PST
Comment on
attachment 125818
[details]
Patch Hmmm... Seems like someone was trying to make the idl more general. This seems to be used in more places than just DOMWindow.idl?
Kentaro Hara
Comment 5
2012-02-07 16:16:44 PST
> Hardcoding the actual name DOMWindow in the scripts is not nearly as good;
OK.
> I think the other special cases of DOMWindow should be merged into this keyword or possibly one of the others if the concerns are really orthogonal.
There are 18 hard-coded "DOMWindow" in CodeGeneratorJS.pm and 25 hard-coded "DOMWindow" in CodeGeneratorV8.pm. At least, removing these hard-coded "DOMWindow"s by introducing many new IDL attributes would not be desirable. Maybe we can introduce [IsDOMWindow] attribute? Although this just replaces hard-coded "DOMWindow" to [IsDOMWindow] attribute, but code generators would be more readable than introducing many IDL attributes. (I do agree that we should avoid hard-coding in code generators, but it would be also important to make code generators more readable by reducing the number of IDL attributes, and prevent people from using "don't know" IDL attributes.) Then, [ExtendsDOMGlobalObject] can be replaced with "[IsDOMWindow] or [IsWorkerContext]". WDYT?
Darin Adler
Comment 6
2012-02-07 17:17:13 PST
(In reply to
comment #5
)
> removing these hard-coded "DOMWindow"s by introducing many new IDL attributes would not be desirable
Yes, I’d want to use existing IDL attributes or add a small number. I don’t think IsDOMWindow is the attribute I’d add, though. We could look at the 18 to find out what the pattern is of why DOMWindow is special.
Kentaro Hara
Comment 7
2012-04-10 05:22:23 PDT
Comment on
attachment 125818
[details]
Patch For now, let me invalidate r?. Sooner or later, I'd like to work on removing DOMWindow-specific IDL attributes.
Zan Dobersek
Comment 8
2013-11-20 03:01:38 PST
This attribute was removed in
r152168
(
bug #118191
).
http://trac.webkit.org/changeset/152168
Marking this bug as a duplicate of that one. *** This bug has been marked as a duplicate of
bug 118191
***
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