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

Unified Diff: src/api.cc

Issue 796823002: Disable generating of code cache if the debugger is loaded (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 6 years 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 | « no previous file | src/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index a7ff337f7acda76c5475620fa697bd8e9317d0f5..5bef79f2c0ff426662cbd2ed0d7676fa73649c31 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -1584,6 +1584,12 @@ Local<UnboundScript> ScriptCompiler::CompileUnbound(
options = kConsumeParserCache;
}
+ // Don't try to produce any kind of cache when the debugger is loaded.
+ if (isolate->debug()->is_loaded() &&
+ (options == kProduceParserCache || options == kProduceCodeCache)) {
+ options = kNoCompileOptions;
+ }
+
i::ScriptData* script_data = NULL;
if (options == kConsumeParserCache || options == kConsumeCodeCache) {
DCHECK(source->cached_data);
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698