Index: third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js |
index 3b6b525f7e1b1c0a406c92c5cf409a005432ece1..947f509f815a4a855612925628373c593878e61a 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js |
+++ b/third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js |
@@ -69,9 +69,9 @@ WebInspector.CallStackSidebarPane.prototype = { |
this.callFrames = []; |
this._hiddenCallFrames = 0; |
- this._updateStatusMessage(details); |
- |
if (!details) { |
+ var infoElement = this.element.createChild("div", "gray-info-message"); |
+ infoElement.textContent = WebInspector.UIString("Not Paused"); |
WebInspector.context.setFlavor(WebInspector.DebuggerModel.CallFrame, null); |
return; |
} |
@@ -110,52 +110,6 @@ WebInspector.CallStackSidebarPane.prototype = { |
}, |
/** |
- * @param {?WebInspector.DebuggerPausedDetails} details |
- */ |
- _updateStatusMessage: function(details) |
- { |
- var status = this.contentElement.createChild("div", "callstack-info"); |
- status.removeChildren(); |
- |
- if (!details) { |
- status.textContent = WebInspector.UIString("Not Paused"); |
- status.classList.toggle("status", false); |
- return; |
- } |
- |
- if (details.reason === WebInspector.DebuggerModel.BreakReason.DOM) { |
- status.appendChild(WebInspector.domBreakpointsSidebarPane.createBreakpointHitStatusMessage(details)); |
- } else if (details.reason === WebInspector.DebuggerModel.BreakReason.EventListener) { |
- var eventName = details.auxData["eventName"]; |
- var eventNameForUI = WebInspector.EventListenerBreakpointsSidebarPane.eventNameForUI(eventName, details.auxData); |
- status.textContent = WebInspector.UIString("Paused on a \"%s\" Event Listener.", eventNameForUI); |
- } else if (details.reason === WebInspector.DebuggerModel.BreakReason.XHR) { |
- status.textContent = WebInspector.UIString("Paused on a XMLHttpRequest."); |
- } else if (details.reason === WebInspector.DebuggerModel.BreakReason.Exception) { |
- var description = details.auxData["description"] || ""; |
- status.textContent = WebInspector.UIString("Paused on exception: '%s'.", description.split("\n", 1)[0]); |
- } else if (details.reason === WebInspector.DebuggerModel.BreakReason.PromiseRejection) { |
- var description = details.auxData["description"] || ""; |
- status.textContent = WebInspector.UIString("Paused on promise rejection: '%s'.", description.split("\n", 1)[0]); |
- } else if (details.reason === WebInspector.DebuggerModel.BreakReason.Assert) { |
- status.textContent = WebInspector.UIString("Paused on assertion."); |
- } else if (details.reason === WebInspector.DebuggerModel.BreakReason.DebugCommand) { |
- status.textContent = WebInspector.UIString("Paused on a debugged function."); |
- } else { |
- if (details.callFrames.length) { |
- var uiLocation = details && details.callFrames.length ? WebInspector.debuggerWorkspaceBinding.rawLocationToUILocation(details.callFrames[0].location()) : null; |
- var breakpoint = uiLocation ? WebInspector.breakpointManager.findBreakpointOnLine(uiLocation.uiSourceCode, uiLocation.lineNumber) : null; |
- if (breakpoint) { |
- status.textContent = WebInspector.UIString("Paused on a JavaScript breakpoint."); |
- } |
- } else { |
- console.warn("ScriptsPanel paused, but callFrames.length is zero."); // TODO remove this once we understand this case better |
- } |
- } |
- status.classList.toggle("hidden", !status.firstChild); |
- }, |
- |
- /** |
* @param {!Array.<!WebInspector.DebuggerModel.CallFrame>} callFrames |
* @return {!Array<!WebInspector.CallStackSidebarPane.CallFrame>} |
*/ |