| Index: src/execution.cc
|
| diff --git a/src/execution.cc b/src/execution.cc
|
| index 7442d1732fb42c1f6db538000c71730f6562b31a..1e0a6a8e578b3603d0ffaa2f1b60d316bb1165f2 100644
|
| --- a/src/execution.cc
|
| +++ b/src/execution.cc
|
| @@ -135,6 +135,11 @@ static Handle<Object> Invoke(bool is_construct,
|
| ASSERT(*has_pending_exception == isolate->has_pending_exception());
|
| if (*has_pending_exception) {
|
| isolate->ReportPendingMessages();
|
| + if (isolate->pending_exception()->IsOutOfMemory()) {
|
| + if (!isolate->ignore_out_of_memory()) {
|
| + V8::FatalProcessOutOfMemory("JS", true);
|
| + }
|
| + }
|
| #ifdef ENABLE_DEBUGGER_SUPPORT
|
| // Reset stepping state when script exits with uncaught exception.
|
| if (isolate->debugger()->IsDebuggerActive()) {
|
| @@ -220,6 +225,9 @@ Handle<Object> Execution::TryCall(Handle<JSFunction> func,
|
| ASSERT(catcher.HasCaught());
|
| ASSERT(isolate->has_pending_exception());
|
| ASSERT(isolate->external_caught_exception());
|
| + if (isolate->is_out_of_memory() && !isolate->ignore_out_of_memory()) {
|
| + V8::FatalProcessOutOfMemory("OOM during Execution::TryCall");
|
| + }
|
| if (isolate->pending_exception() ==
|
| isolate->heap()->termination_exception()) {
|
| result = isolate->factory()->termination_exception();
|
|
|