Changeset 79858 in webkit


Ignore:
Timestamp:
Feb 28, 2011 6:49:33 AM (13 years ago)
Author:
yurys@chromium.org
Message:

2011-02-28 Yury Semikhatsky <yurys@chromium.org>

Reviewed by Pavel Feldman.

Web Inspector: debugger agents should have same livetime as InspectorAgent
https://bugs.webkit.org/show_bug.cgi?id=55369

  • inspector/report-protocol-errors-expected.txt:
  • inspector/report-protocol-errors.html:

2011-02-28 Yury Semikhatsky <yurys@chromium.org>

Reviewed by Pavel Feldman.

Web Inspector: debugger agents should have same livetime as InspectorAgent
https://bugs.webkit.org/show_bug.cgi?id=55369

DOM and JS debugger agents are now created in InspectorAgent's constructor and owned
by the agent. Debugger state is cleared on frontend disconnect.

  • inspector/Inspector.idl:
  • inspector/InspectorAgent.cpp: (WebCore::InspectorAgent::InspectorAgent): (WebCore::InspectorAgent::restoreInspectorStateFromCookie): (WebCore::InspectorAgent::setFrontend): (WebCore::InspectorAgent::disconnectFrontend): (WebCore::InspectorAgent::populateScriptObjects): (WebCore::InspectorAgent::didCommitLoad): (WebCore::InspectorAgent::showScriptsPanel):
  • inspector/InspectorAgent.h:
  • inspector/InspectorBrowserDebuggerAgent.cpp: (WebCore::InspectorBrowserDebuggerAgent::create): (WebCore::InspectorBrowserDebuggerAgent::InspectorBrowserDebuggerAgent): (WebCore::InspectorBrowserDebuggerAgent::~InspectorBrowserDebuggerAgent): (WebCore::InspectorBrowserDebuggerAgent::debuggerWasEnabled): (WebCore::InspectorBrowserDebuggerAgent::debuggerWasDisabled): (WebCore::InspectorBrowserDebuggerAgent::disable): (WebCore::InspectorBrowserDebuggerAgent::setFrontend): (WebCore::InspectorBrowserDebuggerAgent::clearFrontend): (WebCore::InspectorBrowserDebuggerAgent::setAllBrowserBreakpoints): (WebCore::InspectorBrowserDebuggerAgent::inspectedURLChanged): (WebCore::InspectorBrowserDebuggerAgent::setDOMBreakpoint): (WebCore::InspectorBrowserDebuggerAgent::removeDOMBreakpoint): (WebCore::InspectorBrowserDebuggerAgent::willInsertDOMNode): (WebCore::InspectorBrowserDebuggerAgent::willRemoveDOMNode): (WebCore::InspectorBrowserDebuggerAgent::willModifyDOMAttr): (WebCore::InspectorBrowserDebuggerAgent::descriptionForDOMEvent): (WebCore::InspectorBrowserDebuggerAgent::pauseOnNativeEventIfNeeded): (WebCore::InspectorBrowserDebuggerAgent::willSendXMLHttpRequest): (WebCore::InspectorBrowserDebuggerAgent::clear):
  • inspector/InspectorBrowserDebuggerAgent.h:
  • inspector/InspectorController.cpp: (WebCore::InspectorController::debuggerEnabled): (WebCore::InspectorController::showAndEnableDebugger): (WebCore::InspectorController::disableDebugger):
  • inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::create): (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent): (WebCore::InspectorDebuggerAgent::~InspectorDebuggerAgent): (WebCore::InspectorDebuggerAgent::startUserInitiatedDebugging): (WebCore::InspectorDebuggerAgent::enable): (WebCore::InspectorDebuggerAgent::disable): (WebCore::InspectorDebuggerAgent::enabled): (WebCore::InspectorDebuggerAgent::restore): (WebCore::InspectorDebuggerAgent::setFrontend): (WebCore::InspectorDebuggerAgent::clearFrontend): (WebCore::InspectorDebuggerAgent::setJavaScriptBreakpoint): (WebCore::InspectorDebuggerAgent::removeJavaScriptBreakpoint): (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame): (WebCore::InspectorDebuggerAgent::getCompletionsOnCallFrame): (WebCore::InspectorDebuggerAgent::currentCallFrames): (WebCore::InspectorDebuggerAgent::didParseSource): (WebCore::InspectorDebuggerAgent::clear):
  • inspector/InspectorDebuggerAgent.h: (WebCore::InspectorDebuggerAgent::enable): (WebCore::InspectorDebuggerAgent::disable): (WebCore::InspectorDebuggerAgent::Listener::~Listener): (WebCore::InspectorDebuggerAgent::setListener):
  • inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::willInsertDOMNodeImpl): (WebCore::InspectorInstrumentation::didInsertDOMNodeImpl): (WebCore::InspectorInstrumentation::willRemoveDOMNodeImpl): (WebCore::InspectorInstrumentation::didRemoveDOMNodeImpl): (WebCore::InspectorInstrumentation::willModifyDOMAttrImpl): (WebCore::InspectorInstrumentation::willSendXMLHttpRequestImpl): (WebCore::InspectorInstrumentation::pauseOnNativeEventIfNeeded):
  • inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.enableDebugger): (WebInspector.DebuggerModel.prototype.disableDebugger):
Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r79857 r79858  
     12011-02-28  Yury Semikhatsky  <yurys@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Web Inspector: debugger agents should have same livetime as InspectorAgent
     6        https://bugs.webkit.org/show_bug.cgi?id=55369
     7
     8        * inspector/report-protocol-errors-expected.txt:
     9        * inspector/report-protocol-errors.html:
     10
    1112011-02-28  Pavel Feldman  <pfeldman@chromium.org>
    212
  • trunk/LayoutTests/inspector/report-protocol-errors-expected.txt

    r74785 r79858  
    7979    }
    8080}
    81 {
    82     seq : 6
    83     domain : "Debugger"
    84     success : false
    85     errors : {
    86         0 : "Protocol Error: Debugger handler is not available."
    87         1 : "Protocol Error: Argument 'breakpointId' with type 'String' was not found."
    88     }
    89 }
    90 {
    91     seq : 7
    92     domain : "Debugger"
    93     success : false
    94     errors : {
    95         0 : "Protocol Error: Debugger handler is not available."
    96     }
    97 }
    9881
  • trunk/LayoutTests/inspector/report-protocol-errors.html

    r78717 r79858  
    1717        '{"seq":4,"command":"resourceContent","arguments":{}}',
    1818        '{"seq":5,"command":"resourceContent","arguments":{"identifier":"not a number"}}',
    19         '{"seq":6,"command":"removeJavaScriptBreakpoint","arguments":{}}',
    20         '{"seq":7,"command":"removeJavaScriptBreakpoint","arguments":{"breakpointId":"someBreakpointId"}}',
    2119    ];
    2220    var numberOfReports = 0;
     
    3634    }
    3735
    38     InspectorAgent.disableDebugger(fire);
     36    DebuggerAgent.disable(fire);
    3937}
    4038
  • trunk/Source/WebCore/ChangeLog

    r79856 r79858  
     12011-02-28  Yury Semikhatsky  <yurys@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Web Inspector: debugger agents should have same livetime as InspectorAgent
     6        https://bugs.webkit.org/show_bug.cgi?id=55369
     7
     8        DOM and JS debugger agents are now created in InspectorAgent's constructor and owned
     9        by the agent. Debugger state is cleared on frontend disconnect.
     10
     11        * inspector/Inspector.idl:
     12        * inspector/InspectorAgent.cpp:
     13        (WebCore::InspectorAgent::InspectorAgent):
     14        (WebCore::InspectorAgent::restoreInspectorStateFromCookie):
     15        (WebCore::InspectorAgent::setFrontend):
     16        (WebCore::InspectorAgent::disconnectFrontend):
     17        (WebCore::InspectorAgent::populateScriptObjects):
     18        (WebCore::InspectorAgent::didCommitLoad):
     19        (WebCore::InspectorAgent::showScriptsPanel):
     20        * inspector/InspectorAgent.h:
     21        * inspector/InspectorBrowserDebuggerAgent.cpp:
     22        (WebCore::InspectorBrowserDebuggerAgent::create):
     23        (WebCore::InspectorBrowserDebuggerAgent::InspectorBrowserDebuggerAgent):
     24        (WebCore::InspectorBrowserDebuggerAgent::~InspectorBrowserDebuggerAgent):
     25        (WebCore::InspectorBrowserDebuggerAgent::debuggerWasEnabled):
     26        (WebCore::InspectorBrowserDebuggerAgent::debuggerWasDisabled):
     27        (WebCore::InspectorBrowserDebuggerAgent::disable):
     28        (WebCore::InspectorBrowserDebuggerAgent::setFrontend):
     29        (WebCore::InspectorBrowserDebuggerAgent::clearFrontend):
     30        (WebCore::InspectorBrowserDebuggerAgent::setAllBrowserBreakpoints):
     31        (WebCore::InspectorBrowserDebuggerAgent::inspectedURLChanged):
     32        (WebCore::InspectorBrowserDebuggerAgent::setDOMBreakpoint):
     33        (WebCore::InspectorBrowserDebuggerAgent::removeDOMBreakpoint):
     34        (WebCore::InspectorBrowserDebuggerAgent::willInsertDOMNode):
     35        (WebCore::InspectorBrowserDebuggerAgent::willRemoveDOMNode):
     36        (WebCore::InspectorBrowserDebuggerAgent::willModifyDOMAttr):
     37        (WebCore::InspectorBrowserDebuggerAgent::descriptionForDOMEvent):
     38        (WebCore::InspectorBrowserDebuggerAgent::pauseOnNativeEventIfNeeded):
     39        (WebCore::InspectorBrowserDebuggerAgent::willSendXMLHttpRequest):
     40        (WebCore::InspectorBrowserDebuggerAgent::clear):
     41        * inspector/InspectorBrowserDebuggerAgent.h:
     42        * inspector/InspectorController.cpp:
     43        (WebCore::InspectorController::debuggerEnabled):
     44        (WebCore::InspectorController::showAndEnableDebugger):
     45        (WebCore::InspectorController::disableDebugger):
     46        * inspector/InspectorDebuggerAgent.cpp:
     47        (WebCore::InspectorDebuggerAgent::create):
     48        (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
     49        (WebCore::InspectorDebuggerAgent::~InspectorDebuggerAgent):
     50        (WebCore::InspectorDebuggerAgent::startUserInitiatedDebugging):
     51        (WebCore::InspectorDebuggerAgent::enable):
     52        (WebCore::InspectorDebuggerAgent::disable):
     53        (WebCore::InspectorDebuggerAgent::enabled):
     54        (WebCore::InspectorDebuggerAgent::restore):
     55        (WebCore::InspectorDebuggerAgent::setFrontend):
     56        (WebCore::InspectorDebuggerAgent::clearFrontend):
     57        (WebCore::InspectorDebuggerAgent::setJavaScriptBreakpoint):
     58        (WebCore::InspectorDebuggerAgent::removeJavaScriptBreakpoint):
     59        (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
     60        (WebCore::InspectorDebuggerAgent::getCompletionsOnCallFrame):
     61        (WebCore::InspectorDebuggerAgent::currentCallFrames):
     62        (WebCore::InspectorDebuggerAgent::didParseSource):
     63        (WebCore::InspectorDebuggerAgent::clear):
     64        * inspector/InspectorDebuggerAgent.h:
     65        (WebCore::InspectorDebuggerAgent::enable):
     66        (WebCore::InspectorDebuggerAgent::disable):
     67        (WebCore::InspectorDebuggerAgent::Listener::~Listener):
     68        (WebCore::InspectorDebuggerAgent::setListener):
     69        * inspector/InspectorInstrumentation.cpp:
     70        (WebCore::InspectorInstrumentation::willInsertDOMNodeImpl):
     71        (WebCore::InspectorInstrumentation::didInsertDOMNodeImpl):
     72        (WebCore::InspectorInstrumentation::willRemoveDOMNodeImpl):
     73        (WebCore::InspectorInstrumentation::didRemoveDOMNodeImpl):
     74        (WebCore::InspectorInstrumentation::willModifyDOMAttrImpl):
     75        (WebCore::InspectorInstrumentation::willSendXMLHttpRequestImpl):
     76        (WebCore::InspectorInstrumentation::pauseOnNativeEventIfNeeded):
     77        * inspector/front-end/DebuggerModel.js:
     78        (WebInspector.DebuggerModel.prototype.enableDebugger):
     79        (WebInspector.DebuggerModel.prototype.disableDebugger):
     80
    1812011-02-28  Renata Hodovan  <reni@webkit.org>
    282
  • trunk/Source/WebCore/inspector/Inspector.idl

    r79583 r79858  
    6666        // FIXME: dispatch on agents.
    6767#if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER
    68         void enableDebugger();
    69         void disableDebugger();
    7068        void enableProfiler();
    7169        void disableProfiler();
     
    202200#if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER
    203201    interface [Conditional=INSPECTOR] Debugger {
     202        void enable();
     203        void disable();
    204204        [event] void debuggerWasEnabled();
    205205        [event] void debuggerWasDisabled();
  • trunk/Source/WebCore/inspector/InspectorAgent.cpp

    r79850 r79858  
    151151    , m_consoleAgent(new InspectorConsoleAgent(m_instrumentingAgents.get(), this, m_state.get(), m_injectedScriptHost.get(), m_domAgent.get()))
    152152#if ENABLE(JAVASCRIPT_DEBUGGER)
     153    , m_debuggerAgent(InspectorDebuggerAgent::create(m_instrumentingAgents.get(), m_state.get(), page, m_injectedScriptHost.get()))
     154    , m_browserDebuggerAgent(InspectorBrowserDebuggerAgent::create(m_instrumentingAgents.get(), m_state.get(), m_domAgent.get(), m_debuggerAgent.get(), this))
    153155    , m_profilerAgent(InspectorProfilerAgent::create(this))
    154156#endif
     
    208210
    209211#if ENABLE(JAVASCRIPT_DEBUGGER)
    210     restoreDebugger(false);
     212    m_debuggerAgent->restore();
    211213    restoreProfiler(ProfilerRestoreResetAgent);
    212214    if (m_state->getBoolean(InspectorAgentState::userInitiatedProfiling))
     
    364366    m_consoleAgent->setFrontend(m_frontend);
    365367    m_timelineAgent->setFrontend(m_frontend);
     368#if ENABLE(JAVASCRIPT_DEBUGGER)
     369    m_debuggerAgent->setFrontend(m_frontend);
     370    m_browserDebuggerAgent->setFrontend(m_frontend);
     371#endif
    366372#if ENABLE(DATABASE)
    367373    m_databaseAgent->setFrontend(m_frontend);
     
    387393    ErrorString error;
    388394#if ENABLE(JAVASCRIPT_DEBUGGER)
    389     // If the window is being closed with the debugger enabled,
    390     // remember this state to re-enable debugger on the next window
    391     // opening.
    392     disableDebugger(&error);
     395    m_debuggerAgent->clearFrontend();
     396    m_browserDebuggerAgent->clearFrontend();
    393397#endif
    394398    setSearchingForNode(false);
     
    461465    }
    462466
    463     restoreDebugger(true);
    464467    restoreProfiler(ProfilerRestoreNoAction);
    465468
     
    480483        m_frontend->didCreateWorker(worker->id(), worker->url(), worker->isSharedWorker());
    481484    }
    482 #endif
    483 }
    484 
    485 void InspectorAgent::restoreDebugger(bool eraseStickyBreakpoints)
    486 {
    487     ASSERT(m_frontend);
    488 #if ENABLE(JAVASCRIPT_DEBUGGER)
    489     if (m_state->getBoolean(InspectorAgentState::debuggerEnabled))
    490         enableDebugger(eraseStickyBreakpoints);
    491485#endif
    492486}
     
    532526
    533527#if ENABLE(JAVASCRIPT_DEBUGGER)
    534         if (m_debuggerAgent) {
     528        if (InspectorDebuggerAgent* debuggerAgent = m_instrumentingAgents->inspectorDebuggerAgent()) {
    535529            KURL url = inspectedURLWithoutFragment();
    536             m_debuggerAgent->inspectedURLChanged(url);
    537             if (m_browserDebuggerAgent)
    538                 m_browserDebuggerAgent->inspectedURLChanged(url);
     530            debuggerAgent->inspectedURLChanged(url);
     531            if (InspectorBrowserDebuggerAgent* browserDebuggerAgent = m_instrumentingAgents->inspectorBrowserDebuggerAgent())
     532                browserDebuggerAgent->inspectedURLChanged(url);
    539533        }
    540534#endif
     
    836830
    837831#if ENABLE(JAVASCRIPT_DEBUGGER)
    838 void InspectorAgent::startUserInitiatedDebugging()
    839 {
    840     if (debuggerEnabled())
    841         return;
    842 
     832void InspectorAgent::showScriptsPanel()
     833{
    843834    showPanel(scriptsPanelName);
    844     if (!m_frontend) {
    845         // We are called after show(), set the debuggerEnabled flag so that it was enabled
    846         // upon frontend opening.
    847         m_state->setBoolean(InspectorAgentState::debuggerEnabled, true);
    848     } else
    849         enableDebugger(true);
    850 }
    851 
    852 void InspectorAgent::enableDebugger(bool eraseStickyBreakpoints)
    853 {
    854     if (debuggerEnabled())
    855         return;
    856     m_state->setBoolean(InspectorAgentState::debuggerEnabled, true);
    857     ASSERT(m_inspectedPage);
    858 
    859     m_debuggerAgent = InspectorDebuggerAgent::create(this, m_frontend, eraseStickyBreakpoints);
    860     m_browserDebuggerAgent = InspectorBrowserDebuggerAgent::create(this, eraseStickyBreakpoints);
    861 
    862     m_frontend->debuggerWasEnabled();
    863 }
    864 
    865 void InspectorAgent::disableDebugger(ErrorString*)
    866 {
    867     if (!enabled())
    868         return;
    869     ASSERT(m_inspectedPage);
    870     m_debuggerAgent.clear();
    871     m_browserDebuggerAgent.clear();
    872 
    873     if (m_frontend) {
    874         m_frontend->debuggerWasDisabled();
    875         m_state->setBoolean(InspectorAgentState::debuggerEnabled, false);
    876     }
    877835}
    878836#endif
  • trunk/Source/WebCore/inspector/InspectorAgent.h

    r79850 r79858  
    207207    bool profilerEnabled() const;
    208208
    209     void startUserInitiatedDebugging();
    210     void enableDebugger(ErrorString*) { enableDebugger(false); }
    211     void enableDebugger(bool eraseStickyBreakpoints);
    212     void disableDebugger(ErrorString* error);
    213     bool debuggerEnabled() const { return m_debuggerAgent; }
     209    void showScriptsPanel();
    214210#endif
    215211
     
    237233    void showPanel(const String& panel);
    238234    void pushDataCollectedOffline();
    239     void restoreDebugger(bool eraseStickyBreakpoints);
    240235    enum ProfilerRestoreAction {
    241236        ProfilerRestoreNoAction = 0,
  • trunk/Source/WebCore/inspector/InspectorBrowserDebuggerAgent.cpp

    r79539 r79858  
    3636
    3737#include "HTMLElement.h"
    38 #include "InspectorAgent.h"
    3938#include "InspectorDOMAgent.h"
    4039#include "InspectorDebuggerAgent.h"
    4140#include "InspectorState.h"
    4241#include "InspectorValues.h"
     42#include "InstrumentingAgents.h"
    4343#include <wtf/text/CString.h>
    4444
     
    6767}
    6868
    69 PassOwnPtr<InspectorBrowserDebuggerAgent> InspectorBrowserDebuggerAgent::create(InspectorAgent* inspectorAgent, bool eraseStickyBreakpoints)
    70 {
    71     return adoptPtr(new InspectorBrowserDebuggerAgent(inspectorAgent, eraseStickyBreakpoints));
    72 }
    73 
    74 InspectorBrowserDebuggerAgent::InspectorBrowserDebuggerAgent(InspectorAgent* inspectorAgent, bool eraseStickyBreakpoints)
    75     : m_inspectorAgent(inspectorAgent)
     69PassOwnPtr<InspectorBrowserDebuggerAgent> InspectorBrowserDebuggerAgent::create(InstrumentingAgents* instrumentingAgents, InspectorState* inspectorState, InspectorDOMAgent* domAgent, InspectorDebuggerAgent* debuggerAgent, InspectorAgent* inspectorAgent)
     70{
     71    return adoptPtr(new InspectorBrowserDebuggerAgent(instrumentingAgents, inspectorState, domAgent, debuggerAgent, inspectorAgent));
     72}
     73
     74InspectorBrowserDebuggerAgent::InspectorBrowserDebuggerAgent(InstrumentingAgents* instrumentingAgents, InspectorState* inspectorState, InspectorDOMAgent* domAgent, InspectorDebuggerAgent* debuggerAgent, InspectorAgent* inspectorAgent)
     75    : m_instrumentingAgents(instrumentingAgents)
     76    , m_inspectorState(inspectorState)
     77    , m_domAgent(domAgent)
     78    , m_debuggerAgent(debuggerAgent)
     79    , m_inspectorAgent(inspectorAgent)
    7680    , m_hasXHRBreakpointWithEmptyURL(false)
    7781{
    78     if (eraseStickyBreakpoints)
    79         inspectorAgent->state()->setObject(BrowserDebuggerAgentState::browserBreakpoints, InspectorObject::create());
     82    m_debuggerAgent->setListener(this);
    8083}
    8184
    8285InspectorBrowserDebuggerAgent::~InspectorBrowserDebuggerAgent()
    8386{
     87    m_debuggerAgent->setListener(0);
     88    clearFrontend();
     89}
     90
     91// Browser debugger agent enabled only when JS debugger is enabled.
     92void InspectorBrowserDebuggerAgent::debuggerWasEnabled()
     93{
     94    m_instrumentingAgents->setInspectorBrowserDebuggerAgent(this);
     95}
     96
     97void InspectorBrowserDebuggerAgent::debuggerWasDisabled()
     98{
     99    disable();
     100}
     101
     102void InspectorBrowserDebuggerAgent::disable()
     103{
     104    m_instrumentingAgents->setInspectorBrowserDebuggerAgent(0);
     105    clear();
     106}
     107
     108void InspectorBrowserDebuggerAgent::setFrontend(InspectorFrontend*)
     109{
     110    // Erase sticky breakpoints. If we are restoring from a cookie setFrontend msut be called
     111    // before the state is loaded from the cookie.
     112    m_inspectorState->setObject(BrowserDebuggerAgentState::browserBreakpoints, InspectorObject::create());
     113}
     114
     115void InspectorBrowserDebuggerAgent::clearFrontend()
     116{
     117    disable();
    84118}
    85119
    86120void InspectorBrowserDebuggerAgent::setAllBrowserBreakpoints(ErrorString*, PassRefPtr<InspectorObject> breakpoints)
    87121{
    88     m_inspectorAgent->state()->setObject(BrowserDebuggerAgentState::browserBreakpoints, breakpoints);
     122    m_inspectorState->setObject(BrowserDebuggerAgentState::browserBreakpoints, breakpoints);
     123    // FIXME: remove this call to inspector agent and dependency on the inspector agent.
    89124    inspectedURLChanged(m_inspectorAgent->inspectedURLWithoutFragment());
    90125}
     
    92127void InspectorBrowserDebuggerAgent::inspectedURLChanged(const String& url)
    93128{
     129    ASSERT(m_instrumentingAgents->inspectorBrowserDebuggerAgent());
    94130    m_eventListenerBreakpoints.clear();
    95131    m_XHRBreakpoints.clear();
    96132    m_hasXHRBreakpointWithEmptyURL = false;
    97133
    98     RefPtr<InspectorObject> allBreakpoints = m_inspectorAgent->state()->getObject(BrowserDebuggerAgentState::browserBreakpoints);
     134    RefPtr<InspectorObject> allBreakpoints = m_inspectorState->getObject(BrowserDebuggerAgentState::browserBreakpoints);
    99135    RefPtr<InspectorArray> breakpoints = allBreakpoints->getArray(url);
    100136    if (!breakpoints)
     
    181217void InspectorBrowserDebuggerAgent::setDOMBreakpoint(ErrorString*, long nodeId, long type)
    182218{
    183     Node* node = m_inspectorAgent->domAgent()->nodeForId(nodeId);
     219    Node* node = m_domAgent->nodeForId(nodeId);
    184220    if (!node)
    185221        return;
     
    195231void InspectorBrowserDebuggerAgent::removeDOMBreakpoint(ErrorString*, long nodeId, long type)
    196232{
    197     Node* node = m_inspectorAgent->domAgent()->nodeForId(nodeId);
     233    Node* node = m_domAgent->nodeForId(nodeId);
    198234    if (!node)
    199235        return;
     
    214250void InspectorBrowserDebuggerAgent::willInsertDOMNode(Node*, Node* parent)
    215251{
    216     InspectorDebuggerAgent* debuggerAgent = m_inspectorAgent->debuggerAgent();
     252    InspectorDebuggerAgent* debuggerAgent = m_debuggerAgent;
    217253    if (!debuggerAgent)
    218254        return;
     
    228264void InspectorBrowserDebuggerAgent::willRemoveDOMNode(Node* node)
    229265{
    230     InspectorDebuggerAgent* debuggerAgent = m_inspectorAgent->debuggerAgent();
     266    InspectorDebuggerAgent* debuggerAgent = m_debuggerAgent;
    231267    if (!debuggerAgent)
    232268        return;
     
    247283void InspectorBrowserDebuggerAgent::willModifyDOMAttr(Element* element)
    248284{
    249     InspectorDebuggerAgent* debuggerAgent = m_inspectorAgent->debuggerAgent();
     285    InspectorDebuggerAgent* debuggerAgent = m_debuggerAgent;
    250286    if (!debuggerAgent)
    251287        return;
     
    267303        // For inheritable breakpoint types, target node isn't always the same as the node that owns a breakpoint.
    268304        // Target node may be unknown to frontend, so we need to push it first.
    269         long targetNodeId = m_inspectorAgent->domAgent()->pushNodePathToFrontend(target);
     305        long targetNodeId = m_domAgent->pushNodePathToFrontend(target);
    270306        ASSERT(targetNodeId);
    271307        description->setNumber("targetNodeId", targetNodeId);
     
    284320    }
    285321
    286     long breakpointOwnerNodeId = m_inspectorAgent->domAgent()->pushNodePathToFrontend(breakpointOwner);
     322    long breakpointOwnerNodeId = m_domAgent->pushNodePathToFrontend(breakpointOwner);
    287323    ASSERT(breakpointOwnerNodeId);
    288324    description->setNumber("nodeId", breakpointOwnerNodeId);
     
    317353void InspectorBrowserDebuggerAgent::pauseOnNativeEventIfNeeded(const String& categoryType, const String& eventName, bool synchronous)
    318354{
    319     InspectorDebuggerAgent* debuggerAgent = m_inspectorAgent->debuggerAgent();
     355    InspectorDebuggerAgent* debuggerAgent = m_debuggerAgent;
    320356    if (!debuggerAgent)
    321357        return;
     
    352388void InspectorBrowserDebuggerAgent::willSendXMLHttpRequest(const String& url)
    353389{
    354     InspectorDebuggerAgent* debuggerAgent = m_inspectorAgent->debuggerAgent();
     390    InspectorDebuggerAgent* debuggerAgent = m_debuggerAgent;
    355391    if (!debuggerAgent)
    356392        return;
     
    378414}
    379415
     416void InspectorBrowserDebuggerAgent::clear()
     417{
     418    m_domBreakpoints.clear();
     419    m_eventListenerBreakpoints.clear();
     420    m_XHRBreakpoints.clear();
     421    m_hasXHRBreakpointWithEmptyURL = false;
     422}
     423
    380424} // namespace WebCore
    381425
  • trunk/Source/WebCore/inspector/InspectorBrowserDebuggerAgent.h

    r79539 r79858  
    3434#if ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR)
    3535
     36#include "InspectorDebuggerAgent.h"
    3637#include "PlatformString.h"
    37 
    3838#include <wtf/HashMap.h>
    3939#include <wtf/HashSet.h>
     
    4646class Element;
    4747class InspectorAgent;
     48class InspectorDOMAgent;
     49class InspectorDebuggerAgent;
     50class InspectorFrontend;
    4851class InspectorObject;
     52class InspectorState;
     53class InstrumentingAgents;
    4954class Node;
    5055
    5156typedef String ErrorString;
    5257
    53 class InspectorBrowserDebuggerAgent {
     58class InspectorBrowserDebuggerAgent : public InspectorDebuggerAgent::Listener {
    5459    WTF_MAKE_NONCOPYABLE(InspectorBrowserDebuggerAgent);
    5560public:
    56     static PassOwnPtr<InspectorBrowserDebuggerAgent> create(InspectorAgent*, bool eraseStickyBreakpoints);
     61    static PassOwnPtr<InspectorBrowserDebuggerAgent> create(InstrumentingAgents*, InspectorState*, InspectorDOMAgent*, InspectorDebuggerAgent*, InspectorAgent*);
    5762
    5863    virtual ~InspectorBrowserDebuggerAgent();
     64
     65    void setFrontend(InspectorFrontend*);
     66    void clearFrontend();
    5967
    6068    void setAllBrowserBreakpoints(ErrorString* error, PassRefPtr<InspectorObject>);
     
    7987
    8088private:
    81     InspectorBrowserDebuggerAgent(InspectorAgent*, bool eraseStickyBreakpoints);
     89    InspectorBrowserDebuggerAgent(InstrumentingAgents*, InspectorState*, InspectorDOMAgent*, InspectorDebuggerAgent*, InspectorAgent*);
     90
     91    // InspectorDebuggerAgent::Listener implementation.
     92    virtual void debuggerWasEnabled();
     93    virtual void debuggerWasDisabled();
     94    void disable();
    8295
    8396    void restoreStickyBreakpoint(PassRefPtr<InspectorObject> breakpoint);
     
    88101    void discardBindings();
    89102
     103    void clear();
     104
     105    InstrumentingAgents* m_instrumentingAgents;
     106    InspectorState* m_inspectorState;
     107    InspectorDOMAgent* m_domAgent;
     108    InspectorDebuggerAgent* m_debuggerAgent;
    90109    InspectorAgent* m_inspectorAgent;
    91110    HashMap<Node*, uint32_t> m_domBreakpoints;
  • trunk/Source/WebCore/inspector/InspectorController.cpp

    r79539 r79858  
    3939#include "InspectorAgent.h"
    4040#include "InspectorBackendDispatcher.h"
     41#include "InspectorBrowserDebuggerAgent.h"
    4142#include "InspectorDebuggerAgent.h"
    4243#include "InspectorClient.h"
     
    232233bool InspectorController::debuggerEnabled()
    233234{
    234     return m_inspectorAgent->debuggerEnabled();
     235    return m_inspectorAgent->debuggerAgent()->enabled();
    235236}
    236237
     
    240241        return;
    241242    show();
    242     m_inspectorAgent->startUserInitiatedDebugging();
     243    m_inspectorAgent->showScriptsPanel();
     244    m_inspectorAgent->debuggerAgent()->startUserInitiatedDebugging();
    243245}
    244246
    245247void InspectorController::disableDebugger()
    246248{
    247     ErrorString error;
    248     m_inspectorAgent->disableDebugger(&error);
     249    m_inspectorAgent->debuggerAgent()->disable();
    249250}
    250251
  • trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp

    r79539 r79858  
    3737#include "InspectorState.h"
    3838#include "InspectorValues.h"
     39#include "InstrumentingAgents.h"
    3940#include "PlatformString.h"
    4041#include "ScriptDebugServer.h"
     
    4445
    4546namespace DebuggerAgentState {
     47static const char debuggerEnabled[] = "debuggerEnabled";
     48static const char enableWhenShown[] = "debuggerEnableWhenShown";
    4649static const char javaScriptBreakpoints[] = "javaScriptBreakopints";
    4750};
    4851
    49 PassOwnPtr<InspectorDebuggerAgent> InspectorDebuggerAgent::create(InspectorAgent* inspectorAgent, InspectorFrontend* frontend, bool eraseStickyBreakpoints)
    50 {
    51     OwnPtr<InspectorDebuggerAgent> agent = adoptPtr(new InspectorDebuggerAgent(inspectorAgent, frontend, eraseStickyBreakpoints));
     52PassOwnPtr<InspectorDebuggerAgent> InspectorDebuggerAgent::create(InstrumentingAgents* instrumentingAgents, InspectorState* inspectorState, Page* inspectedPage, InjectedScriptHost* injectedScriptHost)
     53{
     54    return adoptPtr(new InspectorDebuggerAgent(instrumentingAgents, inspectorState, inspectedPage, injectedScriptHost));
     55}
     56
     57InspectorDebuggerAgent::InspectorDebuggerAgent(InstrumentingAgents* instrumentingAgents, InspectorState* inspectorState, Page* inspectedPage, InjectedScriptHost* injectedScriptHost)
     58    : m_instrumentingAgents(instrumentingAgents)
     59    , m_inspectorState(inspectorState)
     60    , m_inspectedPage(inspectedPage)
     61    , m_injectedScriptHost(injectedScriptHost)
     62    , m_frontend(0)
     63    , m_pausedScriptState(0)
     64    , m_javaScriptPauseScheduled(false)
     65    , m_listener(0)
     66{
     67}
     68
     69InspectorDebuggerAgent::~InspectorDebuggerAgent()
     70{
     71    ScriptDebugServer::shared().removeListener(this, m_inspectedPage);
     72    m_pausedScriptState = 0;
     73}
     74
     75void InspectorDebuggerAgent::startUserInitiatedDebugging()
     76{
     77    if (m_frontend)
     78        enable(false);
     79    else
     80        m_inspectorState->setBoolean(DebuggerAgentState::enableWhenShown, true);
     81}
     82
     83void InspectorDebuggerAgent::enable(bool restoringFromState)
     84{
     85    ASSERT(m_frontend);
     86    if (!restoringFromState && enabled())
     87        return;
     88    m_inspectorState->setBoolean(DebuggerAgentState::debuggerEnabled, true);
     89    m_instrumentingAgents->setInspectorDebuggerAgent(this);
     90
    5291    ScriptDebugServer::shared().clearBreakpoints();
    5392    // FIXME(WK44513): breakpoints activated flag should be synchronized between all front-ends
    5493    ScriptDebugServer::shared().setBreakpointsActivated(true);
    55     ScriptDebugServer::shared().addListener(agent.get(), inspectorAgent->inspectedPage());
    56     return agent.release();
    57 }
    58 
    59 InspectorDebuggerAgent::InspectorDebuggerAgent(InspectorAgent* inspectorAgent, InspectorFrontend* frontend, bool eraseStickyBreakpoints)
    60     : m_inspectorAgent(inspectorAgent)
    61     , m_frontend(frontend)
    62     , m_pausedScriptState(0)
    63     , m_javaScriptPauseScheduled(false)
    64 {
    65     if (eraseStickyBreakpoints)
    66         inspectorAgent->state()->setObject(DebuggerAgentState::javaScriptBreakpoints, InspectorObject::create());
    67 }
    68 
    69 InspectorDebuggerAgent::~InspectorDebuggerAgent()
    70 {
    71     ScriptDebugServer::shared().removeListener(this, m_inspectorAgent->inspectedPage());
    72     m_pausedScriptState = 0;
     94    ScriptDebugServer::shared().addListener(this, m_inspectedPage);
     95
     96    m_frontend->debuggerWasEnabled();
     97    if (m_listener)
     98        m_listener->debuggerWasEnabled();
     99}
     100
     101void InspectorDebuggerAgent::disable()
     102{
     103    if (!enabled())
     104        return;
     105    m_inspectorState->setBoolean(DebuggerAgentState::debuggerEnabled, false);
     106    m_instrumentingAgents->setInspectorDebuggerAgent(0);
     107
     108    ScriptDebugServer::shared().removeListener(this, m_inspectedPage);
     109    clear();
     110
     111    if (m_frontend)
     112        m_frontend->debuggerWasDisabled();
     113    if (m_listener)
     114        m_listener->debuggerWasDisabled();
     115}
     116
     117bool InspectorDebuggerAgent::enabled()
     118{
     119    return m_inspectorState->getBoolean(DebuggerAgentState::debuggerEnabled);
     120}
     121
     122void InspectorDebuggerAgent::restore()
     123{
     124    if (m_inspectorState->getBoolean(DebuggerAgentState::debuggerEnabled))
     125        enable(true);
     126}
     127
     128void InspectorDebuggerAgent::setFrontend(InspectorFrontend* frontend)
     129{
     130    m_frontend = frontend;
     131    // Erase sticky breakpoints. If we are restoring from a cookie setFrontend msut be called
     132    // before the state is loaded from the cookie.
     133    m_inspectorState->setObject(DebuggerAgentState::javaScriptBreakpoints, InspectorObject::create());
     134    if (m_inspectorState->getBoolean(DebuggerAgentState::enableWhenShown)) {
     135        m_inspectorState->setBoolean(DebuggerAgentState::enableWhenShown, false);
     136        enable(false);
     137    }
     138}
     139
     140void InspectorDebuggerAgent::clearFrontend()
     141{
     142    m_frontend = 0;
     143
     144    if (!enabled())
     145        return;
     146    // If the window is being closed with the debugger enabled,
     147    // remember this state to re-enable debugger on the next window
     148    // opening.
     149    disable();
     150    m_inspectorState->setBoolean(DebuggerAgentState::enableWhenShown, true);
    73151}
    74152
     
    92170{
    93171    String breakpointId = makeString(url, ":", String::number(lineNumber), ":", String::number(columnNumber));
    94     RefPtr<InspectorObject> breakpointsCookie = m_inspectorAgent->state()->getObject(DebuggerAgentState::javaScriptBreakpoints);
     172    RefPtr<InspectorObject> breakpointsCookie = m_inspectorState->getObject(DebuggerAgentState::javaScriptBreakpoints);
    95173    if (breakpointsCookie->find(breakpointId) != breakpointsCookie->end())
    96174        return;
     
    102180    breakpointObject->setBoolean("enabled", enabled);
    103181    breakpointsCookie->setObject(breakpointId, breakpointObject);
    104     m_inspectorAgent->state()->setObject(DebuggerAgentState::javaScriptBreakpoints, breakpointsCookie);
     182    m_inspectorState->setObject(DebuggerAgentState::javaScriptBreakpoints, breakpointsCookie);
    105183
    106184    ScriptBreakpoint breakpoint(lineNumber, columnNumber, condition, enabled);
     
    133211void InspectorDebuggerAgent::removeJavaScriptBreakpoint(ErrorString*, const String& breakpointId)
    134212{
    135     RefPtr<InspectorObject> breakpointsCookie = m_inspectorAgent->state()->getObject(DebuggerAgentState::javaScriptBreakpoints);
     213    RefPtr<InspectorObject> breakpointsCookie = m_inspectorState->getObject(DebuggerAgentState::javaScriptBreakpoints);
    136214    breakpointsCookie->remove(breakpointId);
    137     m_inspectorAgent->state()->setObject(DebuggerAgentState::javaScriptBreakpoints, breakpointsCookie);
     215    m_inspectorState->setObject(DebuggerAgentState::javaScriptBreakpoints, breakpointsCookie);
    138216
    139217    BreakpointIdToDebugServerBreakpointIdsMap::iterator debugServerBreakpointIdsIterator = m_breakpointIdToDebugServerBreakpointIds.find(breakpointId);
     
    249327void InspectorDebuggerAgent::evaluateOnCallFrame(ErrorString*, PassRefPtr<InspectorObject> callFrameId, const String& expression, const String& objectGroup, bool includeCommandLineAPI, RefPtr<InspectorValue>* result)
    250328{
    251     InjectedScript injectedScript = m_inspectorAgent->injectedScriptHost()->injectedScriptForObjectId(callFrameId.get());
     329    InjectedScript injectedScript = m_injectedScriptHost->injectedScriptForObjectId(callFrameId.get());
    252330    if (!injectedScript.hasNoValue())
    253331        injectedScript.evaluateOnCallFrame(callFrameId, expression, objectGroup, includeCommandLineAPI, result);
     
    256334void InspectorDebuggerAgent::getCompletionsOnCallFrame(ErrorString*, PassRefPtr<InspectorObject> callFrameId, const String& expression, bool includeCommandLineAPI, RefPtr<InspectorValue>* result)
    257335{
    258     InjectedScript injectedScript = m_inspectorAgent->injectedScriptHost()->injectedScriptForObjectId(callFrameId.get());
     336    InjectedScript injectedScript = m_injectedScriptHost->injectedScriptForObjectId(callFrameId.get());
    259337    if (!injectedScript.hasNoValue())
    260338        injectedScript.getCompletionsOnCallFrame(callFrameId, expression, includeCommandLineAPI, result);
     
    265343    if (!m_pausedScriptState)
    266344        return InspectorValue::null();
    267     InjectedScript injectedScript = m_inspectorAgent->injectedScriptHost()->injectedScriptFor(m_pausedScriptState);
     345    InjectedScript injectedScript = m_injectedScriptHost->injectedScriptFor(m_pausedScriptState);
    268346    if (injectedScript.hasNoValue()) {
    269347        ASSERT_NOT_REACHED();
     
    285363        return;
    286364
    287     RefPtr<InspectorObject> breakpointsCookie = m_inspectorAgent->state()->getObject(DebuggerAgentState::javaScriptBreakpoints);
     365    RefPtr<InspectorObject> breakpointsCookie = m_inspectorState->getObject(DebuggerAgentState::javaScriptBreakpoints);
    288366    for (InspectorObject::iterator it = breakpointsCookie->begin(); it != breakpointsCookie->end(); ++it) {
    289367        RefPtr<InspectorObject> breakpointObject = it->second->asObject();
     
    341419}
    342420
     421void InspectorDebuggerAgent::clear()
     422{
     423    m_pausedScriptState = 0;
     424    m_scripts.clear();
     425    m_breakpointIdToDebugServerBreakpointIds.clear();
     426    m_continueToLocationBreakpointId = String();
     427    m_breakProgramDetails.clear();
     428    m_javaScriptPauseScheduled = false;
     429}
     430
    343431} // namespace WebCore
    344432
  • trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h

    r79539 r79858  
    4545
    4646class InjectedScriptHost;
    47 class InspectorAgent;
    4847class InspectorFrontend;
    4948class InspectorObject;
     49class InspectorState;
    5050class InspectorValue;
     51class InstrumentingAgents;
     52class Page;
    5153
    5254typedef String ErrorString;
     
    6163    WTF_MAKE_NONCOPYABLE(InspectorDebuggerAgent); WTF_MAKE_FAST_ALLOCATED;
    6264public:
    63     static PassOwnPtr<InspectorDebuggerAgent> create(InspectorAgent*, InspectorFrontend*, bool eraseStickyBreakpoints);
     65    static PassOwnPtr<InspectorDebuggerAgent> create(InstrumentingAgents*, InspectorState*, Page*, InjectedScriptHost*);
    6466    virtual ~InspectorDebuggerAgent();
     67
     68    void startUserInitiatedDebugging();
     69    void enable(ErrorString*) { enable(false); }
     70    void disable(ErrorString*) { disable(); }
     71    void disable();
     72    bool enabled();
     73    void restore();
     74    void setFrontend(InspectorFrontend*);
     75    void clearFrontend();
    6576
    6677    void inspectedURLChanged(const String& url);
     
    89100    void getCompletionsOnCallFrame(ErrorString* error, PassRefPtr<InspectorObject> callFrameId, const String& expression, bool includeCommandLineAPI, RefPtr<InspectorValue>* result);
    90101
     102    class Listener {
     103    public:
     104        virtual ~Listener() { }
     105        virtual void debuggerWasEnabled() = 0;
     106        virtual void debuggerWasDisabled() = 0;
     107    };
     108    void setListener(Listener* listener) { m_listener = listener; }
     109
    91110private:
    92     InspectorDebuggerAgent(InspectorAgent*, InspectorFrontend*, bool eraseStickyBreakpoints);
     111    InspectorDebuggerAgent(InstrumentingAgents*, InspectorState*, Page*, InjectedScriptHost*);
     112
     113    void enable(bool restoringFromState);
    93114
    94115    PassRefPtr<InspectorValue> currentCallFrames();
     
    100121
    101122    bool resolveBreakpoint(const String& breakpointId, const String& sourceId, const ScriptBreakpoint&, int* actualLineNumber, int* actualColumnNumber);
     123    void clear();
    102124
    103125    class Script {
     
    129151    typedef HashMap<String, Vector<String> > BreakpointIdToDebugServerBreakpointIdsMap;
    130152
    131     InspectorAgent* m_inspectorAgent;
     153    InstrumentingAgents* m_instrumentingAgents;
     154    InspectorState* m_inspectorState;
     155    Page* m_inspectedPage;
     156    InjectedScriptHost* m_injectedScriptHost;
    132157    InspectorFrontend* m_frontend;
    133158    ScriptState* m_pausedScriptState;
     
    137162    RefPtr<InspectorObject> m_breakProgramDetails;
    138163    bool m_javaScriptPauseScheduled;
     164    Listener* m_listener;
    139165};
    140166
  • trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp

    r79323 r79858  
    103103{
    104104#if ENABLE(JAVASCRIPT_DEBUGGER)
    105     if (InspectorBrowserDebuggerAgent* browserDebuggerAgent = inspectorAgent->browserDebuggerAgent())
     105    if (InspectorBrowserDebuggerAgent* browserDebuggerAgent = inspectorAgent->instrumentingAgents()->inspectorBrowserDebuggerAgent())
    106106        browserDebuggerAgent->willInsertDOMNode(node, parent);
    107107#endif
     
    113113        domAgent->didInsertDOMNode(node);
    114114#if ENABLE(JAVASCRIPT_DEBUGGER)
    115     if (InspectorBrowserDebuggerAgent* browserDebuggerAgent = inspectorAgent->browserDebuggerAgent())
     115    if (InspectorBrowserDebuggerAgent* browserDebuggerAgent = inspectorAgent->instrumentingAgents()->inspectorBrowserDebuggerAgent())
    116116        browserDebuggerAgent->didInsertDOMNode(node);
    117117#endif
     
    121121{
    122122#if ENABLE(JAVASCRIPT_DEBUGGER)
    123     if (InspectorBrowserDebuggerAgent* browserDebuggerAgent = inspectorAgent->browserDebuggerAgent())
     123    if (InspectorBrowserDebuggerAgent* browserDebuggerAgent = inspectorAgent->instrumentingAgents()->inspectorBrowserDebuggerAgent())
    124124        browserDebuggerAgent->willRemoveDOMNode(node);
    125125#endif
     
    129129{
    130130#if ENABLE(JAVASCRIPT_DEBUGGER)
    131     if (InspectorBrowserDebuggerAgent* browserDebuggerAgent = inspectorAgent->browserDebuggerAgent())
     131    if (InspectorBrowserDebuggerAgent* browserDebuggerAgent = inspectorAgent->instrumentingAgents()->inspectorBrowserDebuggerAgent())
    132132        browserDebuggerAgent->didRemoveDOMNode(node);
    133133#endif
     
    139139{
    140140#if ENABLE(JAVASCRIPT_DEBUGGER)
    141     if (InspectorBrowserDebuggerAgent* browserDebuggerAgent = inspectorAgent->browserDebuggerAgent())
     141    if (InspectorBrowserDebuggerAgent* browserDebuggerAgent = inspectorAgent->instrumentingAgents()->inspectorBrowserDebuggerAgent())
    142142        browserDebuggerAgent->willModifyDOMAttr(element);
    143143#endif
     
    175175{
    176176#if ENABLE(JAVASCRIPT_DEBUGGER)
    177     if (InspectorBrowserDebuggerAgent* browserDebuggerAgent = inspectorAgent->browserDebuggerAgent())
     177    if (InspectorBrowserDebuggerAgent* browserDebuggerAgent = inspectorAgent->instrumentingAgents()->inspectorBrowserDebuggerAgent())
    178178        browserDebuggerAgent->willSendXMLHttpRequest(url);
    179179#endif
     
    668668{
    669669#if ENABLE(JAVASCRIPT_DEBUGGER)
    670     if (InspectorBrowserDebuggerAgent* browserDebuggerAgent = inspectorAgent->browserDebuggerAgent())
     670    if (InspectorBrowserDebuggerAgent* browserDebuggerAgent = inspectorAgent->instrumentingAgents()->inspectorBrowserDebuggerAgent())
    671671        browserDebuggerAgent->pauseOnNativeEventIfNeeded(categoryType, eventName, synchronous);
    672672#endif
  • trunk/Source/WebCore/inspector/front-end/DebuggerModel.js

    r78717 r79858  
    5353    enableDebugger: function()
    5454    {
    55         InspectorAgent.enableDebugger();
     55        DebuggerAgent.enable();
    5656        if (this._breakpointsPushedToBackend)
    5757            return;
     
    6969    disableDebugger: function()
    7070    {
    71         InspectorAgent.disableDebugger();
     71        DebuggerAgent.disable();
    7272    },
    7373
Note: See TracChangeset for help on using the changeset viewer.