Title: [91568] trunk
- Revision
- 91568
- Author
- [email protected]
- Date
- 2011-07-22 08:29:06 -0700 (Fri, 22 Jul 2011)
Log 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.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (91567 => 91568)
--- trunk/LayoutTests/ChangeLog 2011-07-22 15:19:14 UTC (rev 91567)
+++ trunk/LayoutTests/ChangeLog 2011-07-22 15:29:06 UTC (rev 91568)
@@ -1,3 +1,15 @@
+2011-07-22 Pavel Podivilov <[email protected]>
+
+ Web Inspector: fix exception when paused in internal script.
+ https://bugs.webkit.org/show_bug.cgi?id=64995
+
+ Reviewed by Yury Semikhatsky.
+
+ * 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.
+
2011-07-22 Ilya Tikhonovsky <[email protected]>
Web Inspector: sometimes ReceiveResponse event is attached to wrong parent.
Modified: trunk/LayoutTests/http/tests/inspector/debugger-test.js (91567 => 91568)
--- trunk/LayoutTests/http/tests/inspector/debugger-test.js 2011-07-22 15:19:14 UTC (rev 91567)
+++ trunk/LayoutTests/http/tests/inspector/debugger-test.js 2011-07-22 15:29:06 UTC (rev 91568)
@@ -109,11 +109,15 @@
var frame = callFrames[i];
var script = WebInspector.debuggerModel.scriptForSourceID(frame.location.sourceId);
var url;
- if (script)
+ var lineNumber;
+ if (script) {
url = ""
- else
- url = "" script)"
- var s = " " + i + ") " + frame.functionName + " (" + url + ":" + (frame.location.lineNumber + 1) + ")";
+ lineNumber = frame.location.lineNumber + 1;
+ } else {
+ url = "" script)";
+ lineNumber = "(line number)";
+ }
+ var s = " " + i + ") " + frame.functionName + " (" + url + ":" + lineNumber + ")";
InspectorTest.addResult(s);
}
};
Added: trunk/LayoutTests/inspector/debugger/pause-in-internal-script-expected.txt (0 => 91568)
--- trunk/LayoutTests/inspector/debugger/pause-in-internal-script-expected.txt (rev 0)
+++ trunk/LayoutTests/inspector/debugger/pause-in-internal-script-expected.txt 2011-07-22 15:29:06 UTC (rev 91568)
@@ -0,0 +1,16 @@
+Tests that internal scripts unknown to front-end are processed correctly when appear in debugger call frames. Bug 64995
+
+Debugger was enabled.
+
+Running: testSetBreakpoint
+Script source was shown.
+Set timer for test function.
+Script execution paused.
+Call stack:
+ 0) (pause-in-internal-script.html:14)
+ 1) forEach ((internal script):(line number))
+ 2) testFunction (pause-in-internal-script.html:12)
+Script execution resumed.
+Script execution paused.
+Debugger was disabled.
+
Property changes on: trunk/LayoutTests/inspector/debugger/pause-in-internal-script-expected.txt
___________________________________________________________________
Added: svn:eol-style
Added: trunk/LayoutTests/inspector/debugger/pause-in-internal-script.html (0 => 91568)
--- trunk/LayoutTests/inspector/debugger/pause-in-internal-script.html (rev 0)
+++ trunk/LayoutTests/inspector/debugger/pause-in-internal-script.html 2011-07-22 15:29:06 UTC (rev 91568)
@@ -0,0 +1,52 @@
+<html>
+<head>
+<script src=""
+<script src=""
+
+<script>
+
+function testFunction()
+{
+ var array = [2, 5, 7];
+ var sum = 0;
+ array.forEach(function(key)
+ {
+ sum += array[key];
+ });
+ return sum;
+}
+
+function test()
+{
+ InspectorTest.runDebuggerTestSuite([
+ function testSetBreakpoint(next)
+ {
+ InspectorTest.showScriptSource("pause-in-internal-script.html", didShowScriptSource);
+
+ function didShowScriptSource(sourceFrame)
+ {
+ InspectorTest.addResult("Script source was shown.");
+ InspectorTest.setBreakpoint(sourceFrame, 13, "", true);
+ InspectorTest.runTestFunctionAndWaitUntilPaused(didPause);
+ }
+
+ function didPause(callFrames)
+ {
+ InspectorTest.captureStackTrace(callFrames);
+ next();
+ }
+ }
+ ]);
+};
+
+</script>
+
+</head>
+
+<body _onload_="runTest()">
+<p>Tests that internal scripts unknown to front-end are processed correctly when appear in debugger call frames.
+<a href="" 64995</a>
+</p>
+
+</body>
+</html>
Property changes on: trunk/LayoutTests/inspector/debugger/pause-in-internal-script.html
___________________________________________________________________
Added: svn:eol-style
Modified: trunk/Source/WebCore/ChangeLog (91567 => 91568)
--- trunk/Source/WebCore/ChangeLog 2011-07-22 15:19:14 UTC (rev 91567)
+++ trunk/Source/WebCore/ChangeLog 2011-07-22 15:29:06 UTC (rev 91568)
@@ -1,3 +1,15 @@
+2011-07-22 Pavel Podivilov <[email protected]>
+
+ Web Inspector: fix exception when paused in internal script.
+ https://bugs.webkit.org/show_bug.cgi?id=64995
+
+ Reviewed by Yury Semikhatsky.
+
+ Test: inspector/debugger/pause-in-internal-script.html
+
+ * inspector/front-end/DebuggerPresentationModel.js:
+ (WebInspector.PresenationCallFrame.prototype.sourceLine):
+
2011-07-22 Ilya Tikhonovsky <[email protected]>
Web Inspector: sometimes ReceiveResponse event is attached to wrong parent.
Modified: trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js (91567 => 91568)
--- trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js 2011-07-22 15:19:14 UTC (rev 91567)
+++ trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js 2011-07-22 15:29:06 UTC (rev 91568)
@@ -781,7 +781,10 @@
sourceLine: function(callback)
{
var location = this._callFrame.location;
- this._model._scriptLocationToUILocation(null, location.sourceId, location.lineNumber, location.columnNumber, callback);
+ if (!this.isInternalScript)
+ this._model._scriptLocationToUILocation(null, location.sourceId, location.lineNumber, location.columnNumber, callback);
+ else
+ callback(undefined, location.lineNumber);
}
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes