Error handling in nsAutoJSString::init (the single-arg version) is busted

RESOLVED FIXED in Firefox 45

Status

()

defect
RESOLVED FIXED
4 years ago
4 months ago

People

(Reporter: bzbarsky, Unassigned)

Tracking

Trunk
mozilla45
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox45 fixed, b2g-v2.5 fixed)

Details

Attachments

(1 attachment)

It does:

332   return init(nsContentUtils::RootingCxForThread(), v);

but the two-arg init() can throw OOM exceptions as far as I can tell, and this code will leave those dangling.
Flags: needinfo?(huseby)
Flags: needinfo?(bobbyholley)
Component: Build Config → DOM
Comment on attachment 8682584 [details] [diff] [review]
Clear exceptions on single-arg init. v1

r=me
Attachment #8682584 - Flags: review?(bzbarsky) → review+
https://hg.mozilla.org/mozilla-central/rev/21c99c452631
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Flags: needinfo?(huseby)
Flags: needinfo?(bobbyholley)
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.