Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index b4b3c38289dcf1a3fc92f7eff04156c284f271a9..51978d82bb08c88e3afb074760d73295bb516ef9 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -1280,6 +1280,28 @@ Object* Isolate::UnwindAndFindHandler() { |
} |
} |
+ if (frame->is_stub() && catchable_by_js) { |
+ StubFrame* stub_frame = StubFrame::cast(frame); |
+ int stack_depth = 0; |
+ int code_offset = |
+ stub_frame->LookupExceptionHandlerInTable(&stack_depth, nullptr); |
+ if (code_offset >= 0) { |
+ Address return_sp = frame->fp() - |
+ StandardFrameConstants::kFixedFrameSizeFromFp - |
+ stack_depth * kPointerSize; |
+ STATIC_ASSERT(TryBlockConstant::kElementCount == 1); |
+ Object* maybe_context = Memory::Object_at(return_sp - kPointerSize); |
+ context = maybe_context->IsContext() ? Context::cast(maybe_context) |
+ : raw_native_context(); |
caitp
2016/08/18 03:08:57
I'm not sure about this:
For TFJ builtins, it loo
|
+ |
+ code = frame->LookupCode(); |
+ handler_sp = return_sp; |
+ handler_fp = frame->fp(); |
+ offset = code_offset; |
caitp
2016/08/18 03:08:57
Without setting the offset, the stub is restarted
|
+ break; |
+ } |
+ } |
+ |
RemoveMaterializedObjectsOnUnwind(frame); |
} |