Changeset 60893 in webkit


Ignore:
Timestamp:
Jun 9, 2010 8:00:30 AM (14 years ago)
Author:
yurys@chromium.org
Message:

2010-06-09 Pavel Podivilov <podivilov@chromium.org>

Reviewed by Yury Semikhatsky.

Web Inspector: Add isDebuggerAlwaysEnabled method to ScriptDebugServer.
This method returns true if debugger should always be enabled when
frontend is attached.
https://bugs.webkit.org/show_bug.cgi?id=40289

  • bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::isDebuggerAlwaysEnabled):
  • bindings/js/ScriptDebugServer.h:
  • bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::isDebuggerAlwaysEnabled):
  • bindings/v8/ScriptDebugServer.h:
  • inspector/InspectorController.cpp: (WebCore::InspectorController::setFrontend):

2010-06-09 Pavel Podivilov <podivilov@chromium.org>

Reviewed by Yury Semikhatsky.

Web Inspector: retreive debugger script source synchronously when
frontend is attached. We need this to be able to stop on top-level
breakpoints.
https://bugs.webkit.org/show_bug.cgi?id=40289

  • WebKit.gypi:
  • src/DebuggerAgent.h:
  • src/DebuggerAgentImpl.cpp:
  • src/DebuggerAgentImpl.h:
  • src/WebDevToolsAgentImpl.cpp: (WebKit::WebDevToolsAgentImpl::createInspectorFrontendProxy):
  • src/js/DebuggerScript.js:
  • src/js/DevTools.js: (WebInspector.loaded):
  • src/js/DevToolsHostStub.js:
Location:
trunk
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r60889 r60893  
     12010-06-09  Pavel Podivilov  <podivilov@chromium.org>
     2
     3        Reviewed by Yury Semikhatsky.
     4
     5        Web Inspector: Add isDebuggerAlwaysEnabled method to ScriptDebugServer.
     6        This method returns true if debugger should always be enabled when
     7        frontend is attached.
     8        https://bugs.webkit.org/show_bug.cgi?id=40289
     9
     10        * bindings/js/ScriptDebugServer.cpp:
     11        (WebCore::ScriptDebugServer::isDebuggerAlwaysEnabled):
     12        * bindings/js/ScriptDebugServer.h:
     13        * bindings/v8/ScriptDebugServer.cpp:
     14        (WebCore::ScriptDebugServer::isDebuggerAlwaysEnabled):
     15        * bindings/v8/ScriptDebugServer.h:
     16        * inspector/InspectorController.cpp:
     17        (WebCore::InspectorController::setFrontend):
     18
    1192010-06-07  Ilya Tikhonovsky  <loislo@chromium.org>
    220
  • trunk/WebCore/bindings/js/ScriptDebugServer.cpp

    r60843 r60893  
    127127}
    128128
     129bool ScriptDebugServer::isDebuggerAlwaysEnabled()
     130{
     131    return false;
     132}
     133
    129134bool ScriptDebugServer::hasListenersInterestedInPage(Page* page)
    130135{
  • trunk/WebCore/bindings/js/ScriptDebugServer.h

    r60843 r60893  
    9292    void pageCreated(Page*);
    9393
     94    bool isDebuggerAlwaysEnabled();
     95
    9496private:
    9597    typedef HashSet<ScriptDebugListener*> ListenerSet;
  • trunk/WebCore/bindings/v8/ScriptDebugServer.cpp

    r60843 r60893  
    302302}
    303303
     304bool ScriptDebugServer::isDebuggerAlwaysEnabled()
     305{
     306    return true;
     307}
     308
    304309#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
    305310void ScriptDebugServer::v8DebugEventCallback(const v8::Debug::EventDetails& eventDetails)
  • trunk/WebCore/bindings/v8/ScriptDebugServer.h

    r60843 r60893  
    9595    PassRefPtr<JavaScriptCallFrame> currentCallFrame();
    9696
     97    bool isDebuggerAlwaysEnabled();
     98
    9799private:
    98100    ScriptDebugServer();
  • trunk/WebCore/inspector/InspectorController.cpp

    r60889 r60893  
    434434    if (m_timelineAgent)
    435435        m_timelineAgent->resetFrontendProxyObject(m_frontend.get());
    436 #if ENABLE(JAVASCRIPT_DEBUGGER) && USE(JSC)
    437     String debuggerEnabled = setting(debuggerEnabledSettingName);
    438     if (debuggerEnabled == "true")
    439         enableDebugger();
    440     String profilerEnabled = setting(profilerEnabledSettingName);
    441     if (profilerEnabled == "true")
    442         enableProfiler();
     436#if ENABLE(JAVASCRIPT_DEBUGGER)
     437    if (ScriptDebugServer::shared().isDebuggerAlwaysEnabled()) {
     438        // FIXME (40364): This will force pushing script sources to frontend even if script
     439        // panel is inactive.
     440        enableDebuggerFromFrontend(false);
     441    } else {
     442        String debuggerEnabled = setting(debuggerEnabledSettingName);
     443        if (debuggerEnabled == "true")
     444            enableDebugger();
     445        String profilerEnabled = setting(profilerEnabledSettingName);
     446        if (profilerEnabled == "true")
     447            enableProfiler();
     448    }
    443449#endif
    444450
  • trunk/WebKit/chromium/ChangeLog

    r60889 r60893  
     12010-06-09  Pavel Podivilov  <podivilov@chromium.org>
     2
     3        Reviewed by Yury Semikhatsky.
     4
     5        Web Inspector: retreive debugger script source synchronously when
     6        frontend is attached. We need this to be able to stop on top-level
     7        breakpoints.
     8        https://bugs.webkit.org/show_bug.cgi?id=40289
     9
     10        * WebKit.gypi:
     11        * src/DebuggerAgent.h:
     12        * src/DebuggerAgentImpl.cpp:
     13        * src/DebuggerAgentImpl.h:
     14        * src/WebDevToolsAgentImpl.cpp:
     15        (WebKit::WebDevToolsAgentImpl::createInspectorFrontendProxy):
     16        * src/js/DebuggerScript.js:
     17        * src/js/DevTools.js:
     18        (WebInspector.loaded):
     19        * src/js/DevToolsHostStub.js:
     20
    1212010-06-07  Ilya Tikhonovsky  <loislo@chromium.org>
    222
  • trunk/WebKit/chromium/WebKit.gypi

    r58253 r60893  
    3636            'src/js/InspectorControllerImpl.js',
    3737            'src/js/DebuggerAgent.js',
    38             'src/js/DebuggerScript.js',
    3938            'src/js/ProfilerAgent.js',
    4039            'src/js/ProfilerProcessor.js',
  • trunk/WebKit/chromium/src/DebuggerAgent.h

    r57701 r60893  
    4141    \
    4242    /* Request v8 to process all debug commands in the queue. */ \
    43     METHOD0(processDebugCommands) \
    44     \
    45     /* Push DebuggerScript.js content to the agent. */ \
    46     METHOD1(setDebuggerScriptSource, String)
     43    METHOD0(processDebugCommands)
    4744
    4845DEFINE_RPC_CLASS(DebuggerAgent, DEBUGGER_AGENT_STRUCT)
  • trunk/WebKit/chromium/src/DebuggerAgentImpl.cpp

    r57701 r60893  
    8080}
    8181
    82 void DebuggerAgentImpl::setDebuggerScriptSource(const String& source)
    83 {
    84     WebCore::ScriptDebugServer::shared().setDebuggerScriptSource(source);
    85 }
    86 
    8782void DebuggerAgentImpl::debuggerOutput(const String& command)
    8883{
  • trunk/WebKit/chromium/src/DebuggerAgentImpl.h

    r57701 r60893  
    6161    virtual void getContextId();
    6262    virtual void processDebugCommands();
    63     virtual void setDebuggerScriptSource(const String&);
    6463
    6564    void debuggerOutput(const WebCore::String& out);
  • trunk/WebKit/chromium/src/WebDevToolsAgentImpl.cpp

    r60889 r60893  
    463463    compileUtilityScripts();
    464464    initDevToolsAgentHost();
     465#if ENABLE(V8_SCRIPT_DEBUG_SERVER)
     466    WebCString debuggerScriptJs = m_client->debuggerScriptSource();
     467    WebCore::ScriptDebugServer::shared().setDebuggerScriptSource(
     468        WebCore::String(debuggerScriptJs.data(), debuggerScriptJs.length()));
     469#endif
    465470}
    466471
  • trunk/WebKit/chromium/src/js/DebuggerScript.js

    r60843 r60893  
    2929 */
    3030
    31 function debuggerScriptConstructor() {
     31(function () {
    3232
    3333var DebuggerScript = {};
     
    276276return DebuggerScript;
    277277
    278 }
     278})();
  • trunk/WebKit/chromium/src/js/DevTools.js

    r60843 r60893  
    186186    Preferences.canEditScriptSource = true;
    187187
    188     RemoteDebuggerAgent.setDebuggerScriptSource("(" + debuggerScriptConstructor + ")();");
    189  
    190188    oldLoaded.call(this);
    191189
  • trunk/WebKit/chromium/src/js/DevToolsHostStub.js

    r57701 r60893  
    5656
    5757
    58 RemoteDebuggerAgentStub.prototype.setDebuggerScriptSource = function(source)
    59 {
    60 };
    61 
    6258
    6359/**
Note: See TracChangeset for help on using the changeset viewer.