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

Unified Diff: Source/bindings/v8/ScriptController.h

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/ScriptController.h
diff --git a/Source/bindings/v8/ScriptController.h b/Source/bindings/v8/ScriptController.h
index ee68dd93d8adc47041e0e7204ce19739d31169c4..0c501fdc4eee472e231e97fe4a62942eea05893d 100644
--- a/Source/bindings/v8/ScriptController.h
+++ b/Source/bindings/v8/ScriptController.h
@@ -155,6 +155,11 @@ public:
static void registerExtensionIfNeeded(v8::Extension*);
static V8Extensions& registeredExtensions();
+ // Empty string disables preprocessing.
+ void setScriptPreprocessor(const String& preprocessorSource);
+ // Source to Source processing iff debugger enabled and preprocess loaded.
+ String preprocess(const String& scriptSource, const String& scriptName);
+
bool setContextDebugId(int);
static int contextDebugId(v8::Handle<v8::Context>);
@@ -187,6 +192,10 @@ private:
// pointer in this object is cleared out when the window object is
// destroyed.
NPObject* m_wrappedWindowScriptNPObject;
+
+ class ScriptPreprocessor;
+ String m_preprocessorSource;
+ OwnPtr<ScriptPreprocessor> m_scriptPreprocessor;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698