aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/src/execution.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/execution.cc')
-rw-r--r--deps/v8/src/execution.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/deps/v8/src/execution.cc b/deps/v8/src/execution.cc
index d7b9cf5d59..ecfa1db1ed 100644
--- a/deps/v8/src/execution.cc
+++ b/deps/v8/src/execution.cc
@@ -206,10 +206,12 @@ Handle<Object> Execution::TryCall(Handle<JSFunction> func,
catcher.SetCaptureMessage(false);
*caught_exception = false;
+ // Get isolate now, because handle might be persistent
+ // and get destroyed in the next call.
+ Isolate* isolate = func->GetIsolate();
Handle<Object> result = Invoke(false, func, receiver, argc, args,
caught_exception);
- Isolate* isolate = func->GetIsolate();
if (*caught_exception) {
ASSERT(catcher.HasCaught());
ASSERT(isolate->has_pending_exception());