[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756

yurys at chromium.org yurys at chromium.org
Fri Feb 26 22:16:42 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 88ef7e4cf2587846d760bce7c90a57047b1ca8bb
Author: yurys at chromium.org <yurys at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Feb 10 10:25:47 2010 +0000

    2010-02-10  Yury Semikhatsky  <yurys at chromium.org>
    
            Reviewed by Pavel Feldman.
    
            Use v8::Debug::ProcessDebugMessages instead of executing an empty function
    
            https://bugs.webkit.org/show_bug.cgi?id=34704
    
            * src/DebuggerAgent.h:
            * src/DebuggerAgentImpl.cpp:
            (WebKit::DebuggerAgentImpl::processDebugCommands):
            * src/DebuggerAgentImpl.h:
            * src/ToolsAgent.h:
            * src/WebDevToolsAgentImpl.cpp:
            * src/WebDevToolsAgentImpl.h:
            * src/js/DebuggerAgent.js:
            (devtools.DebuggerAgent.prototype.addBreakpoint):
            * src/js/DevToolsHostStub.js:
            (.RemoteDebuggerAgentStub.prototype.processDebugCommands):
            * src/js/InjectDispatch.js:
            (dispatch):
            * src/js/ProfilerAgent.js:
            (devtools.ProfilerAgent.prototype.startProfiling):
            (devtools.ProfilerAgent.prototype.stopProfiling):
            * src/js/Tests.js:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54592 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index c3fca1d..e9e14b9 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,29 @@
+2010-02-10  Yury Semikhatsky  <yurys at chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Use v8::Debug::ProcessDebugMessages instead of executing an empty function
+
+        https://bugs.webkit.org/show_bug.cgi?id=34704
+
+        * src/DebuggerAgent.h:
+        * src/DebuggerAgentImpl.cpp:
+        (WebKit::DebuggerAgentImpl::processDebugCommands):
+        * src/DebuggerAgentImpl.h:
+        * src/ToolsAgent.h:
+        * src/WebDevToolsAgentImpl.cpp:
+        * src/WebDevToolsAgentImpl.h:
+        * src/js/DebuggerAgent.js:
+        (devtools.DebuggerAgent.prototype.addBreakpoint):
+        * src/js/DevToolsHostStub.js:
+        (.RemoteDebuggerAgentStub.prototype.processDebugCommands):
+        * src/js/InjectDispatch.js:
+        (dispatch):
+        * src/js/ProfilerAgent.js:
+        (devtools.ProfilerAgent.prototype.startProfiling):
+        (devtools.ProfilerAgent.prototype.stopProfiling):
+        * src/js/Tests.js:
+
 2010-02-10  Tony Chang  <tony at chromium.org>
 
         Unreviewed, build fix for Chromium Mac take 2.
diff --git a/WebKit/chromium/src/DebuggerAgent.h b/WebKit/chromium/src/DebuggerAgent.h
index cac9686..17cde11 100644
--- a/WebKit/chromium/src/DebuggerAgent.h
+++ b/WebKit/chromium/src/DebuggerAgent.h
@@ -37,7 +37,10 @@ namespace WebKit {
 
 #define DEBUGGER_AGENT_STRUCT(METHOD0, METHOD1, METHOD2, METHOD3, METHOD4, METHOD5) \
     /* Requests global context id of the inspected tab. */ \
-    METHOD0(getContextId)
+    METHOD0(getContextId) \
+    \
+    /* Request v8 to process all debug commands in the queue. */ \
+    METHOD0(processDebugCommands)
 
 DEFINE_RPC_CLASS(DebuggerAgent, DEBUGGER_AGENT_STRUCT)
 
diff --git a/WebKit/chromium/src/DebuggerAgentImpl.cpp b/WebKit/chromium/src/DebuggerAgentImpl.cpp
index ad8bfb4..1acacc1 100644
--- a/WebKit/chromium/src/DebuggerAgentImpl.cpp
+++ b/WebKit/chromium/src/DebuggerAgentImpl.cpp
@@ -79,6 +79,12 @@ void DebuggerAgentImpl::getContextId()
     m_delegate->setContextId(m_webdevtoolsAgent->hostId());
 }
 
+void DebuggerAgentImpl::processDebugCommands()
+{
+    DebuggerAgentManager::UtilityContextScope utilityScope;
+    v8::Debug::ProcessDebugMessages();
+}
+
 void DebuggerAgentImpl::debuggerOutput(const String& command)
 {
     m_delegate->debuggerOutput(command);
@@ -179,22 +185,6 @@ String DebuggerAgentImpl::executeUtilityFunction(
     return WebCore::toWebCoreStringWithNullCheck(resObj);
 }
 
-void DebuggerAgentImpl::executeVoidJavaScript(v8::Handle<v8::Context> context)
-{
-    v8::HandleScope scope;
-    ASSERT(!context.IsEmpty());
-    v8::Context::Scope contextScope(context);
-    DebuggerAgentManager::UtilityContextScope utilityScope;
-
-    v8::Handle<v8::Value> function =
-        context->Global()->Get(v8::String::New("devtools$$void"));
-    ASSERT(function->IsFunction());
-    v8::Handle<v8::Value> args[] = {
-        v8::Local<v8::Value>()
-    };
-    v8::Handle<v8::Function>::Cast(function)->Call(context->Global(), 0, args);
-}
-
 WebCore::Page* DebuggerAgentImpl::page()
 {
     return m_webViewImpl->page();
diff --git a/WebKit/chromium/src/DebuggerAgentImpl.h b/WebKit/chromium/src/DebuggerAgentImpl.h
index 65dc14c..6eaf576 100644
--- a/WebKit/chromium/src/DebuggerAgentImpl.h
+++ b/WebKit/chromium/src/DebuggerAgentImpl.h
@@ -62,6 +62,7 @@ public:
 
     // DebuggerAgent implementation.
     virtual void getContextId();
+    virtual void processDebugCommands();
 
     void debuggerOutput(const WebCore::String& out);
 
@@ -81,10 +82,6 @@ public:
         bool async,
         WebCore::String* exception);
 
-    // Executes a no-op function in the utility context. We don't use
-    // executeUtilityFunction for that to avoid script evaluation leading to
-    // undesirable AfterCompile events.
-    void executeVoidJavaScript(v8::Handle<v8::Context> context);
 
     WebCore::Page* page();
     WebDevToolsAgentImpl* webdevtoolsAgent() { return m_webdevtoolsAgent; }
diff --git a/WebKit/chromium/src/ToolsAgent.h b/WebKit/chromium/src/ToolsAgent.h
index fd1fcb7..ab48153 100644
--- a/WebKit/chromium/src/ToolsAgent.h
+++ b/WebKit/chromium/src/ToolsAgent.h
@@ -38,9 +38,6 @@ namespace WebKit {
 // Tools agent provides API for enabling / disabling other agents as well as
 // API for auxiliary UI functions such as dom elements highlighting.
 #define TOOLS_AGENT_STRUCT(METHOD0, METHOD1, METHOD2, METHOD3, METHOD4, METHOD5) \
-    /* Request the agent to to run a no-op JavaScript function to trigger v8 execution. */ \
-    METHOD0(executeVoidJavaScript) \
-    \
     /* Dispatches given function on the InspectorController object */ \
     METHOD3(dispatchOnInspectorController, int /* call_id */, \
         String /* function_name */, String /* json_args */) \
diff --git a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp b/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
index 4b60f7f..9ce35b4 100644
--- a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
+++ b/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
@@ -265,11 +265,6 @@ void WebDevToolsAgentImpl::dispatchOnInjectedScript(int callId, int injectedScri
         async);
 }
 
-void WebDevToolsAgentImpl::executeVoidJavaScript()
-{
-    m_debuggerAgentImpl->executeVoidJavaScript(m_utilityContext);
-}
-
 void WebDevToolsAgentImpl::dispatchMessageFromFrontend(const WebDevToolsMessageData& data)
 {
     if (ToolsAgentDispatch::dispatch(this, data))
diff --git a/WebKit/chromium/src/WebDevToolsAgentImpl.h b/WebKit/chromium/src/WebDevToolsAgentImpl.h
index 3f5928b..1f81c6d 100644
--- a/WebKit/chromium/src/WebDevToolsAgentImpl.h
+++ b/WebKit/chromium/src/WebDevToolsAgentImpl.h
@@ -70,7 +70,6 @@ public:
     // ToolsAgent implementation.
     virtual void dispatchOnInspectorController(int callId, const WebCore::String& functionName, const WebCore::String& jsonArgs);
     virtual void dispatchOnInjectedScript(int callId, int injectedScriptId, const WebCore::String& functionName, const WebCore::String& jsonArgs, bool async);
-    virtual void executeVoidJavaScript();
 
     // WebDevToolsAgentPrivate implementation.
     virtual void didClearWindowObject(WebFrameImpl* frame);
diff --git a/WebKit/chromium/src/js/DebuggerAgent.js b/WebKit/chromium/src/js/DebuggerAgent.js
index baf5ecb..301620a 100644
--- a/WebKit/chromium/src/js/DebuggerAgent.js
+++ b/WebKit/chromium/src/js/DebuggerAgent.js
@@ -208,7 +208,7 @@ devtools.DebuggerAgent.prototype.resolveScriptSource = function(scriptId, callba
     });
     devtools.DebuggerAgent.sendCommand_(cmd);
     // Force v8 execution so that it gets to processing the requested command.
-    RemoteToolsAgent.executeVoidJavaScript();
+    RemoteDebuggerAgent.processDebugCommands();
 
     this.requestSeqToCallback_[cmd.getSequenceNumber()] = function(msg) {
         if (msg.isSuccess()) {
@@ -290,7 +290,7 @@ devtools.DebuggerAgent.prototype.addBreakpoint = function(sourceId, line, condit
     // Force v8 execution so that it gets to processing the requested command.
     // It is necessary for being able to change a breakpoint just after it
     // has been created (since we need an existing breakpoint id for that).
-    RemoteToolsAgent.executeVoidJavaScript();
+    RemoteDebuggerAgent.processDebugCommands();
 };
 
 
@@ -749,7 +749,7 @@ devtools.DebuggerAgent.prototype.setContextId_ = function(contextId)
         });
         devtools.DebuggerAgent.sendCommand_(cmd);
         // Force v8 execution so that it gets to processing the requested command.
-        RemoteToolsAgent.executeVoidJavaScript();
+        RemoteDebuggerAgent.processDebugCommands();
 
         var debuggerAgent = this;
         this.requestSeqToCallback_[cmd.getSequenceNumber()] = function(msg) {
diff --git a/WebKit/chromium/src/js/DevToolsHostStub.js b/WebKit/chromium/src/js/DevToolsHostStub.js
index 2ee15f8..8b2f46b 100644
--- a/WebKit/chromium/src/js/DevToolsHostStub.js
+++ b/WebKit/chromium/src/js/DevToolsHostStub.js
@@ -50,6 +50,11 @@ RemoteDebuggerAgentStub.prototype.getContextId = function()
 };
 
 
+RemoteDebuggerAgentStub.prototype.processDebugCommands = function()
+{
+};
+
+
 /**
  * @constructor
  */
@@ -88,11 +93,6 @@ RemoteToolsAgentStub.prototype.dispatchOnInspectorController = function()
 };
 
 
-RemoteToolsAgentStub.prototype.executeVoidJavaScript = function()
-{
-};
-
-
 /**
  * @constructor
  */
diff --git a/WebKit/chromium/src/js/InjectDispatch.js b/WebKit/chromium/src/js/InjectDispatch.js
index 1c2cba2..e070c42 100644
--- a/WebKit/chromium/src/js/InjectDispatch.js
+++ b/WebKit/chromium/src/js/InjectDispatch.js
@@ -104,10 +104,3 @@ function dispatch(method, var_args) {
     var call = JSON.stringify(args);
     DevToolsAgentHost.dispatch(call);
 };
-
-/**
- * A no-op function that is called by debugger agent just to trigger v8
- * execution.
- */
-function devtools$$void() {
-}
diff --git a/WebKit/chromium/src/js/ProfilerAgent.js b/WebKit/chromium/src/js/ProfilerAgent.js
index 024030b..611689e 100644
--- a/WebKit/chromium/src/js/ProfilerAgent.js
+++ b/WebKit/chromium/src/js/ProfilerAgent.js
@@ -144,7 +144,7 @@ devtools.ProfilerAgent.prototype.startProfiling = function(modules)
         "modules": modules,
         "command": "resume"});
     devtools.DebuggerAgent.sendCommand_(cmd);
-    RemoteToolsAgent.executeVoidJavaScript();
+    RemoteDebuggerAgent.processDebugCommands();
     if (modules & devtools.ProfilerAgent.ProfilerModules.PROFILER_MODULE_HEAP_SNAPSHOT) {
         var pos = this.logPosition_;
         // Active modules will not change, instead, a snapshot will be logged.
@@ -162,7 +162,7 @@ devtools.ProfilerAgent.prototype.stopProfiling = function(modules)
         "modules": modules,
         "command": "pause"});
     devtools.DebuggerAgent.sendCommand_(cmd);
-    RemoteToolsAgent.executeVoidJavaScript();
+    RemoteDebuggerAgent.processDebugCommands();
 };
 
 
diff --git a/WebKit/chromium/src/js/Tests.js b/WebKit/chromium/src/js/Tests.js
index 2405aee..fa0c99f 100644
--- a/WebKit/chromium/src/js/Tests.js
+++ b/WebKit/chromium/src/js/Tests.js
@@ -613,7 +613,7 @@ TestSuite.prototype.testSetBreakpoint = function()
               function(view, url) {
                 view._addBreakpoint(breakpointLine);
                 // Force v8 execution.
-                RemoteToolsAgent.executeVoidJavaScript();
+                RemoteDebuggerAgent.processDebugCommands();
                 test.waitForSetBreakpointResponse_(url, breakpointLine,
                     function() {
                         test.releaseControl();
@@ -869,7 +869,7 @@ TestSuite.prototype.testEvalOnCallFrame = function()
               function(view, url) {
                   view._addBreakpoint(breakpointLine);
                   // Force v8 execution.
-                  RemoteToolsAgent.executeVoidJavaScript();
+                  RemoteDebuggerAgent.processDebugCommands();
                   test.waitForSetBreakpointResponse_(url, breakpointLine, setBreakpointCallback);
               });
         });

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list