Closed
Bug 1251272
Opened 9 years ago
Closed 9 years ago
ReportErrorRunnable::ReportError only pretends to be fallible
Categories
(Core :: DOM: Workers, defect)
Core
DOM: Workers
Tracking
()
RESOLVED
FIXED
mozilla47
Tracking | Status | |
---|---|---|
firefox47 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
(Whiteboard: btpp-active)
Attachments
(1 file)
It has some JSAPI that _is_ fallible, but is dead code. And apart from that it only returns false if it fails to dispatch a runnable, but none of its consumers really seem to care about that. One just checks the return value to report a JS exception. The other returns the return value from WorkerRun, which is then propagated to PostRun, where it's used to report a JS exception. But since we can't have an exception to start with...
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8723612 -
Flags: review?(khuey)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•9 years ago
|
||
Oh, and we do still want to pass in a JSContext here, because we get the global from it and do stuff with that.
Comment on attachment 8723612 [details] [diff] [review]
Remove the dead code in ReportErrorRunnable::ReportError that could fail, and make it infallible
Review of attachment 8723612 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/workers/WorkerPrivate.cpp
@@ -960,5 @@
> - JS::Rooted<JSString*> filename(aCx, JS_NewUCStringCopyN(aCx, aFilename.get(),
> - aFilename.Length()));
> - if (!filename) {
> - return false;
> - }
Ouch. Can't believe I left this here ...
Attachment #8723612 -
Flags: review?(khuey) → review+
Updated•9 years ago
|
Whiteboard: btpp-active
Comment 5•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in
before you can comment on or make changes to this bug.
Description
•