Diff
Modified: trunk/LayoutTests/ChangeLog (95082 => 95083)
--- trunk/LayoutTests/ChangeLog 2011-09-14 08:31:41 UTC (rev 95082)
+++ trunk/LayoutTests/ChangeLog 2011-09-14 09:29:31 UTC (rev 95083)
@@ -1,3 +1,15 @@
+2011-09-13 Pavel Feldman <[email protected]>
+
+ Web Inspector: [v8] building call frame info for location-less internal script function crashes.
+ https://bugs.webkit.org/show_bug.cgi?id=67991
+
+ Reviewed by Yury Semikhatsky.
+
+ * inspector/debugger/debugger-pause-in-internal-expected.txt: Added.
+ * inspector/debugger/debugger-pause-in-internal.html: Added.
+ * inspector/debugger/debugger-pause-on-exception-crash-expected.txt: Added.
+ * platform/chromium/inspector/debugger/debugger-pause-in-internal-expected.txt: Added.
+
2011-09-14 Fumitoshi Ukai <[email protected]>
Unreviewed, update chromium test expecations.
Added: trunk/LayoutTests/inspector/debugger/debugger-pause-in-internal-expected.txt (0 => 95083)
--- trunk/LayoutTests/inspector/debugger/debugger-pause-in-internal-expected.txt (rev 0)
+++ trunk/LayoutTests/inspector/debugger/debugger-pause-in-internal-expected.txt 2011-09-14 09:29:31 UTC (rev 95083)
@@ -0,0 +1,12 @@
+CONSOLE MESSAGE: line 2: SyntaxError: Unexpected token ')'
+Tests that pause on exception in internal script does not crash.
+
+Debugger was enabled.
+Script source was shown.
+Script execution paused.
+Call stack:
+ 0) throwException (debugger-pause-in-internal.html:9)
+ 1) handleClick (debugger-pause-in-internal.html:14)
+Script execution resumed.
+Debugger was disabled.
+
Property changes on: trunk/LayoutTests/inspector/debugger/debugger-pause-in-internal-expected.txt
___________________________________________________________________
Added: svn:eol-style
Added: trunk/LayoutTests/inspector/debugger/debugger-pause-in-internal.html (0 => 95083)
--- trunk/LayoutTests/inspector/debugger/debugger-pause-in-internal.html (rev 0)
+++ trunk/LayoutTests/inspector/debugger/debugger-pause-in-internal.html 2011-09-14 09:29:31 UTC (rev 95083)
@@ -0,0 +1,50 @@
+<html>
+<head>
+<script src=""
+<script src=""
+<script>
+
+function throwException()
+{
+ new Function("return ()");
+}
+
+function handleClick()
+{
+ throwException();
+}
+
+var test = function()
+{
+ InspectorTest.startDebuggerTest(step1);
+
+ function step1()
+ {
+ DebuggerAgent.setPauseOnExceptions(WebInspector.ScriptsPanel.PauseOnExceptionsState.PauseOnUncaughtExceptions);
+ InspectorTest.showScriptSource("debugger-pause-in-internal.html", step2);
+ }
+
+ function step2()
+ {
+ InspectorTest.addResult("Script source was shown.");
+ InspectorTest.evaluateInPage("setTimeout(handleClick, 0)");
+ InspectorTest.waitUntilPaused(step3);
+ }
+
+ function step3(callFrames)
+ {
+ InspectorTest.captureStackTrace(callFrames);
+ InspectorTest.completeDebuggerTest();
+ }
+}
+
+</script>
+</head>
+
+<body _onload_="runTest()">
+<p>
+Tests that pause on exception in internal script does not crash.
+</p>
+
+</body>
+</html>
Property changes on: trunk/LayoutTests/inspector/debugger/debugger-pause-in-internal.html
___________________________________________________________________
Added: svn:eol-style
Added: trunk/LayoutTests/platform/chromium/inspector/debugger/debugger-pause-in-internal-expected.txt (0 => 95083)
--- trunk/LayoutTests/platform/chromium/inspector/debugger/debugger-pause-in-internal-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/chromium/inspector/debugger/debugger-pause-in-internal-expected.txt 2011-09-14 09:29:31 UTC (rev 95083)
@@ -0,0 +1,13 @@
+CONSOLE MESSAGE: line 2: Uncaught SyntaxError: Unexpected token )
+Tests that pause on exception in internal script does not crash.
+
+Debugger was enabled.
+Script source was shown.
+Script execution paused.
+Call stack:
+ 0) Function ((internal script):(line number))
+ 1) throwException (debugger-pause-in-internal.html:9)
+ 2) handleClick (debugger-pause-in-internal.html:14)
+Script execution resumed.
+Debugger was disabled.
+
Property changes on: trunk/LayoutTests/platform/chromium/inspector/debugger/debugger-pause-in-internal-expected.txt
___________________________________________________________________
Added: svn:eol-style
Modified: trunk/Source/WebCore/ChangeLog (95082 => 95083)
--- trunk/Source/WebCore/ChangeLog 2011-09-14 08:31:41 UTC (rev 95082)
+++ trunk/Source/WebCore/ChangeLog 2011-09-14 09:29:31 UTC (rev 95083)
@@ -1,3 +1,17 @@
+2011-09-13 Pavel Feldman <[email protected]>
+
+ Web Inspector: [v8] building call frame info for location-less internal script function crashes.
+ https://bugs.webkit.org/show_bug.cgi?id=67991
+
+ Reviewed by Yury Semikhatsky.
+
+ Test: inspector/debugger/debugger-pause-in-internal.html
+
+ * bindings/v8/DebuggerScript.js:
+ ():
+ * bindings/v8/ScriptDebugServer.cpp:
+ (WebCore::ScriptDebugServer::currentCallFrame):
+
2011-09-14 Ben Wells <[email protected]>
Large canvas fills should not crash or create unnecessarily large image buffers
Modified: trunk/Source/WebCore/bindings/v8/DebuggerScript.js (95082 => 95083)
--- trunk/Source/WebCore/bindings/v8/DebuggerScript.js 2011-09-14 08:31:41 UTC (rev 95082)
+++ trunk/Source/WebCore/bindings/v8/DebuggerScript.js 2011-09-14 09:29:31 UTC (rev 95083)
@@ -264,8 +264,8 @@
return {
"sourceID": sourceID,
- "line": location.line,
- "column": location.column,
+ "line": location ? location.line : 0,
+ "column": location ? location.column : 0,
"functionName": functionName,
"thisObject": thisObject,
"scopeChain": scopeChain,
Modified: trunk/Source/WebCore/bindings/v8/ScriptDebugServer.cpp (95082 => 95083)
--- trunk/Source/WebCore/bindings/v8/ScriptDebugServer.cpp 2011-09-14 08:31:41 UTC (rev 95082)
+++ trunk/Source/WebCore/bindings/v8/ScriptDebugServer.cpp 2011-09-14 09:29:31 UTC (rev 95083)
@@ -251,8 +251,11 @@
v8::Handle<v8::Function> currentCallFrameFunction = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::New("currentCallFrame")));
v8::Handle<v8::Value> argv[] = { m_executionState.get() };
v8::Handle<v8::Value> currentCallFrameV8 = currentCallFrameFunction->Call(m_debuggerScript.get(), 1, argv);
+
+ ASSERT(!currentCallFrameV8.IsEmpty());
if (!currentCallFrameV8->IsObject())
return ScriptValue(v8::Null());
+
RefPtr<_javascript_CallFrame> currentCallFrame = _javascript_CallFrame::create(v8::Debug::GetDebugContext(), v8::Handle<v8::Object>::Cast(currentCallFrameV8));
v8::Context::Scope contextScope(m_pausedContext);
return ScriptValue(toV8(currentCallFrame.release()));