Closed
Bug 1250234
Opened 9 years ago
Closed 9 years ago
WebSocket::CreateAndDispatchMessageEvent can leave stray exceptions on JSContexts
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla47
Tracking | Status | |
---|---|---|
firefox47 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(1 file)
Say we get into this code. We set up an AutoJSAPI, then do some stuff like allocate strings and blob buffers and whatnot. Those things can throw OOM. And then we just leave it hanging out on the JSContext.
The good news is that we can just take ownership of error reporting on the AutoJSAPI and things will be good.
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8722101 -
Flags: review?(khuey)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Comment 2•9 years ago
|
||
Could we please make AutoJSAPI less error prone to use when dealing with exceptions. It is guaranteed that we'll forget to use TakeOwnershipOfErrorReporting() when needed.
I think AutoJSAPI ctor or Init should take some non-optional enum value to indicate the exception handling. Or should AutoJSAPI always handle exceptions and then in some special cases one could prevent that?
Assignee | ||
Comment 3•9 years ago
|
||
> Or should AutoJSAPI always handle exceptions and then in some special cases one could prevent that?
That's the plan in general. That's what bug 1072144 is on the way to, for example.
Attachment #8722101 -
Flags: review?(khuey) → review+
Comment 5•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
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
•