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

Unified Diff: Source/core/inspector/PageDebuggerAgent.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 Created 7 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 | « Source/bindings/v8/V8LazyEventListener.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/PageDebuggerAgent.cpp
diff --git a/Source/core/inspector/PageDebuggerAgent.cpp b/Source/core/inspector/PageDebuggerAgent.cpp
index 72bd983efa425e8384062f4341f8320a1a9c427d..1bbb03aa3eea2d6a601733d026dab2d378675544 100644
--- a/Source/core/inspector/PageDebuggerAgent.cpp
+++ b/Source/core/inspector/PageDebuggerAgent.cpp
@@ -33,9 +33,11 @@
#include "bindings/v8/DOMWrapperWorld.h"
#include "bindings/v8/PageScriptDebugServer.h"
+#include "bindings/v8/ScriptController.h"
#include "core/inspector/InspectorOverlay.h"
#include "core/inspector/InspectorPageAgent.h"
#include "core/inspector/InstrumentingAgents.h"
+#include "core/page/Frame.h"
#include "core/page/Page.h"
#include "core/page/PageConsole.h"
@@ -136,7 +138,10 @@ void PageDebuggerAgent::didClearWindowObjectInWorld(Frame* frame, DOMWrapperWorl
return;
reset();
- scriptDebugServer().setScriptPreprocessor(m_pageAgent->scriptPreprocessor());
+
+ // ScriptController::clearWindowShell() clears its ScriptPreprocessor before didClearWindowObjectInWorld is dispatched.
+ if (!m_pageAgent->scriptPreprocessor().isEmpty())
+ frame->script()->setScriptPreprocessor(m_pageAgent->scriptPreprocessor());
}
} // namespace WebCore
« no previous file with comments | « Source/bindings/v8/V8LazyEventListener.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698