Closed
Bug 1132347
Opened 10 years ago
Closed 8 years ago
mozBackgroundRequest ignore errors only in the main thread
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
People
(Reporter: emk, Assigned: emk)
References
Details
Attachments
(1 file)
2.40 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
Because it is annotated as [SetterThrows=Workers] while it can actually fail even in the main thread.
Is this intentional? If so, why is it different between the main thread and workers?
Comment 1•10 years ago
|
||
This totally looks like a bug. Should just be SetterThrows. Want to fix?
Flags: needinfo?(VYV03354)
Assignee | ||
Comment 3•10 years ago
|
||
|void SetMozBackgroundRequest(bool, nsresult&)| was not even called, it was not even updated when ErrorResult was introduced. The compiler didn't catch the error because the signature of the XPCOM version (that is, |NS_IMETHODIMP nsXMLHttpRequest::SetMozBackgroundRequest(bool)|) happened to match the signature of the infallible WebIDL setter function (the difference of the return type did not matter).
Is it possible to prevent similar mistakes in the future?
Attachment #8564126 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 4•10 years ago
|
||
> |void SetMozBackgroundRequest(bool, nsresult&)| was not even called
...from the generated code. It is called from the XPCOM version, of course.
Comment 5•10 years ago
|
||
Comment on attachment 8564126 [details] [diff] [review]
patch
r=me
As far as preventing this in the future, I filed bug 1132934.
Attachment #8564126 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 6•10 years ago
|
||
Assignee | ||
Comment 7•10 years ago
|
||
Hm, some tests set mozBackgroundRequest after open() that should have no effect...
/dom/system/NetworkGeolocationProvider.js
/toolkit/components/search/SearchSuggestionController.jsm
/toolkit/identity/Identity.jsm
Assignee | ||
Updated•10 years ago
|
Assignee | ||
Comment 8•8 years ago
|
||
Fixed by bug 1269162.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
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
•