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

Unified Diff: src/compiler.cc

Issue 390303002: Do not dump user source code in the code serializer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/assembler.h ('k') | src/serialize.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 117b4c6d3178e65db0a87fc4bb1bcdb38384bdfc..e95ed2625fd570f6de73567704d1fd0a70d57523 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -967,8 +967,7 @@ Handle<SharedFunctionInfo> Compiler::CompileScript(
is_shared_cross_origin, context);
if (maybe_result.is_null() && FLAG_serialize_toplevel &&
cached_data_mode == CONSUME_CACHED_DATA) {
- Object* des = CodeSerializer::Deserialize(isolate, *cached_data);
- return handle(SharedFunctionInfo::cast(des), isolate);
+ return CodeSerializer::Deserialize(isolate, *cached_data, source);
}
}
@@ -1002,7 +1001,7 @@ Handle<SharedFunctionInfo> Compiler::CompileScript(
if (extension == NULL && !result.is_null() && !result->dont_cache()) {
compilation_cache->PutScript(source, context, result);
if (FLAG_serialize_toplevel && cached_data_mode == PRODUCE_CACHED_DATA) {
- *cached_data = CodeSerializer::Serialize(result);
+ *cached_data = CodeSerializer::Serialize(isolate, result, source);
}
}
if (result.is_null()) isolate->ReportPendingMessages();
« no previous file with comments | « src/assembler.h ('k') | src/serialize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698