| Index: src/isolate.cc
|
| diff --git a/src/isolate.cc b/src/isolate.cc
|
| index b4b3c38289dcf1a3fc92f7eff04156c284f271a9..44b8f0e844b2c53860878482446f812f455d97f0 100644
|
| --- a/src/isolate.cc
|
| +++ b/src/isolate.cc
|
| @@ -1222,7 +1222,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.
|
|
|