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

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: Partial response to review Created 7 years, 6 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 a96772be80cb144040b949999b098e043a13c80e..0e3b790b3ae2c4ba3918cdeb224cfcb502405e0d 100644
--- a/Source/bindings/v8/PageScriptDebugServer.cpp
+++ b/Source/bindings/v8/PageScriptDebugServer.cpp
@@ -65,6 +65,13 @@ static Frame* retrieveFrameWithGlobalObjectCheck(v8::Handle<v8::Context> context
return toFrameIfNotDetached(context);
}
+ScriptController* PageScriptDebugServer::scriptController(v8::Handle<v8::Context> context)
+{
+ Frame* frame = retrieveFrameWithGlobalObjectCheck(context);
+ if (frame)
+ return frame->page()->mainFrame()->script();
+}
+
PageScriptDebugServer& PageScriptDebugServer::shared()
{
DEFINE_STATIC_LOCAL(PageScriptDebugServer, server, ());

Powered by Google App Engine
This is Rietveld 408576698