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

Unified Diff: src/compiler.cc

Issue 181113008: Revert "Remove Script::SetData and the script_data parameter from Script::(Compile|New)." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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.h ('k') | src/debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 3fd0c73687039aa76856c4401dc641d539270ab4..284919d5f228e2a92b531eb579b905389bce2355 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -927,6 +927,7 @@ Handle<SharedFunctionInfo> Compiler::CompileScript(Handle<String> source,
Handle<Context> context,
v8::Extension* extension,
ScriptDataImpl* pre_data,
+ Handle<Object> script_data,
NativesFlag natives) {
Isolate* isolate = source->GetIsolate();
int source_length = source->length();
@@ -968,6 +969,9 @@ Handle<SharedFunctionInfo> Compiler::CompileScript(Handle<String> source,
}
script->set_is_shared_cross_origin(is_shared_cross_origin);
+ script->set_data(script_data.is_null() ? isolate->heap()->undefined_value()
+ : *script_data);
+
// Compile the function and add it to the cache.
CompilationInfoWithZone info(script);
info.MarkAsGlobal();
« no previous file with comments | « src/compiler.h ('k') | src/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698