| Index: src/debug/debug-evaluate.cc
 | 
| diff --git a/src/debug/debug-evaluate.cc b/src/debug/debug-evaluate.cc
 | 
| index 62b7a2b4269bf79104633d0e0a552c8ac4f98bc7..ab1e8d93dc202d5cc6f62f67cae8e7010c89d626 100644
 | 
| --- a/src/debug/debug-evaluate.cc
 | 
| +++ b/src/debug/debug-evaluate.cc
 | 
| @@ -54,8 +54,9 @@ MaybeHandle<Object> DebugEvaluate::Local(Isolate* isolate,
 | 
|    DisableBreak disable_break_scope(isolate->debug(), disable_break);
 | 
|  
 | 
|    // Get the frame where the debugging is performed.
 | 
| -  JavaScriptFrameIterator it(isolate, frame_id);
 | 
| -  JavaScriptFrame* frame = it.frame();
 | 
| +  StackTraceFrameIterator it(isolate, frame_id);
 | 
| +  if (!it.is_javascript()) return isolate->factory()->undefined_value();
 | 
| +  JavaScriptFrame* frame = it.javascript_frame();
 | 
|  
 | 
|    // Traverse the saved contexts chain to find the active context for the
 | 
|    // selected frame.
 | 
| @@ -126,8 +127,7 @@ DebugEvaluate::ContextBuilder::ContextBuilder(Isolate* isolate,
 | 
|        frame_(frame),
 | 
|        inlined_jsframe_index_(inlined_jsframe_index) {
 | 
|    FrameInspector frame_inspector(frame, inlined_jsframe_index, isolate);
 | 
| -  Handle<JSFunction> local_function =
 | 
| -      Handle<JSFunction>::cast(frame_inspector.GetFunction());
 | 
| +  Handle<JSFunction> local_function = frame_inspector.GetFunction();
 | 
|    Handle<Context> outer_context(local_function->context());
 | 
|    evaluation_context_ = outer_context;
 | 
|    outer_info_ = handle(local_function->shared());
 | 
| 
 |