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

Unified Diff: Source/bindings/v8/PageScriptDebugServer.cpp

Issue 13575004: Apply script preprocessor to Web page scripts only. (Closed) Base URL: https://chromium.googlesource.com/external/WebKit_trimmed.git@master
Patch Set: Rebase, simplify Created 7 years, 8 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: Source/bindings/v8/PageScriptDebugServer.cpp
diff --git a/Source/bindings/v8/PageScriptDebugServer.cpp b/Source/bindings/v8/PageScriptDebugServer.cpp
index 680f69d87a54f1d19472aca81063efba9af3c05b..d87f063dcff490bb2ba3d3d4ef81cdca150bfb09 100644
--- a/Source/bindings/v8/PageScriptDebugServer.cpp
+++ b/Source/bindings/v8/PageScriptDebugServer.cpp
@@ -166,6 +166,11 @@ void PageScriptDebugServer::runScript(ScriptState* state, const String& scriptId
ScriptDebugListener* PageScriptDebugServer::getDebugListenerForContext(v8::Handle<v8::Context> context)
{
v8::HandleScope scope;
+
+ // System-created contexts will crash retrieveFrameWithGlobalCheck
+ if (V8PerContextDebugData::contextDebugId(context) < 0)
+ return 0;
+
Frame* frame = retrieveFrameWithGlobalObjectCheck(context);
if (!frame)
return 0;

Powered by Google App Engine
This is Rietveld 408576698