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

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: 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/PageScriptDebugServer.cpp ('k') | Source/bindings/v8/ScriptController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/ScriptController.h
diff --git a/Source/bindings/v8/ScriptController.h b/Source/bindings/v8/ScriptController.h
index a2bd844826954e64bf0590397d050138c2836cfa..97b56d53421576edc89ef5fedd8facfc9eb23cee 100644
--- a/Source/bindings/v8/ScriptController.h
+++ b/Source/bindings/v8/ScriptController.h
@@ -51,6 +51,8 @@ class Frame;
class HTMLDocument;
class HTMLPlugInElement;
class KURL;
+class ScriptDebugServer;
+class ScriptPreprocessor;
class ScriptSourceCode;
class ScriptState;
class SecurityOrigin;
@@ -64,10 +66,6 @@ enum ReasonForCallingCanExecuteScripts {
NotAboutToExecuteScript
};
-enum IsolatedWorldConstants {
- EmbedderWorldIdLimit = (1 << 29)
-};
-
class ScriptController {
public:
ScriptController(Frame*);
@@ -159,6 +157,12 @@ public:
static void registerExtensionIfNeeded(v8::Extension*);
static V8Extensions& registeredExtensions();
+ void setScriptPreprocessor(const String& preprocessorSource);
+ void clearScriptPreprocessor();
+ // Source to Source processing iff debugger enabled and it has loaded a preprocessor.
+ String preprocess(const String& scriptSource, const String& scriptName);
+ void preprocessEval(ScriptDebugServer* , v8::Handle<v8::Object> eventData);
+
bool setContextDebugId(int);
static int contextDebugId(v8::Handle<v8::Context>);
@@ -184,6 +188,11 @@ private:
PluginObjectMap m_pluginObjects;
NPObject* m_windowScriptNPObject;
+
+ // Set by the PageDebuggerAgent on reload
+ String m_preprocessorSource;
+ // Set on the first JS compilation after m_preprocessorSource is set.
+ OwnPtr<ScriptPreprocessor> m_scriptPreprocessor;
};
} // namespace WebCore
« no previous file with comments | « Source/bindings/v8/PageScriptDebugServer.cpp ('k') | Source/bindings/v8/ScriptController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698