| Index: src/api.cc
 | 
| diff --git a/src/api.cc b/src/api.cc
 | 
| index 2861bd1fb15cfa11ec541a3532b1afe19e4f5404..6c677abee3e678323b1287d2af84c188850e437d 100644
 | 
| --- a/src/api.cc
 | 
| +++ b/src/api.cc
 | 
| @@ -97,6 +97,15 @@ namespace v8 {
 | 
|    ENTER_V8(isolate);                                                 \
 | 
|    bool has_pending_exception = false
 | 
|  
 | 
| +#define PREPARE_FOR_DEBUG_INTERFACE_EXECUTION_WITH_ISOLATE(isolate, T)       \
 | 
| +  if (IsExecutionTerminatingCheck(isolate)) {                                \
 | 
| +    return MaybeLocal<T>();                                                  \
 | 
| +  }                                                                          \
 | 
| +  InternalEscapableScope handle_scope(isolate);                              \
 | 
| +  CallDepthScope<false> call_depth_scope(isolate, v8::Local<v8::Context>()); \
 | 
| +  ENTER_V8(isolate);                                                         \
 | 
| +  bool has_pending_exception = false
 | 
| +
 | 
|  #define PREPARE_FOR_EXECUTION_WITH_CONTEXT(context, class_name, function_name, \
 | 
|                                             bailout_value, HandleScopeClass,    \
 | 
|                                             do_callback)                        \
 | 
| @@ -9112,6 +9121,25 @@ void DebugInterface::GetLoadedScripts(
 | 
|    }
 | 
|  }
 | 
|  
 | 
| +MaybeLocal<UnboundScript> DebugInterface::CompileInspectorScript(
 | 
| +    Isolate* v8_isolate, Local<String> source) {
 | 
| +  i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
 | 
| +  PREPARE_FOR_DEBUG_INTERFACE_EXECUTION_WITH_ISOLATE(isolate, UnboundScript);
 | 
| +  i::ScriptData* script_data = NULL;
 | 
| +  i::Handle<i::String> str = Utils::OpenHandle(*source);
 | 
| +  i::Handle<i::SharedFunctionInfo> result;
 | 
| +  {
 | 
| +    ScriptOriginOptions origin_options;
 | 
| +    result = i::Compiler::GetSharedFunctionInfoForScript(
 | 
| +        str, i::Handle<i::Object>(), 0, 0, origin_options,
 | 
| +        i::Handle<i::Object>(), isolate->native_context(), NULL, &script_data,
 | 
| +        ScriptCompiler::kNoCompileOptions, i::INSPECTOR_CODE, false);
 | 
| +    has_pending_exception = result.is_null();
 | 
| +    RETURN_ON_FAILED_EXECUTION(UnboundScript);
 | 
| +  }
 | 
| +  RETURN_ESCAPED(ToApiHandle<UnboundScript>(result));
 | 
| +}
 | 
| +
 | 
|  Local<String> CpuProfileNode::GetFunctionName() const {
 | 
|    const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
 | 
|    i::Isolate* isolate = node->isolate();
 | 
| 
 |