Title: [209311] trunk
- Revision
- 209311
- Author
- [email protected]
- Date
- 2016-12-04 12:22:58 -0800 (Sun, 04 Dec 2016)
Log Message
Web Inspector: Assertion Failures breakpoint should respect global Breakpoints enabled setting
https://bugs.webkit.org/show_bug.cgi?id=165277
<rdar://problem/29467098>
Reviewed by Mark Lam.
Source/_javascript_Core:
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::handleConsoleAssert):
Check that breakpoints are active before pausing.
LayoutTests:
New test for DebuggerManager.prototype.breakPointsEnabled.
* inspector/debugger/breakpoints-disabled-expected.txt: Added.
* inspector/debugger/breakpoints-disabled.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (209310 => 209311)
--- trunk/LayoutTests/ChangeLog 2016-12-04 09:20:35 UTC (rev 209310)
+++ trunk/LayoutTests/ChangeLog 2016-12-04 20:22:58 UTC (rev 209311)
@@ -1,3 +1,16 @@
+2016-12-04 Matt Baker <[email protected]>
+
+ Web Inspector: Assertion Failures breakpoint should respect global Breakpoints enabled setting
+ https://bugs.webkit.org/show_bug.cgi?id=165277
+ <rdar://problem/29467098>
+
+ Reviewed by Mark Lam.
+
+ New test for DebuggerManager.prototype.breakPointsEnabled.
+
+ * inspector/debugger/breakpoints-disabled-expected.txt: Added.
+ * inspector/debugger/breakpoints-disabled.html: Added.
+
2016-12-03 Dave Hyatt <[email protected]>
[CSS Parser] Remove Inspector test of Bison errors
Added: trunk/LayoutTests/inspector/debugger/breakpoints-disabled-expected.txt (0 => 209311)
--- trunk/LayoutTests/inspector/debugger/breakpoints-disabled-expected.txt (rev 0)
+++ trunk/LayoutTests/inspector/debugger/breakpoints-disabled-expected.txt 2016-12-04 20:22:58 UTC (rev 209311)
@@ -0,0 +1,18 @@
+CONSOLE MESSAGE: line 7: throwing TestError
+CONSOLE MESSAGE: line 12: testCatch
+CONSOLE MESSAGE: line 7: throwing TestError
+CONSOLE MESSAGE: line 16: catch TestError
+CONSOLE MESSAGE: line 18: DONE
+Check that special breakpoints aren't hit when breakpoints are disabled.
+
+
+== Running test suite: BreakpointsDisabled
+-- Running test case: AssertionsBreakpoint
+PASS: Should not pause.
+
+-- Running test case: AllUncaughtExceptionsBreakpoint
+PASS: Should not pause.
+
+-- Running test case: AllExceptionsBreakpoint
+PASS: Should not pause.
+
Added: trunk/LayoutTests/inspector/debugger/breakpoints-disabled.html (0 => 209311)
--- trunk/LayoutTests/inspector/debugger/breakpoints-disabled.html (rev 0)
+++ trunk/LayoutTests/inspector/debugger/breakpoints-disabled.html 2016-12-04 20:22:58 UTC (rev 209311)
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+<script src=""
+<script src=""
+<script>
+TestPage.allowUncaughtExceptions = true;
+
+function test()
+{
+ let suite = InspectorTest.createAsyncSuite("BreakpointsDisabled");
+
+ function addTestCase(name, description, _expression_, breakpoint) {
+ suite.addTestCase({
+ name,
+ description,
+ test(resolve, reject) {
+ let didPause = false;
+ let listener = WebInspector.debuggerManager.singleFireEventListener(WebInspector.DebuggerManager.Event.Paused, (event) => {
+ didPause = true;
+ InspectorTest.fail("Should not have paused.");
+ WebInspector.debuggerManager.resume();
+ reject();
+ });
+
+ breakpoint.disabled = false;
+ WebInspector.debuggerManager.breakpointsEnabled = false;
+
+ InspectorTest.evaluateInPage(_expression_, () => {
+ InspectorTest.expectFalse(didPause, "Should not pause.")
+ WebInspector.debuggerManager.removeEventListener(WebInspector.DebuggerManager.Event.Paused, listener);
+ WebInspector.debuggerManager.resume();
+ resolve();
+ });
+ }
+ });
+ }
+
+ addTestCase("AssertionsBreakpoint", "Should not pause on assertion failure.", "assertFalse()", WebInspector.debuggerManager.assertionsBreakpoint);
+ addTestCase("AllUncaughtExceptionsBreakpoint", "Should not pause on uncaught exception.", "doThrow()", WebInspector.debuggerManager.allUncaughtExceptionsBreakpoint);
+ addTestCase("AllExceptionsBreakpoint", "Should not pause on caught exception.", "testCatch()", WebInspector.debuggerManager.allExceptionsBreakpoint);
+
+ suite.runTestCasesAndFinish();
+}
+</script>
+</head>
+<body _onload_="runTest()">
+<p>Check that special breakpoints aren't hit when breakpoints are disabled.</p>
+</body>
+</html>
Modified: trunk/Source/_javascript_Core/ChangeLog (209310 => 209311)
--- trunk/Source/_javascript_Core/ChangeLog 2016-12-04 09:20:35 UTC (rev 209310)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-12-04 20:22:58 UTC (rev 209311)
@@ -1,3 +1,15 @@
+2016-12-04 Matt Baker <[email protected]>
+
+ Web Inspector: Assertion Failures breakpoint should respect global Breakpoints enabled setting
+ https://bugs.webkit.org/show_bug.cgi?id=165277
+ <rdar://problem/29467098>
+
+ Reviewed by Mark Lam.
+
+ * inspector/agents/InspectorDebuggerAgent.cpp:
+ (Inspector::InspectorDebuggerAgent::handleConsoleAssert):
+ Check that breakpoints are active before pausing.
+
2016-12-03 Yusuke Suzuki <[email protected]>
Refactor SymbolImpl layout
Modified: trunk/Source/_javascript_Core/inspector/agents/InspectorDebuggerAgent.cpp (209310 => 209311)
--- trunk/Source/_javascript_Core/inspector/agents/InspectorDebuggerAgent.cpp 2016-12-04 09:20:35 UTC (rev 209310)
+++ trunk/Source/_javascript_Core/inspector/agents/InspectorDebuggerAgent.cpp 2016-12-04 20:22:58 UTC (rev 209311)
@@ -248,6 +248,9 @@
void InspectorDebuggerAgent::handleConsoleAssert(const String& message)
{
+ if (!m_scriptDebugServer.breakpointsActive())
+ return;
+
if (m_pauseOnAssertionFailures)
breakProgram(DebuggerFrontendDispatcher::Reason::Assert, buildAssertPauseReason(message));
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes