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

Unified Diff: src/compiler.cc

Issue 394793002: Verify that source string matches serialized code. (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
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index e95ed2625fd570f6de73567704d1fd0a70d57523..e81fc0a4706bb8eb93c063b862acce60277bd416 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -631,6 +631,7 @@ static void SetFunctionInfo(Handle<SharedFunctionInfo> function_info,
static bool CompileUnoptimizedCode(CompilationInfo* info) {
+ ASSERT(AllowCompilation::IsAllowed(info->isolate()));
ASSERT(info->function() != NULL);
if (!Rewriter::Rewrite(info)) return false;
if (!Scope::Analyze(info)) return false;
@@ -1196,6 +1197,7 @@ MaybeHandle<Code> Compiler::GetOptimizedCode(Handle<JSFunction> function,
SmartPointer<CompilationInfo> info(new CompilationInfoWithZone(function));
Isolate* isolate = info->isolate();
+ ASSERT(AllowCompilation::IsAllowed(isolate));
VMState<COMPILER> state(isolate);
ASSERT(!isolate->has_pending_exception());
PostponeInterruptsScope postpone(isolate);
« no previous file with comments | « src/assert-scope.h ('k') | src/objects.h » ('j') | test/cctest/test-serialize.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698