Changeset 91568 in webkit


Ignore:
Timestamp:
Jul 22, 2011 8:29:06 AM (13 years ago)
Author:
podivilov@chromium.org
Message:

Web Inspector: fix exception when paused in internal script.
https://bugs.webkit.org/show_bug.cgi?id=64995

Reviewed by Yury Semikhatsky.

Source/WebCore:

Test: inspector/debugger/pause-in-internal-script.html

  • inspector/front-end/DebuggerPresentationModel.js:

(WebInspector.PresenationCallFrame.prototype.sourceLine):

LayoutTests:

  • http/tests/inspector/debugger-test.js:

(initialize_DebuggerTest):

  • inspector/debugger/pause-in-internal-script-expected.txt: Added.
  • inspector/debugger/pause-in-internal-script.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r91567 r91568  
     12011-07-22  Pavel Podivilov  <podivilov@chromium.org>
     2
     3        Web Inspector: fix exception when paused in internal script.
     4        https://bugs.webkit.org/show_bug.cgi?id=64995
     5
     6        Reviewed by Yury Semikhatsky.
     7
     8        * http/tests/inspector/debugger-test.js:
     9        (initialize_DebuggerTest):
     10        * inspector/debugger/pause-in-internal-script-expected.txt: Added.
     11        * inspector/debugger/pause-in-internal-script.html: Added.
     12
    1132011-07-22  Ilya Tikhonovsky  <loislo@chromium.org>
    214
  • trunk/LayoutTests/http/tests/inspector/debugger-test.js

    r89386 r91568  
    110110        var script = WebInspector.debuggerModel.scriptForSourceID(frame.location.sourceId);
    111111        var url;
    112         if (script)
     112        var lineNumber;
     113        if (script) {
    113114            url = WebInspector.displayNameForURL(script.sourceURL);
    114         else
    115             url = "(internal script)"
    116         var s = "    " + i + ") " + frame.functionName + " (" + url + ":" + (frame.location.lineNumber + 1) + ")";
     115            lineNumber = frame.location.lineNumber + 1;
     116        } else {
     117            url = "(internal script)";
     118            lineNumber = "(line number)";
     119        }
     120        var s = "    " + i + ") " + frame.functionName + " (" + url + ":" + lineNumber + ")";
    117121        InspectorTest.addResult(s);
    118122    }
  • trunk/Source/WebCore/ChangeLog

    r91567 r91568  
     12011-07-22  Pavel Podivilov  <podivilov@chromium.org>
     2
     3        Web Inspector: fix exception when paused in internal script.
     4        https://bugs.webkit.org/show_bug.cgi?id=64995
     5
     6        Reviewed by Yury Semikhatsky.
     7
     8        Test: inspector/debugger/pause-in-internal-script.html
     9
     10        * inspector/front-end/DebuggerPresentationModel.js:
     11        (WebInspector.PresenationCallFrame.prototype.sourceLine):
     12
    1132011-07-22  Ilya Tikhonovsky  <loislo@chromium.org>
    214
  • trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js

    r90395 r91568  
    782782    {
    783783        var location = this._callFrame.location;
    784         this._model._scriptLocationToUILocation(null, location.sourceId, location.lineNumber, location.columnNumber, callback);
     784        if (!this.isInternalScript)
     785            this._model._scriptLocationToUILocation(null, location.sourceId, location.lineNumber, location.columnNumber, callback);
     786        else
     787            callback(undefined, location.lineNumber);
    785788    }
    786789}
Note: See TracChangeset for help on using the changeset viewer.