Changeset 33425 in webkit


Ignore:
Timestamp:
May 13, 2008 6:44:59 PM (16 years ago)
Author:
timothy@apple.com
Message:

Fixes a crash when stepping out in the Inspector's debugger.

http://bugs.webkit.org/show_bug.cgi?id=19037

Reviewed by Dan Bernstein.

  • page/InspectorController.cpp:

(WebCore::currentCallFrame): Adds a null check of currentCallFrame,
since it can be null. Also returns JSNull to better signify this.

  • page/inspector/ScriptsPanel.js: Updates the debugger interface

when stepping so the currentCallFrame isn't accessed when not paused.
Adds a _clearInterface function to remove duplicate code.

Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r33420 r33425  
     12008-05-13  Timothy Hatcher  <timothy@apple.com>
     2
     3        Fixes a crash when stepping out in the Inspector's debugger.
     4
     5        http://bugs.webkit.org/show_bug.cgi?id=19037
     6
     7        Reviewed by Dan Bernstein.
     8
     9        * page/InspectorController.cpp:
     10        (WebCore::currentCallFrame): Adds a null check of currentCallFrame,
     11        since it can be null. Also returns JSNull to better signify this.
     12        * page/inspector/ScriptsPanel.js: Updates the debugger interface
     13        when stepping so the currentCallFrame isn't accessed when not paused.
     14        Adds a _clearInterface function to remove duplicate code.
     15
    1162008-05-13  chris fleizach  <cfleizach@apple.com>
    217
  • trunk/WebCore/page/InspectorController.cpp

    r33406 r33425  
    829829
    830830    JavaScriptCallFrame* callFrame = controller->currentCallFrame();
    831     if (!callFrame->isValid())
    832         return JSValueMakeUndefined(ctx);
     831    if (!callFrame || !callFrame->isValid())
     832        return JSValueMakeNull(ctx);
    833833
    834834    ExecState* globalExec = callFrame->execState()->lexicalGlobalObject()->globalExec();
  • trunk/WebCore/page/inspector/ScriptsPanel.js

    r33416 r33425  
    289289        this.visibleView = null;
    290290
    291         this._clearCurrentExecutionLine();
    292 
    293291        if (!InspectorController.debuggerAttached()) {
    294292            this._paused = false;
     
    297295        }
    298296
    299         this.sidebarPanes.callstack.update(null);
    300         this.sidebarPanes.scopechain.update(null);
    301 
    302         this._updateDebuggerButtons();
     297        this._clearInterface();
    303298
    304299        this.filesSelectElement.removeChildren();
     
    565560    },
    566561
     562    _clearInterface: function()
     563    {
     564        this.sidebarPanes.callstack.update(null);
     565        this.sidebarPanes.scopechain.update(null);
     566
     567        this._clearCurrentExecutionLine();
     568        this._updateDebuggerButtons();
     569    },
     570
    567571    _toggleDebugging: function()
    568572    {
     
    570574        this._waitingToPause = false;
    571575        this._stepping = false;
     576
     577        this._clearInterface();
    572578
    573579        if (InspectorController.debuggerAttached()) {
     
    578584            InspectorController.startDebuggingAndReloadInspectedPage();
    579585        }
    580 
    581         this.sidebarPanes.callstack.update(null);
    582         this.sidebarPanes.scopechain.update(null);
    583 
    584         this._clearCurrentExecutionLine();
    585         this._updateDebuggerButtons();
    586586    },
    587587
     
    598598        }
    599599
    600         this.sidebarPanes.callstack.update(null);
    601         this.sidebarPanes.scopechain.update(null);
    602 
    603         this._clearCurrentExecutionLine();
    604         this._updateDebuggerButtons();
     600        this._clearInterface();
    605601    },
    606602
     
    610606        this._stepping = true;
    611607
     608        this._clearInterface();
     609
    612610        InspectorController.stepOverStatementInDebugger();
    613611    },
     
    618616        this._stepping = true;
    619617
     618        this._clearInterface();
     619
    620620        InspectorController.stepIntoStatementInDebugger();
    621621    },
     
    625625        this._paused = false;
    626626        this._stepping = true;
     627
     628        this._clearInterface();
    627629
    628630        InspectorController.stepOutOfFunctionInDebugger();
Note: See TracChangeset for help on using the changeset viewer.