Closed
Bug 363057
Opened 18 years ago
Closed 18 years ago
Silent ignoring of out-of-memory in jslock.c
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: igor, Assigned: igor)
References
Details
Attachments
(1 file, 3 obsolete files)
8.26 KB,
patch
|
igor
:
review+
|
Details | Diff | Splinter Review |
Currently, when js_UndependString fails due to faile malloc, jslock.c does not report its failure and instead tries to implement a workaround to recover from this. It would be nice if the failure would be at least reported if not propagated.
Assignee | ||
Comment 1•18 years ago
|
||
The patch changes the code to pass JSContext *cx to MakeStringImmutable in jslock.c on all code paths so js_UndependString receives cx, not NULL.
Attachment #248744 -
Flags: review?(brendan)
Assignee | ||
Comment 2•18 years ago
|
||
This version removes FIXME comments for this bug and wraps js_Dequeue inside NSPR_LOCK macros so GCC would not complain about a declared but never used function.
Attachment #248744 -
Attachment is obsolete: true
Attachment #248746 -
Flags: review?(brendan)
Attachment #248744 -
Flags: review?(brendan)
Comment 3•18 years ago
|
||
Comment on attachment 248746 [details] [diff] [review] Fix v2 Looks good, thanks -- worth a comment that only only OOM is usefully reported, since other errors turn into exceptions which are lost due to lack of propagated false return from js_FinishSharingScope? /be
Attachment #248746 -
Flags: review?(brendan) → review+
Assignee | ||
Comment 4•18 years ago
|
||
Better comments in js_FinishSharingScope.
Attachment #248746 -
Attachment is obsolete: true
Attachment #248756 -
Flags: review?(brendan)
Comment 5•18 years ago
|
||
Comment on attachment 248756 [details] [diff] [review] Fix v2b >+ * FIXME bug 363059: The following error recovery changes the >+ * execution semantic arbitrary and silently ignores any errors >+ * except out-of-memory which should be already reported through >+ * JS_ReportOutOfMemory at this point. Comma before "which", and "have been reported" rather than "be already reported", and r=me. /be
Attachment #248756 -
Flags: review?(brendan) → review+
Assignee | ||
Comment 6•18 years ago
|
||
Patch to commit with English usage fixes.
Attachment #248756 -
Attachment is obsolete: true
Attachment #248797 -
Flags: review+
Assignee | ||
Comment 7•18 years ago
|
||
I committed the patch from comment 6 to the trunk: Checking in jsapi.c; /cvsroot/mozilla/js/src/jsapi.c,v <-- jsapi.c new revision: 3.295; previous revision: 3.294 done Checking in jslock.c; /cvsroot/mozilla/js/src/jslock.c,v <-- jslock.c new revision: 3.60; previous revision: 3.59 done Checking in jslock.h; /cvsroot/mozilla/js/src/jslock.h,v <-- jslock.h new revision: 3.33; previous revision: 3.32 done Checking in jsstr.c; /cvsroot/mozilla/js/src/jsstr.c,v <-- jsstr.c new revision: 3.137; previous revision: 3.136 done
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Updated•18 years ago
|
Flags: in-testsuite-
You need to log in
before you can comment on or make changes to this bug.
Description
•