Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Unified Diff: src/d8.cc

Issue 203353002: New compilation API, part 2. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler.cc ('k') | src/debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index 539ebaae755534ea1bbb8050c627c1368b2f844b..d0711056e1bf80066908697aaff1a9729d4c3cb3 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -206,8 +206,9 @@ bool Shell::ExecuteString(Isolate* isolate,
try_catch.SetVerbose(true);
}
ScriptOrigin origin(name);
- Handle<UnboundScript> script = ScriptCompiler::CompileUnbound(
- isolate, ScriptCompiler::Source(source, origin));
+ ScriptCompiler::Source script_source(source, origin);
+ Handle<UnboundScript> script =
+ ScriptCompiler::CompileUnbound(isolate, &script_source);
if (script.IsEmpty()) {
// Print errors that happened during compilation.
if (report_exceptions && !FLAG_debugger)
@@ -407,8 +408,9 @@ void Shell::RealmEval(const v8::FunctionCallbackInfo<v8::Value>& args) {
Throw(args.GetIsolate(), "Invalid argument");
return;
}
+ ScriptCompiler::Source script_source(args[1]->ToString());
Handle<UnboundScript> script = ScriptCompiler::CompileUnbound(
- isolate, ScriptCompiler::Source(args[1]->ToString()));
+ isolate, &script_source);
if (script.IsEmpty()) return;
Local<Context> realm = Local<Context>::New(isolate, data->realms_[index]);
realm->Enter();
« no previous file with comments | « src/compiler.cc ('k') | src/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698