Chromium Code Reviews| Index: src/api.cc |
| diff --git a/src/api.cc b/src/api.cc |
| index 0b0ab03bbf1cf90ad60a2e0109a7066f591477d2..39eda0c3a1b357390cd5783194bfed00f04fd375 100644 |
| --- a/src/api.cc |
| +++ b/src/api.cc |
| @@ -1550,6 +1550,7 @@ Local<UnboundScript> ScriptCompiler::CompileUnbound( |
| i::Handle<i::Object> name_obj; |
| int line_offset = 0; |
| int column_offset = 0; |
| + bool is_debugger_script = false; |
| bool is_shared_cross_origin = false; |
| if (!source->resource_name.IsEmpty()) { |
| name_obj = Utils::OpenHandle(*(source->resource_name)); |
| @@ -1562,15 +1563,17 @@ Local<UnboundScript> ScriptCompiler::CompileUnbound( |
| static_cast<int>(source->resource_column_offset->Value()); |
| } |
| if (!source->resource_is_shared_cross_origin.IsEmpty()) { |
| - v8::Isolate* v8_isolate = reinterpret_cast<v8::Isolate*>(isolate); |
| is_shared_cross_origin = |
| - source->resource_is_shared_cross_origin == v8::True(v8_isolate); |
| + source->resource_is_shared_cross_origin->IsTrue(); |
| + } |
| + if (!source->resource_is_debugger_script.IsEmpty()) { |
| + is_debugger_script = source->resource_is_debugger_script->IsTrue(); |
| } |
| EXCEPTION_PREAMBLE(isolate); |
| i::Handle<i::SharedFunctionInfo> result = i::Compiler::CompileScript( |
| - str, name_obj, line_offset, column_offset, is_shared_cross_origin, |
| - isolate->native_context(), NULL, &script_data, options, |
| - i::NOT_NATIVES_CODE); |
| + str, name_obj, line_offset, column_offset, is_debugger_script, |
| + is_shared_cross_origin, isolate->native_context(), NULL, &script_data, |
| + options, i::NOT_NATIVES_CODE); |
| has_pending_exception = result.is_null(); |
| if (has_pending_exception && script_data != NULL) { |
| // This case won't happen during normal operation; we have compiled |
| @@ -1648,8 +1651,12 @@ Local<Script> ScriptCompiler::Compile(Isolate* v8_isolate, |
| static_cast<int>(origin.ResourceColumnOffset()->Value()))); |
| } |
| if (!origin.ResourceIsSharedCrossOrigin().IsEmpty()) { |
| - script->set_is_shared_cross_origin(origin.ResourceIsSharedCrossOrigin() == |
| - v8::True(v8_isolate)); |
| + script->set_is_shared_cross_origin( |
| + origin.ResourceIsSharedCrossOrigin()->IsTrue()); |
| + } |
| + if (!origin.ResourceIsDebuggerScript().IsEmpty()) { |
| + script->set_is_debugger_script( |
| + origin.ResourceIsDebuggerScript()->IsTrue()); |
| } |
| source->info->set_script(script); |
| source->info->SetContext(isolate->native_context()); |
| @@ -1914,8 +1921,9 @@ ScriptOrigin Message::GetScriptOrigin() const { |
| Utils::ToLocal(scriptName), |
| v8::Integer::New(v8_isolate, script->line_offset()->value()), |
| v8::Integer::New(v8_isolate, script->column_offset()->value()), |
| - Handle<Boolean>(), |
| - v8::Integer::New(v8_isolate, script->id()->value())); |
| + v8::Boolean::New(v8_isolate, script->is_shared_cross_origin()), |
|
Yang
2015/01/28 14:02:04
This is great. I noticed that this is missing and
kozy
2015/01/29 10:52:56
Done.
|
| + v8::Integer::New(v8_isolate, script->id()->value()), |
| + v8::Boolean::New(v8_isolate, script->is_debugger_script())); |
| return origin; |
| } |