Closed
Bug 568818
Opened 15 years ago
Closed 15 years ago
sendSyncMessage fails with "SyntaxError: JSON.parse" if one of the listeners did not return a value
Categories
(Core :: DOM: Events, defect)
Core
DOM: Events
Tracking
()
RESOLVED
FIXED
mozilla2.0b2
People
(Reporter: vingtetun, Assigned: vingtetun)
References
Details
Attachments
(1 file)
1.05 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
If you have multiple listeners on one message and if one of them doesn't return a value, sendSyncMessage throw an error.
The attached patch (2 lines) ignore the the retval if it has a length of zero which allow listener to return nothing and/or use "return;" to break the listener code if needed.
Attachment #447997 -
Flags: review?(Olli.Pettay)
Updated•15 years ago
|
Attachment #447997 -
Flags: review?(Olli.Pettay) → review+
Assignee | ||
Comment 1•15 years ago
|
||
do I need a sr? for this patch?
Comment 2•15 years ago
|
||
No.
I'll add some tests for this.
Comment 3•15 years ago
|
||
This bug is causing us some grief. Any idea when we can get it landed?
Assignee | ||
Comment 4•15 years ago
|
||
(In reply to comment #3)
> This bug is causing us some grief. Any idea when we can get it landed?
http://hg.mozilla.org/mozilla-central/rev/d1c910f2ec4d
Comment 5•15 years ago
|
||
I backed this out because it seemed to be causing a lot more crashes in the messageManager tests:
http://hg.mozilla.org/mozilla-central/rev/ef715f78e927
Comment 6•15 years ago
|
||
Huh. What kind of crashes?
Assignee | ||
Comment 7•15 years ago
|
||
I've re-runned all the tests yesterday and everything seems fine (http://ftp.mozilla.org/pub/mozilla.org/firefox/tryserver-builds/vnicolas@mozilla.com-e2346fa5faaa/).
I really think the crashes were from an other point, and now that messageManager is very stable, if we start to see crashes again we can consider this bug as the root cause but it is unlikely.
http://hg.mozilla.org/mozilla-central/rev/adaf0592cdfa
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 8•15 years ago
|
||
backed out because of test_bug549682.xul failures
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Updated•15 years ago
|
Assignee: nobody → 21
Assignee | ||
Comment 9•15 years ago
|
||
Ok, one line change to prevent the return value to have crazy pointer that cause
the crash.
http://hg.mozilla.org/mozilla-central/rev/5252602a7e19
Status: REOPENED → RESOLVED
Closed: 15 years ago → 15 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Target Milestone: --- → mozilla2.0b2
You need to log in
before you can comment on or make changes to this bug.
Description
•