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.)
Created attachment 125818 [details] Patch
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.
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.
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?
> 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?
(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.
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.
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 ***