Web Inspector: Using Breakpoint Actions Breaks iOS inspection
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Sep 2013 21:23:33 +0000 (21:23 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Sep 2013 21:23:33 +0000 (21:23 +0000)
https://bugs.webkit.org/show_bug.cgi?id=121862

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-09-24
Reviewed by Timothy Hatcher.

Only use DebuggerAgent.BreakpointActionType if it is available.
Otherwise leave options undefined for breakpoints since the backend
does not support it.

* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype._setBreakpoint):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156358 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/DebuggerManager.js

index b7f773e27a20d80be84be98cd31e17214dc3b80c..969c3ce345cdc6f51a94f8a011f5b40d4548673f 100644 (file)
@@ -1,3 +1,17 @@
+2013-09-24  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Using Breakpoint Actions Breaks iOS inspection
+        https://bugs.webkit.org/show_bug.cgi?id=121862
+
+        Reviewed by Timothy Hatcher.
+
+        Only use DebuggerAgent.BreakpointActionType if it is available.
+        Otherwise leave options undefined for breakpoints since the backend
+        does not support it.
+
+        * UserInterface/DebuggerManager.js:
+        (WebInspector.DebuggerManager.prototype._setBreakpoint):
+
 2013-09-24  Joseph Pecoraro  <pecoraro@apple.com>
 
         Web Inspector: Include iOS 7 Inspector.json Version
index 0bdcd541fc83ffb415355bc6f721d40afca9587f..42e01e294ab6408c33c5d849d3013ea4ed3072cd 100644 (file)
@@ -514,10 +514,13 @@ WebInspector.DebuggerManager.prototype = {
 
         // Convert BreakpointAction types to DebuggerAgent protocol types.
         // NOTE: Breakpoint.options returns new objects each time, so it is safe to modify.
-        var options = breakpoint.options;
-        if (options.actions.length) {
-            for (var i = 0; i < options.actions.length; ++i)
-                options.actions[i].type = this._debuggerBreakpointActionType(options.actions[i].type);
+        var options;
+        if (DebuggerAgent.BreakpointActionType) {
+            options = breakpoint.options;
+            if (options.actions.length) {
+                for (var i = 0; i < options.actions.length; ++i)
+                    options.actions[i].type = this._debuggerBreakpointActionType(options.actions[i].type);
+            }
         }
 
         // COMPATIBILITY (iOS 7): iOS 7 and earlier, DebuggerAgent.setBreakpoint* took a "condition" string argument.