Bug 32184 - Handle out-of-memory conditions with JSC Ropes with a JS exception, rather than crashing.
Summary: Handle out-of-memory conditions with JSC Ropes with a JS exception, rather th...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Gavin Barraclough
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-05 15:42 PST by Gavin Barraclough
Modified: 2009-12-07 15:16 PST (History)
1 user (show)

See Also:


Attachments
The Patch (57.26 KB, patch)
2009-12-05 15:44 PST, Gavin Barraclough
oliver: review+
Details | Formatted Diff | Diff
Oooops, with required webcore/webkit changes. (66.82 KB, patch)
2009-12-07 13:09 PST, Gavin Barraclough
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gavin Barraclough 2009-12-05 15:42:09 PST
Switch from using fastMalloc to tryFastMalloc, pass an ExecState to record the exception on.
Comment 1 Gavin Barraclough 2009-12-05 15:44:29 PST
Created attachment 44351 [details]
The Patch
Comment 2 WebKit Review Bot 2009-12-05 15:46:59 PST
Attachment 44351 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
JavaScriptCore/jit/JITStubs.cpp:2464:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
JavaScriptCore/runtime/PropertyDescriptor.cpp:162:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
JavaScriptCore/runtime/PropertyDescriptor.cpp:163:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
JavaScriptCore/runtime/PropertyDescriptor.cpp:164:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
Total errors found: 4
Comment 3 Oliver Hunt 2009-12-05 22:49:41 PST
Comment on attachment 44351 [details]
The Patch

r=me
Comment 4 Gavin Barraclough 2009-12-07 13:09:50 PST
Created attachment 44427 [details]
Oooops, with required webcore/webkit changes.
Comment 5 WebKit Review Bot 2009-12-07 13:11:08 PST
Attachment 44427 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
JavaScriptCore/jit/JITStubs.cpp:2438:  Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons.  [readability/comparison_to_zero] [5]
JavaScriptCore/runtime/PropertyDescriptor.cpp:162:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
JavaScriptCore/runtime/PropertyDescriptor.cpp:163:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
JavaScriptCore/runtime/PropertyDescriptor.cpp:164:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
Total errors found: 4
Comment 6 Oliver Hunt 2009-12-07 13:14:40 PST
Comment on attachment 44427 [details]
Oooops, with required webcore/webkit changes.

bool getString(ScriptState* scriptState, String& result) const; (in ScriptValue.h)
'scriptState' name should be removed

Otherwise, r=me
Comment 7 Gavin Barraclough 2009-12-07 15:16:20 PST
Transmitting file data ..........................................
Committed revision 51801.