[Bug 28093] Consider using namespaceURI in the IDL

https://www.w3.org/Bugs/Public/show_bug.cgi?id=28093

Boris Zbarsky <bzbarsky@mit.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bzbarsky@mit.edu

--- Comment #3 from Boris Zbarsky <bzbarsky@mit.edu> ---
It might help if you said which "namespace" instance you're talking about.

That said....

> at least not without special-casing the code generator.

This is a problem all over, no?  Specifically, I'm aware of at least the
following cases in which C++ keywords of various sorts are used in IDL in
various capacities:

1) Methods named "delete" on at least FontFaceSet, Headers, URLSearchParams,
   IDBCursor.
2) A method named "default" on FetchEvent.
3) A method named "continue" on IDBCursor.
4) A method named "register" on ServiceWorkerContainer.

and there are probably more; these were just the ones that would have led
Gecko's codegen to spit out the keyword in C++ code, which of course depends on
the details of our codegen (and in particular we only end up using the original
IDL name for method names; for example we typically don't use the argument
names from the IDL for anything, so argument names don't show up in the list
above much, we modify the case of dictionary members, so dictionary member
names don't show up above, etc).

What we end up doing in practice is that we have a blacklist of C++ keywords
and we munge things that we'd spit out as barewords in C++ if they're in that
blacklist.  See
<http://hg.mozilla.org/mozilla-central/file/b74938ef94bc/dom/bindings/Codegen.py#l7703>.
 I recommend doing something similar in your codegen, because restricting web
specs based on what the set of keywords in C++ happens to be and what the
internals of some particular code generators spitting out C++ look like is not
really desirable.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 24 February 2015 17:28:08 UTC