Last Comment Bug 806184 - Can't use 'delete' method in WebIDL
: Can't use 'delete' method in WebIDL
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla19
Assigned To: Vendelin Ruzicka [:vendo]
:
: Andrew Overholt [:overholt]
Mentors:
Depends on:
Blocks: SyncIDB
  Show dependency treegraph
 
Reported: 2012-10-28 03:55 PDT by Jan Varga [:janv]
Modified: 2012-11-01 06:52 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
quick fix (2.19 KB, patch)
2012-10-28 03:55 PDT, Jan Varga [:janv]
no flags Details | Diff | Splinter Review
quick fix v.2 (2.24 KB, patch)
2012-10-28 12:15 PDT, Vendelin Ruzicka [:vendo]
no flags Details | Diff | Splinter Review
fix for c++ keywords v.3 (6.61 KB, patch)
2012-10-29 16:28 PDT, Vendelin Ruzicka [:vendo]
bzbarsky: review+
Details | Diff | Splinter Review
bug-806184-patch (6.73 KB, patch)
2012-10-31 06:22 PDT, Vendelin Ruzicka [:vendo]
bzbarsky: review+
Details | Diff | Splinter Review

Description Jan Varga [:janv] 2012-10-28 03:55:04 PDT
Created attachment 675935 [details] [diff] [review]
quick fix

interface IDBObjectStoreSync {
  boolean delete (any key);
}

The code generator produces a method for this in IDBObjectStoreSyncBinding.cpp which doesn't compile since it conflicts with the C++ reserved word "delete"

Attaching a quick fix ...
Comment 1 Vendelin Ruzicka [:vendo] 2012-10-28 12:15:10 PDT
Created attachment 675974 [details] [diff] [review]
quick fix v.2

Same problem with c++ reserved word "continue".

interface IDBCursorSync {
  boolean continue(optional any key);
  boolean delete();
};

New version of quick fix added.
Comment 2 Boris Zbarsky [:bz] (still a bit busy) 2012-10-28 19:09:03 PDT
I would prefer a method that takes the WebIDL identifier name and produces the name used in the binding code.  Then we can just call this method from the various places it's needed and update it as it becomes necessary....

Jan, Vendelin, are you actively working on this?
Comment 3 Jan Varga [:janv] 2012-10-28 22:30:38 PDT
(In reply to Boris Zbarsky (:bz) from comment #2)
> I would prefer a method that takes the WebIDL identifier name and produces
> the name used in the binding code.  Then we can just call this method from
> the various places it's needed and update it as it becomes necessary....
> 
> Jan, Vendelin, are you actively working on this?

Yes, he needs this for bug 798875
Comment 4 Vendelin Ruzicka [:vendo] 2012-10-29 16:28:59 PDT
Created attachment 676388 [details] [diff] [review]
fix for c++ keywords v.3

I have created new attachment with fix and simple test. Any suggestions are welcome.
Comment 5 Boris Zbarsky [:bz] (still a bit busy) 2012-10-29 20:58:59 PDT
Comment on attachment 676388 [details] [diff] [review]
fix for c++ keywords v.3

This doesn't seem to be a patch against tip, but against some intermediate state.  I'd really like to see a diff against tip.

Also, please drop the 'CG' from the class name, since this is not in fact a subclass of CGThing.

And add the missing newline to the end of TestCodeGen.webidl, please.

r=me with that.
Comment 6 Vendelin Ruzicka [:vendo] 2012-10-31 06:22:24 PDT
Created attachment 676990 [details] [diff] [review]
bug-806184-patch

New version of patch against tip added in attachment.
Comment 7 Boris Zbarsky [:bz] (still a bit busy) 2012-10-31 08:04:59 PDT
Comment on attachment 676990 [details] [diff] [review]
bug-806184-patch

r=me
Comment 8 Jan Varga [:janv] 2012-10-31 10:04:31 PDT
https://tbpl.mozilla.org/?tree=Try&rev=efe449d2ad7b
Comment 10 Ed Morley [:emorley] 2012-11-01 06:52:47 PDT
https://hg.mozilla.org/mozilla-central/rev/ea8a3b029079

Note You need to log in before you can comment on or make changes to this bug.