| Index: src/isolate.cc
|
| diff --git a/src/isolate.cc b/src/isolate.cc
|
| index 9826a7f59500fd7e6b305930bf40c98f851875f0..624f2a8d93be453c855f272ef982d08cb69d7cf8 100644
|
| --- a/src/isolate.cc
|
| +++ b/src/isolate.cc
|
| @@ -1226,7 +1226,11 @@ Object* Isolate::UnwindAndFindHandler() {
|
|
|
| // Gather information from the frame.
|
| code = frame->LookupCode();
|
| - if (code->marked_for_deoptimization()) {
|
| +
|
| + // TODO(bmeurer): Turbofanned BUILTIN frames appear as OPTIMIZED, but
|
| + // do not have a code kind of OPTIMIZED_FUNCTION.
|
| + if (code->kind() == Code::OPTIMIZED_FUNCTION &&
|
| + code->marked_for_deoptimization()) {
|
| // If the target code is lazy deoptimized, we jump to the original
|
| // return address, but we make a note that we are throwing, so that
|
| // the deoptimizer can do the right thing.
|
|
|