Closed
Bug 949376
Opened 11 years ago
Closed 10 years ago
event.initMessageEvent is not a function
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: predrag, Assigned: baku)
Details
(Keywords: dev-doc-needed, site-compat)
Attachments
(2 files)
3.15 KB,
image/png
|
Details | |
9.04 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0 (Beta/Release)
Build ID: 20131205075310
Steps to reproduce:
From https://github.com/gimite/web-socket-js:
...
var event = document.createEvent("MessageEvent");
event.initMessageEvent("message", false, false, data, null, null, window, null);
return event;
...
Actual results:
Firefox 26 throws an error: TypeError: event.initMessageEvent is not a function
and crashes the web application.
Firefox 25 works just fine.
Expected results:
The event should have been created, like it is in Firefox 25.
Attachment #8346444 -
Attachment description: NVIDIA ALSIUS_2013-12-12_10-07-50.png → initMessageEvent.png
Attachment #8346444 -
Attachment filename: NVIDIA ALSIUS_2013-12-12_10-07-50.png → initMessageEvent.png
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
fixed by replacing event.initMessageEvent with:
var event = new MessageEvent('message', {
'view': window,
'bubbles': false,
'cancelable': false,
'data': data
});
Comment 3•10 years ago
|
||
Status: RESOLVED → REOPENED
Component: Untriaged → DOM
Ever confirmed: true
Product: Firefox → Core
Resolution: INVALID → ---
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → amarchesini
Updated•10 years ago
|
Keywords: dev-doc-needed
Comment 4•10 years ago
|
||
Though note I just filed https://github.com/whatwg/html/issues/228
Assignee | ||
Comment 5•10 years ago
|
||
Attachment #8669643 -
Flags: review?(bugs)
Comment 6•10 years ago
|
||
Comment on attachment 8669643 [details] [diff] [review]
ms.patch
>+
>+ nsCOMPtr<nsIDOMMessageEvent> event = this;
>+ mPorts = new MessagePortList(event, ports);
This looks a bit ugly.
Why can't the first param be just
static_cast<Event*>(this) or so?
Attachment #8669643 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 7•10 years ago
|
||
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/4edbfdc54d3d for wpt failures like:
https://treeherder.mozilla.org/logviewer.html#?job_id=15332505&repo=mozilla-inbound
Flags: needinfo?(amarchesini)
Assignee | ||
Comment 9•10 years ago
|
||
Flags: needinfo?(amarchesini)
Comment 10•10 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 11 years ago → 10 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Keywords: regression,
site-compat
Comment 11•10 years ago
|
||
Updated the site compatibility doc: https://www.fxsitecompat.com/en-US/docs/2013/messageevent-has-been-updated/
Keywords: regression
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•