Changeset 106541 in webkit


Ignore:
Timestamp:
Feb 2, 2012 1:12:47 AM (12 years ago)
Author:
yurys@chromium.org
Message:

Web Inspector: pause on uncaugh exceptions state is not properly restored
https://bugs.webkit.org/show_bug.cgi?id=77558

'Pause on exceptions' state is now stored in InspectorState object so that it is
properly restored on inspected process change.

Reviewed by Vsevolod Vlasov.

  • inspector/InspectorDebuggerAgent.cpp:

(DebuggerAgentState):
(WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
(WebCore::InspectorDebuggerAgent::disable):
(WebCore::InspectorDebuggerAgent::restore):
(WebCore::InspectorDebuggerAgent::setPauseOnExceptions):
(WebCore):
(WebCore::InspectorDebuggerAgent::setPauseOnExceptionsImpl):

  • inspector/InspectorDebuggerAgent.h:

(InspectorDebuggerAgent):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r106539 r106541  
     12012-02-02  Yury Semikhatsky  <yurys@chromium.org>
     2
     3        Web Inspector: pause on uncaugh exceptions state is not properly restored
     4        https://bugs.webkit.org/show_bug.cgi?id=77558
     5
     6        'Pause on exceptions' state is now stored in InspectorState object so that it is
     7        properly restored on inspected process change.
     8
     9        Reviewed by Vsevolod Vlasov.
     10
     11        * inspector/InspectorDebuggerAgent.cpp:
     12        (DebuggerAgentState):
     13        (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
     14        (WebCore::InspectorDebuggerAgent::disable):
     15        (WebCore::InspectorDebuggerAgent::restore):
     16        (WebCore::InspectorDebuggerAgent::setPauseOnExceptions):
     17        (WebCore):
     18        (WebCore::InspectorDebuggerAgent::setPauseOnExceptionsImpl):
     19        * inspector/InspectorDebuggerAgent.h:
     20        (InspectorDebuggerAgent):
     21
    1222012-02-02  Kentaro Hara  <haraken@chromium.org>
    223
  • trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp

    r106101 r106541  
    5050static const char debuggerEnabled[] = "debuggerEnabled";
    5151static const char javaScriptBreakpoints[] = "javaScriptBreakopints";
     52static const char pauseOnExceptionsState[] = "pauseOnExceptionsState";
    5253};
    5354
     
    6465    // FIXME: make breakReason optional so that there was no need to init it with "other".
    6566    clearBreakDetails();
     67    m_state->setLong(DebuggerAgentState::pauseOnExceptionsState, ScriptDebugServer::DontPauseOnExceptions);
    6668}
    6769
     
    8688{
    8789    m_state->setObject(DebuggerAgentState::javaScriptBreakpoints, InspectorObject::create());
     90    m_state->setLong(DebuggerAgentState::pauseOnExceptionsState, ScriptDebugServer::DontPauseOnExceptions);
    8891    m_instrumentingAgents->setInspectorDebuggerAgent(0);
    8992
     
    141144        m_frontend->globalObjectCleared();
    142145        enable();
     146        long pauseState = m_state->getLong(DebuggerAgentState::pauseOnExceptionsState);
     147        String error;
     148        setPauseOnExceptionsImpl(&error, pauseState);
    143149    }
    144150}
     
    448454        return;
    449455    }
     456    setPauseOnExceptionsImpl(errorString, pauseState);
     457}
     458
     459void InspectorDebuggerAgent::setPauseOnExceptionsImpl(ErrorString* errorString, int pauseState)
     460{
    450461    scriptDebugServer().setPauseOnExceptionsState(static_cast<ScriptDebugServer::PauseOnExceptionsState>(pauseState));
    451462    if (scriptDebugServer().pauseOnExceptionsState() != pauseState)
    452463        *errorString = "Internal error. Could not change pause on exceptions state";
     464    else
     465        m_state->setLong(DebuggerAgentState::pauseOnExceptionsState, pauseState);
    453466}
    454467
  • trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h

    r106101 r106541  
    137137    virtual void didContinue();
    138138
     139    void setPauseOnExceptionsImpl(ErrorString*, int);
     140
    139141    PassRefPtr<InspectorObject> resolveBreakpoint(const String& breakpointId, const String& scriptId, const ScriptBreakpoint&);
    140142    void clear();
Note: See TracChangeset for help on using the changeset viewer.