Commit 749c5ea7 authored by antonm@chromium.org's avatar antonm@chromium.org

Make OutOfMemory exception thrown from JS call into FatalProcessOutOfMemory as well.

That unifies the behaviour with CALL_HEAP_FUNCTION macro.

BUG=v8:1165

Review URL: http://codereview.chromium.org/6528050

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6844 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 65addc51
......@@ -106,6 +106,11 @@ static Handle<Object> Invoke(bool construct,
ASSERT(*has_pending_exception == Top::has_pending_exception());
if (*has_pending_exception) {
Top::ReportPendingMessages();
if (Top::pending_exception() == Failure::OutOfMemoryException()) {
if (!HandleScopeImplementer::instance()->ignore_out_of_memory()) {
V8::FatalProcessOutOfMemory("JS", true);
}
}
return Handle<Object>();
} else {
Top::clear_pending_message();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment