Closed
Bug 660630
Opened 12 years ago
Closed 12 years ago
Only error once on OOM in NewCompartment
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: paul.biggar, Unassigned)
References
Details
(Whiteboard: [fixed-in-tracemonkey])
Attachments
(2 files)
790 bytes,
patch
|
igor
:
review-
|
Details | Diff | Splinter Review |
1.02 KB,
patch
|
igor
:
review+
|
Details | Diff | Splinter Review |
We shouldn't be calling js_reportOutOfMemory error more than once. JSCompartment::init() does, and then NewCompartment does too. This removes the partial redundancy.
Attachment #536079 -
Flags: review?(igor)
Comment 1•12 years ago
|
||
Comment on attachment 536079 [details] [diff] [review] fix Review of attachment 536079 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/jsgc.cpp @@ +2936,5 @@ > AutoLockGC lock(rt); > if (rt->compartments.append(compartment)) > return compartment; > + else > + JS_ReportOutOfMemory(cx); 1. Memory reporting must be done outside any lock. 2. Use js_ReportOutOfMemory. 3. No else after return
Attachment #536079 -
Flags: review?(igor) → review-
Reporter | ||
Comment 2•12 years ago
|
||
Attachment #536108 -
Flags: review?(igor)
Comment 3•12 years ago
|
||
Comment on attachment 536108 [details] [diff] [review] with error reporting outseide lock Review of attachment 536108 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/jsgc.cpp @@ +2933,5 @@ > > compartment->setGCLastBytes(8192); > > + { > + AutoLockGC lock(rt); Comment that the extra block is for lock-less error reporting.
Attachment #536108 -
Flags: review?(igor) → review+
Reporter | ||
Comment 4•12 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/d6987081e730
Whiteboard: [fixed-in-tracemonkey]
Reporter | ||
Comment 5•12 years ago
|
||
cdleary-bot missed this.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•