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

Unified Diff: src/compiler.cc

Issue 608013: Enable passing of script data via script creation methods. (Closed)
Patch Set: Created 10 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/number-info.h » ('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 29a48a0e57b8aa8f3aff514e5bcf3b2e46e1b1b0..62024310f1163015c8002411e28a91f959fada95 100755
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -237,7 +237,8 @@ Handle<JSFunction> Compiler::Compile(Handle<String> source,
Handle<Object> script_name,
int line_offset, int column_offset,
v8::Extension* extension,
- ScriptDataImpl* input_pre_data) {
+ ScriptDataImpl* input_pre_data,
+ Handle<Object> script_data) {
int source_length = source->length();
Counters::total_load_size.Increment(source_length);
Counters::total_compile_size.Increment(source_length);
@@ -271,6 +272,9 @@ Handle<JSFunction> Compiler::Compile(Handle<String> source,
script->set_column_offset(Smi::FromInt(column_offset));
}
+ script->set_data(script_data.is_null() ? Heap::undefined_value()
+ : *script_data);
+
// Compile the function and add it to the cache.
result = MakeFunction(true,
false,
« no previous file with comments | « src/compiler.h ('k') | src/number-info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698