Index: src/d8.cc |
diff --git a/src/d8.cc b/src/d8.cc |
index 564aafe0050263b5128c1693ac9a0845bd2fab1e..f566f3473958f2439c6a21a8fe087d3f988a6c6b 100644 |
--- a/src/d8.cc |
+++ b/src/d8.cc |
@@ -205,7 +205,9 @@ bool Shell::ExecuteString(Isolate* isolate, |
// When debugging make exceptions appear to be uncaught. |
try_catch.SetVerbose(true); |
} |
- Handle<Script> script = Script::New(source, name); |
+ ScriptOrigin origin(name); |
+ Handle<ContextUnboundScript> script = ScriptCompiler::CompileContextUnbound( |
+ isolate, ScriptCompiler::Source(source, origin)); |
if (script.IsEmpty()) { |
// Print errors that happened during compilation. |
if (report_exceptions && !FLAG_debugger) |
@@ -405,7 +407,8 @@ void Shell::RealmEval(const v8::FunctionCallbackInfo<v8::Value>& args) { |
Throw(args.GetIsolate(), "Invalid argument"); |
return; |
} |
- Handle<Script> script = Script::New(args[1]->ToString()); |
+ Handle<ContextUnboundScript> script = ScriptCompiler::CompileContextUnbound( |
+ isolate, ScriptCompiler::Source(args[1]->ToString())); |
if (script.IsEmpty()) return; |
Local<Context> realm = Local<Context>::New(isolate, data->realms_[index]); |
realm->Enter(); |
@@ -806,7 +809,8 @@ void Shell::InstallUtilityScript(Isolate* isolate) { |
Handle<String> name = |
String::NewFromUtf8(isolate, shell_source_name.start(), |
String::kNormalString, shell_source_name.length()); |
- Handle<Script> script = Script::Compile(source, name); |
+ ScriptOrigin origin(name); |
+ Handle<Script> script = Script::Compile(source, &origin); |
script->Run(); |
// Mark the d8 shell script as native to avoid it showing up as normal source |
// in the debugger. |