Closed Bug 730891 Opened 12 years ago Closed 12 years ago

`new StorageEvent` fails because `StorageEvent` is not a constructor

Categories

(Core :: DOM: Events, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sdwilsh, Assigned: smaug)

References

Details

Attachments

(1 file, 1 obsolete file)

In the web console:
[10:46:46.702] new StorageEvent()
[10:46:46.706] TypeError: StorageEvent is not a constructor
Assignee: nobody → bugs
Attached patch patch (obsolete) — Splinter Review
I changed dictionary_helper_gen.py so that
nsCOMPtr's aren't initialized to nsnull (they do that implicitly).
Initializing nsnull would have required to #include more stuff.

StorageEvent missed also nsIDOMNSEvent, so I added DOM_CLASSINFO_EVENT_MAP_ENTRIES

Can't use NS_DEFINE_EVENT_CTOR macro, since nsDOMStorageEvent doesn't have
NS_New*, and I didn't see any reason to add such.
So, I wrote NS_DOMStorageEventCtor manually.

https://tbpl.mozilla.org/?tree=Try&rev=881de3bc4cd8
Attachment #601016 - Flags: review?(jonas)
Comment on attachment 601016 [details] [diff] [review]
patch

Bah, OSX doesn't like the patch.
Attachment #601016 - Flags: review?(jonas)
Attached patch patchSplinter Review
Ok, had to make sure ctor/dtor aren't inline so that I don't need to
#include everything when using nsCOMPtr<> in header.
The python code is ugly, but doesn't matter :)

https://tbpl.mozilla.org/?tree=Try&rev=769b11f135f7
Attachment #601016 - Attachment is obsolete: true
Attachment #601082 - Flags: review?(jonas)
Comment on attachment 601082 [details] [diff] [review]
patch

r=me, but you should get khuey to review the dictionary_helper_gen.py changes.
Attachment #601082 - Flags: review?(khuey)
Attachment #601082 - Flags: review?(jonas)
Attachment #601082 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/08809a43e082
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Depends on: 734548
No longer depends on: 734548
Depends on: 736058
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: