Can't use 'delete' method in WebIDL

RESOLVED FIXED in mozilla19

Status

()

Core
DOM
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: janv, Assigned: vendo)

Tracking

(Blocks: 1 bug)

unspecified
mozilla19
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments)

(Reporter)

Description

5 years ago
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 ...
(Reporter)

Updated

5 years ago
Blocks: 798875
(Assignee)

Comment 1

5 years ago
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.
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?
(Reporter)

Comment 3

5 years ago
(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
Assignee: nobody → swenruzicka
(Assignee)

Comment 4

5 years ago
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.
(Reporter)

Updated

5 years ago
Attachment #676388 - Flags: review?(bzbarsky)
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.
Attachment #676388 - Flags: review?(bzbarsky) → review+
(Assignee)

Comment 6

5 years ago
Created attachment 676990 [details] [diff] [review]
bug-806184-patch

New version of patch against tip added in attachment.
Attachment #676990 - Flags: review?(bzbarsky)
Comment on attachment 676990 [details] [diff] [review]
bug-806184-patch

r=me
Attachment #676990 - Flags: review?(bzbarsky) → review+
(Reporter)

Comment 8

5 years ago
https://tbpl.mozilla.org/?tree=Try&rev=efe449d2ad7b
(Reporter)

Comment 9

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/ea8a3b029079
https://hg.mozilla.org/mozilla-central/rev/ea8a3b029079
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in before you can comment on or make changes to this bug.