Changeset 93042 in webkit


Ignore:
Timestamp:
Aug 15, 2011 7:32:41 AM (13 years ago)
Author:
pfeldman@chromium.org
Message:

Web Inspector: [V8] crash upon stepIn while not on pause.
https://bugs.webkit.org/show_bug.cgi?id=66221

Reviewed by Yury Semikhatsky.

  • inspector/InspectorDebuggerAgent.cpp:

(WebCore::InspectorDebuggerAgent::resume):
(WebCore::InspectorDebuggerAgent::stepOver):
(WebCore::InspectorDebuggerAgent::stepInto):
(WebCore::InspectorDebuggerAgent::stepOut):
(WebCore::InspectorDebuggerAgent::assertPaused):

  • inspector/InspectorDebuggerAgent.h:
  • inspector/front-end/ScriptsPanel.js:

(WebInspector.ScriptsPanel.prototype._stepOverClicked):
(WebInspector.ScriptsPanel.prototype._stepIntoClicked):
(WebInspector.ScriptsPanel.prototype._stepOutClicked):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r93041 r93042  
     12011-08-15  Pavel Feldman  <pfeldman@google.com>
     2
     3        Web Inspector: [V8] crash upon stepIn while not on pause.
     4        https://bugs.webkit.org/show_bug.cgi?id=66221
     5
     6        Reviewed by Yury Semikhatsky.
     7
     8        * inspector/InspectorDebuggerAgent.cpp:
     9        (WebCore::InspectorDebuggerAgent::resume):
     10        (WebCore::InspectorDebuggerAgent::stepOver):
     11        (WebCore::InspectorDebuggerAgent::stepInto):
     12        (WebCore::InspectorDebuggerAgent::stepOut):
     13        (WebCore::InspectorDebuggerAgent::assertPaused):
     14        * inspector/InspectorDebuggerAgent.h:
     15        * inspector/front-end/ScriptsPanel.js:
     16        (WebInspector.ScriptsPanel.prototype._stepOverClicked):
     17        (WebInspector.ScriptsPanel.prototype._stepIntoClicked):
     18        (WebInspector.ScriptsPanel.prototype._stepOutClicked):
     19
    1202011-08-15  Vsevolod Vlasov  <vsevik@chromium.org>
    221
  • trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp

    r92768 r93042  
    357357}
    358358
    359 void InspectorDebuggerAgent::resume(ErrorString*)
    360 {
     359void InspectorDebuggerAgent::resume(ErrorString* errorString)
     360{
     361    if (!assertPaused(errorString))
     362        return;
    361363    m_injectedScriptManager->releaseObjectGroup(InspectorDebuggerAgent::backtraceObjectGroup);
    362364    scriptDebugServer().continueProgram();
    363365}
    364366
    365 void InspectorDebuggerAgent::stepOver(ErrorString*)
    366 {
     367void InspectorDebuggerAgent::stepOver(ErrorString* errorString)
     368{
     369    if (!assertPaused(errorString))
     370        return;
    367371    scriptDebugServer().stepOverStatement();
    368372}
    369373
    370 void InspectorDebuggerAgent::stepInto(ErrorString*)
    371 {
     374void InspectorDebuggerAgent::stepInto(ErrorString* errorString)
     375{
     376    if (!assertPaused(errorString))
     377        return;
    372378    scriptDebugServer().stepIntoStatement();
    373379}
    374380
    375 void InspectorDebuggerAgent::stepOut(ErrorString*)
    376 {
     381void InspectorDebuggerAgent::stepOut(ErrorString* errorString)
     382{
     383    if (!assertPaused(errorString))
     384        return;
    377385    scriptDebugServer().stepOutOfFunction();
    378386}
     
    506514}
    507515
     516bool InspectorDebuggerAgent::assertPaused(ErrorString* errorString)
     517{
     518    if (!m_pausedScriptState) {
     519        *errorString = "Can only perform operation while paused.";
     520        return false;
     521    }
     522    return true;
     523}
     524
    508525} // namespace WebCore
    509526
  • trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h

    r92768 r93042  
    137137    PassRefPtr<InspectorObject> resolveBreakpoint(const String& breakpointId, const String& scriptId, const ScriptBreakpoint&);
    138138    void clear();
     139    bool assertPaused(ErrorString*);
    139140
    140141    typedef HashMap<String, Script> ScriptsMap;
  • trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js

    r92962 r93042  
    951951    _stepOverClicked: function()
    952952    {
     953        if (!this._paused)
     954            return;
     955
    953956        this._paused = false;
    954957        this._stepping = true;
     
    961964    _stepIntoClicked: function()
    962965    {
     966        if (!this._paused)
     967            return;
     968
    963969        this._paused = false;
    964970        this._stepping = true;
     
    971977    _stepOutClicked: function()
    972978    {
     979        if (!this._paused)
     980            return;
     981
    973982        this._paused = false;
    974983        this._stepping = true;
Note: See TracChangeset for help on using the changeset viewer.