Changeset 139285 in webkit


Ignore:
Timestamp:
Jan 9, 2013 11:05:40 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: Don't throw exceptions when we don't have a callstack
https://bugs.webkit.org/show_bug.cgi?id=104849

Patch by John J. Barton <johnjbarton@chromium.org> on 2013-01-09
Reviewed by Pavel Feldman.

Check array details.callFrames.length before accessing array;

No new tests, but this fix may help us find the cause of 'other' reasons.

  • inspector/front-end/ScriptsPanel.js:

(WebInspector.ScriptsPanel.prototype._debuggerPaused):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r139283 r139285  
     12013-01-09  John J. Barton  <johnjbarton@chromium.org>
     2
     3        Web Inspector: Don't throw exceptions when we don't have a callstack
     4        https://bugs.webkit.org/show_bug.cgi?id=104849
     5
     6        Reviewed by Pavel Feldman.
     7
     8        Check array details.callFrames.length before accessing array;
     9
     10        No new tests, but this fix may help us find the cause of 'other' reasons.
     11
     12        * inspector/front-end/ScriptsPanel.js:
     13        (WebInspector.ScriptsPanel.prototype._debuggerPaused):
     14
    1152013-01-09  Eugene Klyuchnikov  <eustas@chromium.org>
    216
  • trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js

    r138496 r139285  
    311311                this.sidebarPanes.callstack.setStatus(WebInspector.UIString("Paused on a JavaScript breakpoint."));
    312312            }
    313             details.callFrames[0].createLiveLocation(didGetUILocation.bind(this));
     313            if (details.callFrames.length)
     314                details.callFrames[0].createLiveLocation(didGetUILocation.bind(this));
     315            else
     316                console.warn("ScriptsPanel paused, but callFrames.length is zero."); // TODO remove this once we understand this case better
    314317        }
    315318
Note: See TracChangeset for help on using the changeset viewer.