<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[175588] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/175588">175588</a></dd>
<dt>Author</dt> <dd>joepeck@webkit.org</dd>
<dt>Date</dt> <dd>2014-11-04 16:31:37 -0800 (Tue, 04 Nov 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Web Inspector: Pause on exceptions should show the actual exception
https://bugs.webkit.org/show_bug.cgi?id=63096
Reviewed by Timothy Hatcher.
Source/JavaScriptCore:
* debugger/Debugger.h:
Expose accessor for the pause reason to subclasses.
* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::type):
New "error" subtype for error objects.
* inspector/InjectedScriptSource.js:
When an object is an error object, use toString to provide a richer description.
* inspector/protocol/Runtime.json:
Expose a new "error" subtype for Error types (TypeError, ReferenceError, EvalError, etc).
* inspector/protocol/Debugger.json:
Provide type checked objects for different Debugger.pause pause reasons.
An exception provides the thrown object, but assert / CSP pauses provide
a richer typed object as the auxiliary data.
* inspector/ScriptDebugServer.cpp:
(Inspector::ScriptDebugServer::dispatchDidPause):
When paused because of an exception, pass the exception on.
* inspector/agents/InspectorDebuggerAgent.h:
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::handleConsoleAssert):
(Inspector::InspectorDebuggerAgent::scriptExecutionBlockedByCSP):
Provide richer data in pause events.
* inspector/scripts/codegen/generate_backend_commands.py:
(BackendCommandsGenerator.generate_domain.is_anonymous_enum_param):
(BackendCommandsGenerator.generate_domain):
* inspector/scripts/tests/expected/enum-values.json-result:
Generate frontend enums for anonymous enum event parameters.
Source/WebCore:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
Pass assertion message on.
Source/WebInspectorUI:
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
New strings / files.
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.get pauseReason):
(WebInspector.DebuggerManager.prototype.get pauseData):
(WebInspector.DebuggerManager.prototype.reset):
(WebInspector.DebuggerManager.prototype.debuggerDidPause):
(WebInspector.DebuggerManager.prototype._pauseReasonFromPayload):
Maintain the current pause reason and auxiliary data in the manager.
* UserInterface/Protocol/DebuggerObserver.js:
(WebInspector.DebuggerObserver.prototype.paused):
Pass previously unused event parameters on to the manager.
* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl):
Style error objects in the console like Objects. The new description
string provides a richer message if you console.log(exception).
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerDidResume):
(WebInspector.DebuggerSidebarPanel.prototype._updatePauseReason):
Update the UI when we pause / resume to show / hide a pause reason section.
* UserInterface/Views/DetailsSectionRow.js:
(WebInspector.DetailsSectionRow.prototype.set emptyMessage):
Fix a latent bug that would have thrown an exception if the setter was ever used.
* UserInterface/Views/DetailsSectionTextRow.js: Added.
(WebInspector.DetailsSectionTextRow):
(WebInspector.DetailsSectionTextRow.prototype.get text):
(WebInspector.DetailsSectionTextRow.prototype.set text):
* UserInterface/Views/DetailsSection.css:
(.details-section > .content > .group > .row.simple.data > .value):
(.details-section > .content > .group > .row.text):
Simple class for a section of centered text. This is modelled after
the empty message text style in other sections.
* UserInterface/Views/LogContentView.css:
(.console-formatted-object, .console-formatted-node, .console-formatted-error):
(.console-formatted-object .section, .console-formatted-node .section, .console-formatted-error .section):
(.console-formatted-object .properties, .console-formatted-node .properties, .console-formatted-error .properties):
Style "error" objects like regular objects. We may wish to treat differently later.
* UserInterface/Protocol/Legacy/6.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
Regenerate legacy backend commands to get the new enum.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoredebuggerDebuggerh">trunk/Source/JavaScriptCore/debugger/Debugger.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorInjectedScriptSourcejs">trunk/Source/JavaScriptCore/inspector/InjectedScriptSource.js</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorJSInjectedScriptHostcpp">trunk/Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorScriptDebugServercpp">trunk/Source/JavaScriptCore/inspector/ScriptDebugServer.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectoragentsInspectorDebuggerAgentcpp">trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectoragentsInspectorDebuggerAgenth">trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorprotocolDebuggerjson">trunk/Source/JavaScriptCore/inspector/protocol/Debugger.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorprotocolRuntimejson">trunk/Source/JavaScriptCore/inspector/protocol/Runtime.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptscodegengenerate_backend_commandspy">trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_backend_commands.py</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsexpectedenumvaluesjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/enum-values.json-result</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorInstrumentationcpp">trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp</a></li>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs">trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceControllersDebuggerManagerjs">trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceMainhtml">trunk/Source/WebInspectorUI/UserInterface/Main.html</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolDebuggerObserverjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/DebuggerObserver.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolLegacy60InspectorBackendCommandsjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/6.0/InspectorBackendCommands.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolLegacy70InspectorBackendCommandsjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolLegacy80InspectorBackendCommandsjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsConsoleMessageImpljs">trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageImpl.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsDebuggerSidebarPaneljs">trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsDetailsSectioncss">trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSection.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsDetailsSectionRowjs">trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSectionRow.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsLogContentViewcss">trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsScopeChainDetailsSidebarPaneljs">trunk/Source/WebInspectorUI/UserInterface/Views/ScopeChainDetailsSidebarPanel.js</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsDetailsSectionTextRowjs">trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSectionTextRow.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (175587 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2014-11-05 00:29:21 UTC (rev 175587)
+++ trunk/Source/JavaScriptCore/ChangeLog        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -1,3 +1,44 @@
</span><ins>+2014-11-04 Joseph Pecoraro <pecoraro@apple.com>
+
+ Web Inspector: Pause on exceptions should show the actual exception
+ https://bugs.webkit.org/show_bug.cgi?id=63096
+
+ Reviewed by Timothy Hatcher.
+
+ * debugger/Debugger.h:
+ Expose accessor for the pause reason to subclasses.
+
+ * inspector/JSInjectedScriptHost.cpp:
+ (Inspector::JSInjectedScriptHost::type):
+ New "error" subtype for error objects.
+
+ * inspector/InjectedScriptSource.js:
+ When an object is an error object, use toString to provide a richer description.
+
+ * inspector/protocol/Runtime.json:
+ Expose a new "error" subtype for Error types (TypeError, ReferenceError, EvalError, etc).
+
+ * inspector/protocol/Debugger.json:
+ Provide type checked objects for different Debugger.pause pause reasons.
+ An exception provides the thrown object, but assert / CSP pauses provide
+ a richer typed object as the auxiliary data.
+
+ * inspector/ScriptDebugServer.cpp:
+ (Inspector::ScriptDebugServer::dispatchDidPause):
+ When paused because of an exception, pass the exception on.
+
+ * inspector/agents/InspectorDebuggerAgent.h:
+ * inspector/agents/InspectorDebuggerAgent.cpp:
+ (Inspector::InspectorDebuggerAgent::handleConsoleAssert):
+ (Inspector::InspectorDebuggerAgent::scriptExecutionBlockedByCSP):
+ Provide richer data in pause events.
+
+ * inspector/scripts/codegen/generate_backend_commands.py:
+ (BackendCommandsGenerator.generate_domain.is_anonymous_enum_param):
+ (BackendCommandsGenerator.generate_domain):
+ * inspector/scripts/tests/expected/enum-values.json-result:
+ Generate frontend enums for anonymous enum event parameters.
+
</ins><span class="cx"> 2014-11-04 Michael Saboff <msaboff@apple.com>
</span><span class="cx">
</span><span class="cx"> Disable flakey float32-repeat-out-of-bounds.js and int8-repeat-out-of-bounds.js tests for ARM64
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredebuggerDebuggerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/debugger/Debugger.h (175587 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/debugger/Debugger.h        2014-11-05 00:29:21 UTC (rev 175587)
+++ trunk/Source/JavaScriptCore/debugger/Debugger.h        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -122,6 +122,8 @@
</span><span class="cx"> PausedForBreakpoint
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+ ReasonForPause reasonForPause() const { return m_reasonForPause; }
+
</ins><span class="cx"> virtual void handlePause(ReasonForPause, JSGlobalObject*) { }
</span><span class="cx"> virtual void notifyDoneProcessingDebuggerEvents() { }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorInjectedScriptSourcejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/InjectedScriptSource.js (175587 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/InjectedScriptSource.js        2014-11-05 00:29:21 UTC (rev 175587)
+++ trunk/Source/JavaScriptCore/inspector/InjectedScriptSource.js        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -750,6 +750,9 @@
</span><span class="cx"> if (subtype === "date")
</span><span class="cx"> return this._toString(obj);
</span><span class="cx">
</span><ins>+ if (subtype === "error")
+ return this._toString(obj);
+
</ins><span class="cx"> if (subtype === "node") {
</span><span class="cx"> var description = obj.nodeName.toLowerCase();
</span><span class="cx"> switch (obj.nodeType) {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorJSInjectedScriptHostcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp (175587 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp        2014-11-05 00:29:21 UTC (rev 175587)
+++ trunk/Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -121,6 +121,10 @@
</span><span class="cx"> if (value.isNumber())
</span><span class="cx"> return exec->vm().smallStrings.numberString();
</span><span class="cx">
</span><ins>+ JSObject* object = asObject(value);
+ if (object && object->isErrorInstance())
+ return jsNontrivialString(exec, ASCIILiteral("error"));
+
</ins><span class="cx"> if (value.inherits(JSArray::info()))
</span><span class="cx"> return jsNontrivialString(exec, ASCIILiteral("array"));
</span><span class="cx"> if (value.inherits(DateInstance::info()))
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorScriptDebugServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/ScriptDebugServer.cpp (175587 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/ScriptDebugServer.cpp        2014-11-05 00:29:21 UTC (rev 175587)
+++ trunk/Source/JavaScriptCore/inspector/ScriptDebugServer.cpp        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -138,7 +138,8 @@
</span><span class="cx"> JSC::ExecState* state = globalObject->globalExec();
</span><span class="cx"> RefPtr<JavaScriptCallFrame> javaScriptCallFrame = JavaScriptCallFrame::create(debuggerCallFrame);
</span><span class="cx"> JSValue jsCallFrame = toJS(state, globalObject, javaScriptCallFrame.get());
</span><del>- listener->didPause(state, Deprecated::ScriptValue(state->vm(), jsCallFrame), Deprecated::ScriptValue());
</del><ins>+ Deprecated::ScriptValue exception = reasonForPause() == PausedForException ? Deprecated::ScriptValue(state->vm(), currentException()) : Deprecated::ScriptValue();
+ listener->didPause(state, Deprecated::ScriptValue(state->vm(), jsCallFrame), exception);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void ScriptDebugServer::dispatchBreakpointActionLog(ExecState* exec, const String& message)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectoragentsInspectorDebuggerAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp (175587 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp        2014-11-05 00:29:21 UTC (rev 175587)
+++ trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -143,10 +143,14 @@
</span><span class="cx"> return scriptDebugServer().isPaused();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void InspectorDebuggerAgent::handleConsoleAssert()
</del><ins>+void InspectorDebuggerAgent::handleConsoleAssert(const String& message)
</ins><span class="cx"> {
</span><del>- if (scriptDebugServer().pauseOnExceptionsState() != JSC::Debugger::DontPauseOnExceptions)
- breakProgram(InspectorDebuggerFrontendDispatcher::Reason::Assert, nullptr);
</del><ins>+ if (scriptDebugServer().pauseOnExceptionsState() != JSC::Debugger::DontPauseOnExceptions) {
+ RefPtr<Inspector::Protocol::Debugger::AssertPauseReason> reason = Inspector::Protocol::Debugger::AssertPauseReason::create();
+ if (!message.isNull())
+ reason->setMessage(message);
+ breakProgram(InspectorDebuggerFrontendDispatcher::Reason::Assert, reason->openAccessors());
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static PassRefPtr<InspectorObject> buildObjectForBreakpointCookie(const String& url, int lineNumber, int columnNumber, const String& condition, RefPtr<InspectorArray>& actions, bool isRegex, bool autoContinue)
</span><span class="lines">@@ -548,9 +552,8 @@
</span><span class="cx"> void InspectorDebuggerAgent::scriptExecutionBlockedByCSP(const String& directiveText)
</span><span class="cx"> {
</span><span class="cx"> if (scriptDebugServer().pauseOnExceptionsState() != JSC::Debugger::DontPauseOnExceptions) {
</span><del>- RefPtr<InspectorObject> directive = InspectorObject::create();
- directive->setString(ASCIILiteral("directiveText"), directiveText);
- breakProgram(InspectorDebuggerFrontendDispatcher::Reason::CSPViolation, directive.release());
</del><ins>+ RefPtr<Inspector::Protocol::Debugger::CSPViolationPauseReason> reason = Inspector::Protocol::Debugger::CSPViolationPauseReason::create().setDirective(directiveText);
+ breakProgram(InspectorDebuggerFrontendDispatcher::Reason::CSPViolation, reason->openAccessors());
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectoragentsInspectorDebuggerAgenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h (175587 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h        2014-11-05 00:29:21 UTC (rev 175587)
+++ trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -93,7 +93,7 @@
</span><span class="cx">
</span><span class="cx"> bool isPaused();
</span><span class="cx">
</span><del>- void handleConsoleAssert();
</del><ins>+ void handleConsoleAssert(const String& message);
</ins><span class="cx">
</span><span class="cx"> void schedulePauseOnNextStatement(InspectorDebuggerFrontendDispatcher::Reason breakReason, PassRefPtr<InspectorObject> data);
</span><span class="cx"> void cancelPauseOnNextStatement();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorprotocolDebuggerjson"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/protocol/Debugger.json (175587 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/protocol/Debugger.json        2014-11-05 00:29:21 UTC (rev 175587)
+++ trunk/Source/JavaScriptCore/inspector/protocol/Debugger.json        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -96,6 +96,22 @@
</span><span class="cx"> { "name": "timestamp", "type": "number", "description": "Timestamp of when the sample was taken." },
</span><span class="cx"> { "name": "payload", "$ref": "Runtime.RemoteObject", "description": "Contents of the sample." }
</span><span class="cx"> ]
</span><ins>+ },
+ {
+ "id": "AssertPauseReason",
+ "description": "The pause reason auxiliary data when paused because of an assertion.",
+ "type": "object",
+ "properties": [
+ { "name": "message", "type": "string", "optional": true, "description": "The console.assert message string if provided." }
+ ]
+ },
+ {
+ "id": "CSPViolationPauseReason",
+ "description": "The pause reason auxiliary data when paused because of a Content Security Policy directive.",
+ "type": "object",
+ "properties": [
+ { "name": "directive", "type": "string", "description": "The CSP directive that blocked script execution." }
+ ]
</ins><span class="cx"> }
</span><span class="cx"> ],
</span><span class="cx"> "commands": [
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorprotocolRuntimejson"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/protocol/Runtime.json (175587 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/protocol/Runtime.json        2014-11-05 00:29:21 UTC (rev 175587)
+++ trunk/Source/JavaScriptCore/inspector/protocol/Runtime.json        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -13,7 +13,7 @@
</span><span class="cx"> "description": "Mirror object referencing original JavaScript object.",
</span><span class="cx"> "properties": [
</span><span class="cx"> { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean"], "description": "Object type." },
</span><del>- { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date"], "description": "Object subtype hint. Specified for <code>object</code> type values only." },
</del><ins>+ { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." },
</ins><span class="cx"> { "name": "className", "type": "string", "optional": true, "description": "Object class (constructor) name. Specified for <code>object</code> type values only." },
</span><span class="cx"> { "name": "value", "type": "any", "optional": true, "description": "Remote object value (in case of primitive values or JSON values if it was requested)." },
</span><span class="cx"> { "name": "description", "type": "string", "optional": true, "description": "String representation of the object." },
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx"> { "name": "type", "type": "string", "enum": ["object", "function", "undefined", "string", "number", "boolean"], "description": "Object type." },
</span><span class="cx"> { "name": "value", "type": "string", "optional": true, "description": "User-friendly property value string." },
</span><span class="cx"> { "name": "valuePreview", "$ref": "ObjectPreview", "optional": true, "description": "Nested value preview." },
</span><del>- { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date"], "description": "Object subtype hint. Specified for <code>object</code> type values only." }
</del><ins>+ { "name": "subtype", "type": "string", "optional": true, "enum": ["array", "null", "node", "regexp", "date", "error"], "description": "Object subtype hint. Specified for <code>object</code> type values only." }
</ins><span class="cx"> ]
</span><span class="cx"> },
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptscodegengenerate_backend_commandspy"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_backend_commands.py (175587 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_backend_commands.py        2014-11-05 00:29:21 UTC (rev 175587)
+++ trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_backend_commands.py        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -88,7 +88,18 @@
</span><span class="cx"> }
</span><span class="cx"> lines.append('InspectorBackend.registerEnum("%(domain)s.%(enumName)s", {%(enumMap)s});' % enum_args)
</span><span class="cx">
</span><ins>+ def is_anonymous_enum_param(param):
+ return isinstance(param.type, EnumType) and param.type.is_anonymous
+
</ins><span class="cx"> for event in domain.events:
</span><ins>+ for param in filter(is_anonymous_enum_param, event.event_parameters):
+ enum_args = {
+ 'domain': domain.domain_name,
+ 'enumName': '%s%s' % (ucfirst(event.event_name), ucfirst(param.parameter_name)),
+ 'enumMap': ", ".join(['%s: "%s"' % (Generator.stylized_name_for_enum_value(enum_value), enum_value) for enum_value in param.type.enum_values()])
+ }
+ lines.append('InspectorBackend.registerEnum("%(domain)s.%(enumName)s", {%(enumMap)s});' % enum_args)
+
</ins><span class="cx"> event_args = {
</span><span class="cx"> 'domain': domain.domain_name,
</span><span class="cx"> 'eventName': event.event_name,
</span><span class="lines">@@ -97,7 +108,6 @@
</span><span class="cx"> lines.append('InspectorBackend.registerEvent("%(domain)s.%(eventName)s", [%(params)s]);' % event_args)
</span><span class="cx">
</span><span class="cx"> for command in domain.commands:
</span><del>-
</del><span class="cx"> def generate_parameter_object(parameter):
</span><span class="cx"> optional_string = "true" if parameter.is_optional else "false"
</span><span class="cx"> pairs = []
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsexpectedenumvaluesjsonresult"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/enum-values.json-result (175587 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/enum-values.json-result        2014-11-05 00:29:21 UTC (rev 175587)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/expected/enum-values.json-result        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -101,6 +101,7 @@
</span><span class="cx">
</span><span class="cx"> // EventDomain.
</span><span class="cx"> InspectorBackend.registerEventDomainDispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, "EventDomain");
</span><ins>+InspectorBackend.registerEnum("EventDomain.EventWithEnumParameterParameter", {Shared: "shared", Black: "black", White: "white"});
</ins><span class="cx"> InspectorBackend.registerEvent("EventDomain.eventWithEnumParameter", ["parameter"]);
</span><span class="cx"> InspectorBackend.activateDomain("EventDomain");
</span><span class="cx"> ### End File: InspectorBackendCommands.js
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (175587 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-11-05 00:29:21 UTC (rev 175587)
+++ trunk/Source/WebCore/ChangeLog        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2014-11-04 Joseph Pecoraro <pecoraro@apple.com>
+
+ Web Inspector: Pause on exceptions should show the actual exception
+ https://bugs.webkit.org/show_bug.cgi?id=63096
+
+ Reviewed by Timothy Hatcher.
+
+ * inspector/InspectorInstrumentation.cpp:
+ (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
+ Pass assertion message on.
+
</ins><span class="cx"> 2014-11-04 Reza Abbasian <rabbasian@apple.com>
</span><span class="cx">
</span><span class="cx"> [iOS] Fix incorrect interface orientation that can be caused by fullscreen video dismissal.
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorInstrumentationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp (175587 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp        2014-11-05 00:29:21 UTC (rev 175587)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -888,7 +888,7 @@
</span><span class="cx"> // FIXME: This should just pass the message on to the debugger agent. JavaScriptCore InspectorDebuggerAgent should know Console MessageTypes.
</span><span class="cx"> if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents->inspectorDebuggerAgent()) {
</span><span class="cx"> if (isConsoleAssertMessage(source, type))
</span><del>- debuggerAgent->handleConsoleAssert();
</del><ins>+ debuggerAgent->handleConsoleAssert(message);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -899,7 +899,7 @@
</span><span class="cx"> // FIXME: This should just pass the message on to the debugger agent. JavaScriptCore InspectorDebuggerAgent should know Console MessageTypes.
</span><span class="cx"> if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents->inspectorDebuggerAgent()) {
</span><span class="cx"> if (isConsoleAssertMessage(source, type))
</span><del>- debuggerAgent->handleConsoleAssert();
</del><ins>+ debuggerAgent->handleConsoleAssert(message);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -907,6 +907,11 @@
</span><span class="cx"> {
</span><span class="cx"> if (WebConsoleAgent* consoleAgent = instrumentingAgents->webConsoleAgent())
</span><span class="cx"> consoleAgent->addMessageToConsole(source, type, level, message, scriptID, lineNumber, columnNumber, state, requestIdentifier);
</span><ins>+ // FIXME: This should just pass the message on to the debugger agent. JavaScriptCore InspectorDebuggerAgent should know Console MessageTypes.
+ if (InspectorDebuggerAgent* debuggerAgent = instrumentingAgents->inspectorDebuggerAgent()) {
+ if (isConsoleAssertMessage(source, type))
+ debuggerAgent->handleConsoleAssert(message);
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void InspectorInstrumentation::consoleCountImpl(InstrumentingAgents* instrumentingAgents, JSC::ExecState* state, PassRefPtr<ScriptArguments> arguments)
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (175587 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2014-11-05 00:29:21 UTC (rev 175587)
+++ trunk/Source/WebInspectorUI/ChangeLog        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -1,3 +1,63 @@
</span><ins>+2014-11-04 Joseph Pecoraro <pecoraro@apple.com>
+
+ Web Inspector: Pause on exceptions should show the actual exception
+ https://bugs.webkit.org/show_bug.cgi?id=63096
+
+ Reviewed by Timothy Hatcher.
+
+ * Localizations/en.lproj/localizedStrings.js:
+ * UserInterface/Main.html:
+ New strings / files.
+
+ * UserInterface/Controllers/DebuggerManager.js:
+ (WebInspector.DebuggerManager.prototype.get pauseReason):
+ (WebInspector.DebuggerManager.prototype.get pauseData):
+ (WebInspector.DebuggerManager.prototype.reset):
+ (WebInspector.DebuggerManager.prototype.debuggerDidPause):
+ (WebInspector.DebuggerManager.prototype._pauseReasonFromPayload):
+ Maintain the current pause reason and auxiliary data in the manager.
+
+ * UserInterface/Protocol/DebuggerObserver.js:
+ (WebInspector.DebuggerObserver.prototype.paused):
+ Pass previously unused event parameters on to the manager.
+
+ * UserInterface/Views/ConsoleMessageImpl.js:
+ (WebInspector.ConsoleMessageImpl):
+ Style error objects in the console like Objects. The new description
+ string provides a richer message if you console.log(exception).
+
+ * UserInterface/Views/DebuggerSidebarPanel.js:
+ (WebInspector.DebuggerSidebarPanel):
+ (WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause):
+ (WebInspector.DebuggerSidebarPanel.prototype._debuggerDidResume):
+ (WebInspector.DebuggerSidebarPanel.prototype._updatePauseReason):
+ Update the UI when we pause / resume to show / hide a pause reason section.
+
+ * UserInterface/Views/DetailsSectionRow.js:
+ (WebInspector.DetailsSectionRow.prototype.set emptyMessage):
+ Fix a latent bug that would have thrown an exception if the setter was ever used.
+
+ * UserInterface/Views/DetailsSectionTextRow.js: Added.
+ (WebInspector.DetailsSectionTextRow):
+ (WebInspector.DetailsSectionTextRow.prototype.get text):
+ (WebInspector.DetailsSectionTextRow.prototype.set text):
+ * UserInterface/Views/DetailsSection.css:
+ (.details-section > .content > .group > .row.simple.data > .value):
+ (.details-section > .content > .group > .row.text):
+ Simple class for a section of centered text. This is modelled after
+ the empty message text style in other sections.
+
+ * UserInterface/Views/LogContentView.css:
+ (.console-formatted-object, .console-formatted-node, .console-formatted-error):
+ (.console-formatted-object .section, .console-formatted-node .section, .console-formatted-error .section):
+ (.console-formatted-object .properties, .console-formatted-node .properties, .console-formatted-error .properties):
+ Style "error" objects like regular objects. We may wish to treat differently later.
+
+ * UserInterface/Protocol/Legacy/6.0/InspectorBackendCommands.js:
+ * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
+ * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
+ Regenerate legacy backend commands to get the new enum.
+
</ins><span class="cx"> 2014-11-04 Andrei Bucur <abucur@adobe.com>
</span><span class="cx">
</span><span class="cx"> Building WebInspectorUI should not run the clang static analyzer by default
</span></span></pre></div>
<a id="trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (175587 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2014-11-05 00:29:21 UTC (rev 175587)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -58,6 +58,7 @@
</span><span class="cx"> localizedStrings["Anonymous Scripts"] = "Anonymous Scripts";
</span><span class="cx"> localizedStrings["Anonymous StyleSheet %d"] = "Anonymous StyleSheet %d";
</span><span class="cx"> localizedStrings["Application Cache"] = "Application Cache";
</span><ins>+localizedStrings["Assertion"] = "Assertion";
</ins><span class="cx"> localizedStrings["Assertion failed:"] = "Assertion failed:";
</span><span class="cx"> localizedStrings["Assertive"] = "Assertive";
</span><span class="cx"> localizedStrings["Attribute"] = "Attribute";
</span><span class="lines">@@ -108,6 +109,7 @@
</span><span class="cx"> localizedStrings["Container Regions"] = "Container Regions";
</span><span class="cx"> localizedStrings["Content"] = "Content";
</span><span class="cx"> localizedStrings["Content Flow"] = "Content Flow";
</span><ins>+localizedStrings["Content Security Policy Violation"] = "Content Security Policy Violation";
</ins><span class="cx"> localizedStrings["Continue script execution (%s or %s)"] = "Continue script execution (%s or %s)";
</span><span class="cx"> localizedStrings["Continue to Here"] = "Continue to Here";
</span><span class="cx"> localizedStrings["Controls"] = "Controls";
</span><span class="lines">@@ -190,6 +192,7 @@
</span><span class="cx"> localizedStrings["Evaluate JavaScript"] = "Evaluate JavaScript";
</span><span class="cx"> localizedStrings["Event Dispatched"] = "Event Dispatched";
</span><span class="cx"> localizedStrings["Event Listeners"] = "Event Listeners";
</span><ins>+localizedStrings["Exception"] = "Exception";
</ins><span class="cx"> localizedStrings["Expand columns"] = "Expand columns";
</span><span class="cx"> localizedStrings["Expanded"] = "Expanded";
</span><span class="cx"> localizedStrings["Expires"] = "Expires";
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceControllersDebuggerManagerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js (175587 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js        2014-11-05 00:29:21 UTC (rev 175587)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -55,6 +55,10 @@
</span><span class="cx">
</span><span class="cx"> this._nextBreakpointActionIdentifier = 1;
</span><span class="cx">
</span><ins>+ this._paused = false;
+ this._pauseReason = null;
+ this._pauseData = null;
+
</ins><span class="cx"> this._scriptIdMap = {};
</span><span class="cx"> this._scriptURLMap = {};
</span><span class="cx">
</span><span class="lines">@@ -91,6 +95,13 @@
</span><span class="cx"> BreakpointsEnabledDidChange: "debugger-manager-breakpoints-enabled-did-change"
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+WebInspector.DebuggerManager.PauseReason = {
+ Exception: "exception",
+ Assertion: "assertion",
+ CSPViolation: "CSP-violation",
+ Other: "other",
+}
+
</ins><span class="cx"> WebInspector.DebuggerManager.prototype = {
</span><span class="cx"> constructor: WebInspector.DebuggerManager,
</span><span class="cx">
</span><span class="lines">@@ -120,6 +131,16 @@
</span><span class="cx"> return this._paused;
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ get pauseReason()
+ {
+ return this._pauseReason;
+ },
+
+ get pauseData()
+ {
+ return this._pauseData;
+ },
+
</ins><span class="cx"> get callFrames()
</span><span class="cx"> {
</span><span class="cx"> return this._callFrames;
</span><span class="lines">@@ -404,6 +425,9 @@
</span><span class="cx"> WebInspector.Script.resetUniqueDisplayNameNumbers();
</span><span class="cx">
</span><span class="cx"> this._paused = false;
</span><ins>+ this._pauseReason = null;
+ this._pauseData = null;
+
</ins><span class="cx"> this._scriptIdMap = {};
</span><span class="cx"> this._scriptURLMap = {};
</span><span class="cx">
</span><span class="lines">@@ -426,7 +450,7 @@
</span><span class="cx"> this.dispatchEventToListeners(WebInspector.DebuggerManager.Event.Resumed);
</span><span class="cx"> },
</span><span class="cx">
</span><del>- debuggerDidPause: function(callFramesPayload)
</del><ins>+ debuggerDidPause: function(callFramesPayload, reason, data)
</ins><span class="cx"> {
</span><span class="cx"> // Called from WebInspector.DebuggerObserver.
</span><span class="cx">
</span><span class="lines">@@ -440,6 +464,9 @@
</span><span class="cx"> this._paused = true;
</span><span class="cx"> this._callFrames = [];
</span><span class="cx">
</span><ins>+ this._pauseReason = this._pauseReasonFromPayload(reason);
+ this._pauseData = data || null;
+
</ins><span class="cx"> for (var i = 0; i < callFramesPayload.length; ++i) {
</span><span class="cx"> var callFramePayload = callFramesPayload[i];
</span><span class="cx"> var sourceCodeLocation = this._sourceCodeLocationFromPayload(callFramePayload.location);
</span><span class="lines">@@ -583,6 +610,21 @@
</span><span class="cx"> return new WebInspector.ScopeChainNode(type, object);
</span><span class="cx"> },
</span><span class="cx">
</span><ins>+ _pauseReasonFromPayload: function(payload)
+ {
+ // FIXME: Handle other backend pause seasons.
+ switch (payload) {
+ case DebuggerAgent.PausedReason.Exception:
+ return WebInspector.DebuggerManager.PauseReason.Exception;
+ case DebuggerAgent.PausedReason.Assert:
+ return WebInspector.DebuggerManager.PauseReason.Assertion;
+ case DebuggerAgent.PausedReason.CSPViolation:
+ return WebInspector.DebuggerManager.PauseReason.CSPViolation;
+ default:
+ return WebInspector.DebuggerManager.PauseReason.Other;
+ }
+ },
+
</ins><span class="cx"> _debuggerBreakpointActionType: function(type)
</span><span class="cx"> {
</span><span class="cx"> switch (type) {
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceMainhtml"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Main.html (175587 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Main.html        2014-11-05 00:29:21 UTC (rev 175587)
+++ trunk/Source/WebInspectorUI/UserInterface/Main.html        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -364,6 +364,7 @@
</span><span class="cx"> <script src="Views/DetailsSectionGroup.js"></script>
</span><span class="cx"> <script src="Views/DetailsSectionPropertiesRow.js"></script>
</span><span class="cx"> <script src="Views/DetailsSectionSimpleRow.js"></script>
</span><ins>+ <script src="Views/DetailsSectionTextRow.js"></script>
</ins><span class="cx"> <script src="Views/DividerNavigationItem.js"></script>
</span><span class="cx"> <script src="Views/EditingSupport.js"></script>
</span><span class="cx"> <script src="Views/EventListenerSection.js"></script>
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolDebuggerObserverjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/DebuggerObserver.js (175587 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/DebuggerObserver.js        2014-11-05 00:29:21 UTC (rev 175587)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/DebuggerObserver.js        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx">
</span><span class="cx"> paused: function(callFrames, reason, data)
</span><span class="cx"> {
</span><del>- WebInspector.debuggerManager.debuggerDidPause(callFrames);
</del><ins>+ WebInspector.debuggerManager.debuggerDidPause(callFrames, reason, data);
</ins><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> resumed: function()
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolLegacy60InspectorBackendCommandsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/6.0/InspectorBackendCommands.js (175587 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/6.0/InspectorBackendCommands.js        2014-11-05 00:29:21 UTC (rev 175587)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/6.0/InspectorBackendCommands.js        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -233,6 +233,7 @@
</span><span class="cx"> InspectorBackend.registerEvent("Debugger.scriptParsed", ["scriptId", "url", "startLine", "startColumn", "endLine", "endColumn", "isContentScript", "sourceMapURL"]);
</span><span class="cx"> InspectorBackend.registerEvent("Debugger.scriptFailedToParse", ["url", "scriptSource", "startLine", "errorLine", "errorMessage"]);
</span><span class="cx"> InspectorBackend.registerEvent("Debugger.breakpointResolved", ["breakpointId", "location"]);
</span><ins>+InspectorBackend.registerEnum("Debugger.PausedReason", {XHR: "XHR", DOM: "DOM", EventListener: "EventListener", Exception: "exception", Other: "other"});
</ins><span class="cx"> InspectorBackend.registerEvent("Debugger.paused", ["callFrames", "reason", "data"]);
</span><span class="cx"> InspectorBackend.registerEvent("Debugger.resumed", []);
</span><span class="cx"> InspectorBackend.registerCommand("Debugger.supportsNativeBreakpoints", [], ["result"]);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolLegacy70InspectorBackendCommandsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js (175587 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js        2014-11-05 00:29:21 UTC (rev 175587)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -264,6 +264,7 @@
</span><span class="cx"> InspectorBackend.registerEvent("Debugger.scriptParsed", ["scriptId", "url", "startLine", "startColumn", "endLine", "endColumn", "isContentScript", "sourceMapURL", "hasSourceURL"]);
</span><span class="cx"> InspectorBackend.registerEvent("Debugger.scriptFailedToParse", ["url", "scriptSource", "startLine", "errorLine", "errorMessage"]);
</span><span class="cx"> InspectorBackend.registerEvent("Debugger.breakpointResolved", ["breakpointId", "location"]);
</span><ins>+InspectorBackend.registerEnum("Debugger.PausedReason", {XHR: "XHR", DOM: "DOM", EventListener: "EventListener", Exception: "exception", Assert: "assert", CSPViolation: "CSPViolation", Other: "other"});
</ins><span class="cx"> InspectorBackend.registerEvent("Debugger.paused", ["callFrames", "reason", "data"]);
</span><span class="cx"> InspectorBackend.registerEvent("Debugger.resumed", []);
</span><span class="cx"> InspectorBackend.registerCommand("Debugger.enable", [], []);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolLegacy80InspectorBackendCommandsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js (175587 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js        2014-11-05 00:29:21 UTC (rev 175587)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -51,6 +51,7 @@
</span><span class="cx"> InspectorBackend.registerEvent("Debugger.scriptParsed", ["scriptId", "url", "startLine", "startColumn", "endLine", "endColumn", "isContentScript", "sourceMapURL", "hasSourceURL"]);
</span><span class="cx"> InspectorBackend.registerEvent("Debugger.scriptFailedToParse", ["url", "scriptSource", "startLine", "errorLine", "errorMessage"]);
</span><span class="cx"> InspectorBackend.registerEvent("Debugger.breakpointResolved", ["breakpointId", "location"]);
</span><ins>+InspectorBackend.registerEnum("Debugger.PausedReason", {XHR: "XHR", DOM: "DOM", EventListener: "EventListener", Exception: "exception", Assert: "assert", CSPViolation: "CSPViolation", Other: "other"});
</ins><span class="cx"> InspectorBackend.registerEvent("Debugger.paused", ["callFrames", "reason", "data"]);
</span><span class="cx"> InspectorBackend.registerEvent("Debugger.resumed", []);
</span><span class="cx"> InspectorBackend.registerEvent("Debugger.didSampleProbe", ["sample"]);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsConsoleMessageImpljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageImpl.js (175587 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageImpl.js        2014-11-05 00:29:21 UTC (rev 175587)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageImpl.js        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx">
</span><span class="cx"> this._customFormatters = {
</span><span class="cx"> "object": this._formatParameterAsObject,
</span><ins>+ "error": this._formatParameterAsObject,
</ins><span class="cx"> "array": this._formatParameterAsArray,
</span><span class="cx"> "node": this._formatParameterAsNode,
</span><span class="cx"> "string": this._formatParameterAsString
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsDebuggerSidebarPaneljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js (175587 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js        2014-11-05 00:29:21 UTC (rev 175587)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -132,6 +132,10 @@
</span><span class="cx"> var callStackGroup = new WebInspector.DetailsSectionGroup([this._callStackRow]);
</span><span class="cx"> this._callStackSection = new WebInspector.DetailsSection("call-stack", WebInspector.UIString("Call Stack"), [callStackGroup]);
</span><span class="cx">
</span><ins>+ this._pauseReasonRow = new WebInspector.DetailsSectionTextRow;
+ this._pauseReasonGroup = new WebInspector.DetailsSectionGroup([this._pauseReasonRow]);
+ this._pauseReasonSection = new WebInspector.DetailsSection("paused-reason", null, [this._pauseReasonGroup]);
+
</ins><span class="cx"> WebInspector.Breakpoint.addEventListener(WebInspector.Breakpoint.Event.DisplayLocationDidChange, this._breakpointDisplayLocationDidChange, this);
</span><span class="cx"> };
</span><span class="cx">
</span><span class="lines">@@ -229,6 +233,8 @@
</span><span class="cx"> _debuggerDidPause: function(event)
</span><span class="cx"> {
</span><span class="cx"> this.contentElement.insertBefore(this._callStackSection.element, this.contentElement.firstChild);
</span><ins>+ if (this._updatePauseReason())
+ this.contentElement.insertBefore(this._pauseReasonSection.element, this.contentElement.firstChild);
</ins><span class="cx">
</span><span class="cx"> this._debuggerPauseResumeButtonItem.enabled = true;
</span><span class="cx"> this._debuggerPauseResumeButtonItem.toggled = true;
</span><span class="lines">@@ -239,6 +245,7 @@
</span><span class="cx"> _debuggerDidResume: function(event)
</span><span class="cx"> {
</span><span class="cx"> this._callStackSection.element.remove();
</span><ins>+ this._pauseReasonSection.element.remove();
</ins><span class="cx">
</span><span class="cx"> this._debuggerPauseResumeButtonItem.enabled = true;
</span><span class="cx"> this._debuggerPauseResumeButtonItem.toggled = false;
</span><span class="lines">@@ -584,6 +591,50 @@
</span><span class="cx"> return comparisonResult;
</span><span class="cx">
</span><span class="cx"> return aLocation.displayColumnNumber - bLocation.displayColumnNumber;
</span><ins>+ },
+
+ _updatePauseReason: function()
+ {
+ var pauseData = WebInspector.debuggerManager.pauseData;
+
+ switch (WebInspector.debuggerManager.pauseReason) {
+ case WebInspector.DebuggerManager.PauseReason.Exception:
+ console.assert(pauseData, "Expected data with an exception, but found none.");
+ if (pauseData) {
+ // FIXME: We should improve the appearance of thrown objects. This works well for exception strings.
+ var data = WebInspector.RemoteObject.fromPayload(pauseData);
+ this._pauseReasonRow.text = data.description;
+ this._pauseReasonSection.title = WebInspector.UIString("Exception");
+ return true;
+ }
+ break;
+
+ case WebInspector.DebuggerManager.PauseReason.Assertion:
+ console.assert(pauseData, "Expected data with an assertion, but found none.");
+ if (pauseData && pauseData.message) {
+ // FIXME: We should include the assertion condition string.
+ this._pauseReasonRow.text = pauseData.message;
+ this._pauseReasonSection.title = WebInspector.UIString("Assertion");
+ return true;
+ }
+ break;
+
+ case WebInspector.DebuggerManager.PauseReason.CSPViolation:
+ console.assert(pauseData, "Expected data with a CSP Violation, but found none.");
+ if (pauseData) {
+ // COMPATIBILITY (iOS 8): 'directive' was 'directiveText'.
+ this._pauseReasonRow.text = pauseData.directive || pauseData.directiveText;
+ this._pauseReasonSection.title = WebInspector.UIString("Content Security Policy Violation");
+ return true;
+ }
+ break;
+
+ case WebInspector.DebuggerManager.PauseReason.Other:
+ console.error("Paused for unknown reason. We should always have a reason.");
+ break;
+ }
+
+ return false;
</ins><span class="cx"> }
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsDetailsSectioncss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSection.css (175587 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSection.css        2014-11-05 00:29:21 UTC (rev 175587)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSection.css        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -290,12 +290,17 @@
</span><span class="cx"> word-break: break-all;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-.details-section > .content > .group > .row.empty {
- padding: 6px;
</del><ins>+.details-section > .content > .group > .row.empty,
+.details-section > .content > .group > .row.text {
+ padding: 0 6px 7px 6px;
</ins><span class="cx"> text-align: center;
</span><span class="cx"> color: gray;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+.details-section > .content > .group > .row.text {
+ -webkit-user-select: text;
+}
+
</ins><span class="cx"> .details-section > .content > .group > .row.properties:not(.empty) {
</span><span class="cx"> padding: 4px 6px;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsDetailsSectionRowjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSectionRow.js (175587 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSectionRow.js        2014-11-05 00:29:21 UTC (rev 175587)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSectionRow.js        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx"> {
</span><span class="cx"> this._emptyMessage = emptyMessage || "";
</span><span class="cx">
</span><del>- if (!this.childNodes.length)
</del><ins>+ if (!this._element.childNodes.length)
</ins><span class="cx"> this.showEmptyMessage();
</span><span class="cx"> },
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsDetailsSectionTextRowjs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSectionTextRow.js (0 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSectionTextRow.js         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSectionTextRow.js        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.DetailsSectionTextRow = function(text)
+{
+ WebInspector.DetailsSectionRow.call(this);
+
+ this.element.classList.add(WebInspector.DetailsSectionTextRow.StyleClassName);
+
+ this.element.textContent = text;
+};
+
+WebInspector.DetailsSectionTextRow.StyleClassName = "text";
+
+WebInspector.DetailsSectionTextRow.prototype = {
+ constructor: WebInspector.DetailsSectionTextRow,
+ __proto__: WebInspector.DetailsSectionRow.prototype,
+
+ // Public
+
+ get text()
+ {
+ return this.element.textContent;
+ },
+
+ set text(text)
+ {
+ this.element.textContent = text;
+ }
+};
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsLogContentViewcss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.css (175587 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.css        2014-11-05 00:29:21 UTC (rev 175587)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.css        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -246,18 +246,18 @@
</span><span class="cx"> display: none;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-.console-formatted-object, .console-formatted-node {
</del><ins>+.console-formatted-object, .console-formatted-node, .console-formatted-error {
</ins><span class="cx"> position: relative;
</span><span class="cx"> display: inline-block;
</span><span class="cx"> vertical-align: top;
</span><span class="cx"> color: black;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-.console-formatted-object .section, .console-formatted-node .section {
</del><ins>+.console-formatted-object .section, .console-formatted-node .section, .console-formatted-error .section {
</ins><span class="cx"> position: static;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-.console-formatted-object .properties, .console-formatted-node .properties {
</del><ins>+.console-formatted-object .properties, .console-formatted-node .properties, .console-formatted-error .properties {
</ins><span class="cx"> padding-left: 0 !important;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsScopeChainDetailsSidebarPaneljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ScopeChainDetailsSidebarPanel.js (175587 => 175588)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ScopeChainDetailsSidebarPanel.js        2014-11-05 00:29:21 UTC (rev 175587)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ScopeChainDetailsSidebarPanel.js        2014-11-05 00:31:37 UTC (rev 175588)
</span><span class="lines">@@ -23,7 +23,8 @@
</span><span class="cx"> * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-WebInspector.ScopeChainDetailsSidebarPanel = function() {
</del><ins>+WebInspector.ScopeChainDetailsSidebarPanel = function()
+{
</ins><span class="cx"> WebInspector.DetailsSidebarPanel.call(this, "scope-chain", WebInspector.UIString("Scope Chain"), WebInspector.UIString("Scope Chain"), "Images/NavigationItemVariable.svg", "5");
</span><span class="cx">
</span><span class="cx"> this._callFrame = null;
</span></span></pre>
</div>
</div>
</body>
</html>