<!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>[193069] branches/safari-601-branch</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/193069">193069</a></dd>
<dt>Author</dt> <dd>timothy@apple.com</dd>
<dt>Date</dt> <dd>2015-12-03 10:42:52 -0800 (Thu, 03 Dec 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/188017">r188017</a>. rdar://problem/23221163</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari601branchLayoutTestsChangeLog">branches/safari-601-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari601branchSourceWebInspectorUIChangeLog">branches/safari-601-branch/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#branchessafari601branchSourceWebInspectorUIUserInterfaceMainhtml">branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Main.html</a></li>
<li><a href="#branchessafari601branchSourceWebInspectorUIUserInterfaceModelsCallFramejs">branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Models/CallFrame.js</a></li>
<li><a href="#branchessafari601branchSourceWebInspectorUIUserInterfaceModelsStackTracejs">branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Models/StackTrace.js</a></li>
<li><a href="#branchessafari601branchSourceWebInspectorUIUserInterfaceProtocolRemoteObjectjs">branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js</a></li>
<li><a href="#branchessafari601branchSourceWebInspectorUIUserInterfaceViewsCallFrameViewcss">branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/CallFrameView.css</a></li>
<li><a href="#branchessafari601branchSourceWebInspectorUIUserInterfaceViewsCallFrameViewjs">branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/CallFrameView.js</a></li>
<li><a href="#branchessafari601branchSourceWebInspectorUIUserInterfaceViewsConsoleMessageViewcss">branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.css</a></li>
<li><a href="#branchessafari601branchSourceWebInspectorUIUserInterfaceViewsConsoleMessageViewjs">branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js</a></li>
<li><a href="#branchessafari601branchSourceWebInspectorUIUserInterfaceViewsFormattedValuejs">branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/FormattedValue.js</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari601branchLayoutTestsinspectordebuggerjsstacktraceexpectedtxt">branches/safari-601-branch/LayoutTests/inspector/debugger/js-stacktrace-expected.txt</a></li>
<li><a href="#branchessafari601branchLayoutTestsinspectordebuggerjsstacktracehtml">branches/safari-601-branch/LayoutTests/inspector/debugger/js-stacktrace.html</a></li>
<li><a href="#branchessafari601branchSourceWebInspectorUIUserInterfaceViewsErrorObjectViewcss">branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/ErrorObjectView.css</a></li>
<li><a href="#branchessafari601branchSourceWebInspectorUIUserInterfaceViewsErrorObjectViewjs">branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/ErrorObjectView.js</a></li>
<li><a href="#branchessafari601branchSourceWebInspectorUIUserInterfaceViewsStackTraceViewcss">branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/StackTraceView.css</a></li>
<li><a href="#branchessafari601branchSourceWebInspectorUIUserInterfaceViewsStackTraceViewjs">branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/StackTraceView.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari601branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/LayoutTests/ChangeLog (193068 => 193069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/LayoutTests/ChangeLog        2015-12-03 18:42:41 UTC (rev 193068)
+++ branches/safari-601-branch/LayoutTests/ChangeLog        2015-12-03 18:42:52 UTC (rev 193069)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2015-12-02  Timothy Hatcher  &lt;timothy@apple.com&gt;
+
+        Merge r188017. rdar://problem/23221163
+
+    2015-08-05  Nikita Vasilyev  &lt;nvasilyev@apple.com&gt;
+
+            Web Inspector: Logging error objects should have a better UI
+            https://bugs.webkit.org/show_bug.cgi?id=143853
+
+            Add tests for stack trace format in case it changes.
+
+            Reviewed by Brian Burg.
+
+            * inspector/debugger/js-stacktrace-expected.txt: Added.
+            * inspector/debugger/js-stacktrace.html: Added.
+
</ins><span class="cx"> 2015-12-01  Timothy Hatcher  &lt;timothy@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r187903. rdar://problem/23221163
</span></span></pre></div>
<a id="branchessafari601branchLayoutTestsinspectordebuggerjsstacktraceexpectedtxt"></a>
<div class="addfile"><h4>Added: branches/safari-601-branch/LayoutTests/inspector/debugger/js-stacktrace-expected.txt (0 => 193069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/LayoutTests/inspector/debugger/js-stacktrace-expected.txt                                (rev 0)
+++ branches/safari-601-branch/LayoutTests/inspector/debugger/js-stacktrace-expected.txt        2015-12-03 18:42:52 UTC (rev 193069)
</span><span class="lines">@@ -0,0 +1,78 @@
</span><ins>+Test that the inspector can parse the stack trace format used by JSC for Error instances and console.trace.
+
+console.trace():
+[
+    {
+        &quot;lineNumber&quot;: 15,
+        &quot;columnNumber&quot;: 22,
+        &quot;functionName&quot;: &quot;typeError&quot;,
+        &quot;nativeCode&quot;: false
+    },
+    {
+        &quot;lineNumber&quot;: 6,
+        &quot;columnNumber&quot;: 21,
+        &quot;functionName&quot;: &quot;typeErrorWrap&quot;,
+        &quot;nativeCode&quot;: false
+    }
+]
+
+Error object:
+[
+    {
+        &quot;functionName&quot;: &quot;typeError&quot;,
+        &quot;url&quot;: &quot;/inspector/debugger/js-stacktrace.html&quot;,
+        &quot;lineNumber&quot;: &quot;14&quot;,
+        &quot;columnNumber&quot;: &quot;30&quot;
+    },
+    {
+        &quot;functionName&quot;: &quot;typeErrorWrap&quot;,
+        &quot;url&quot;: &quot;/inspector/debugger/js-stacktrace.html&quot;,
+        &quot;lineNumber&quot;: &quot;7&quot;,
+        &quot;columnNumber&quot;: &quot;21&quot;
+    }
+]
+
+console.trace():
+[
+    {
+        &quot;lineNumber&quot;: 15,
+        &quot;columnNumber&quot;: 22,
+        &quot;functionName&quot;: &quot;typeError&quot;,
+        &quot;nativeCode&quot;: false
+    },
+    {
+        &quot;lineNumber&quot;: null,
+        &quot;columnNumber&quot;: null,
+        &quot;functionName&quot;: &quot;map&quot;,
+        &quot;nativeCode&quot;: true
+    },
+    {
+        &quot;lineNumber&quot;: 22,
+        &quot;columnNumber&quot;: 20,
+        &quot;functionName&quot;: &quot;testWithNativeCallInBetween&quot;,
+        &quot;nativeCode&quot;: false
+    }
+]
+
+Error object:
+[
+    {
+        &quot;functionName&quot;: &quot;typeError&quot;,
+        &quot;url&quot;: &quot;/inspector/debugger/js-stacktrace.html&quot;,
+        &quot;lineNumber&quot;: &quot;14&quot;,
+        &quot;columnNumber&quot;: &quot;30&quot;
+    },
+    {
+        &quot;functionName&quot;: &quot;map&quot;,
+        &quot;url&quot;: &quot;[native code]&quot;,
+        &quot;lineNumber&quot;: 0,
+        &quot;columnNumber&quot;: 0
+    },
+    {
+        &quot;functionName&quot;: &quot;testWithNativeCallInBetween&quot;,
+        &quot;url&quot;: &quot;/inspector/debugger/js-stacktrace.html&quot;,
+        &quot;lineNumber&quot;: &quot;23&quot;,
+        &quot;columnNumber&quot;: &quot;20&quot;
+    }
+]
+
</ins></span></pre></div>
<a id="branchessafari601branchLayoutTestsinspectordebuggerjsstacktracehtml"></a>
<div class="addfile"><h4>Added: branches/safari-601-branch/LayoutTests/inspector/debugger/js-stacktrace.html (0 => 193069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/LayoutTests/inspector/debugger/js-stacktrace.html                                (rev 0)
+++ branches/safari-601-branch/LayoutTests/inspector/debugger/js-stacktrace.html        2015-12-03 18:42:52 UTC (rev 193069)
</span><span class="lines">@@ -0,0 +1,112 @@
</span><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../http/tests/inspector/inspector-test.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+function typeErrorWrap()
+{
+    return typeError();
+}
+
+function typeError()
+{
+    var object = {};
+    try {
+        object.propertyDoesnt.exist;
+    } catch (e) {
+        console.trace();
+        return e.stack;
+    }
+}
+
+function testWithNativeCallInBetween()
+{
+    return [42].map(typeError)[0];
+}
+
+
+function test()
+{
+    WebInspector.logManager.addEventListener(WebInspector.LogManager.Event.MessageAdded, function(event) {
+        InspectorTest.log(&quot;\nconsole.trace():&quot;);
+
+        var stackTrace = [];
+        var callFramesBeforeEval = stripCallFramesAfterEval(event.data.message.stackTrace.callFrames);
+        for (var callFrame of callFramesBeforeEval) {
+            var lineNumber = callFrame.sourceCodeLocation ? callFrame.sourceCodeLocation.lineNumber : null;
+            var columnNumber = callFrame.sourceCodeLocation ? callFrame.sourceCodeLocation.columnNumber : null;
+            stackTrace.push({
+                lineNumber: lineNumber,
+                columnNumber: columnNumber,
+                functionName: callFrame.functionName,
+                nativeCode: callFrame.nativeCode
+            });
+        }
+
+        InspectorTest.log(JSON.stringify(stackTrace, null, 4));
+    });
+
+    InspectorTest.evaluateInPage(&quot;typeErrorWrap()&quot;, function(error, result) {
+        InspectorTest.log(&quot;\nError object:&quot;);
+
+        if (error)
+            InspectorTest.log(error);
+
+        var stackTrace = stripPayloadAfterEval(WebInspector.StackTrace._parseStackTrace(result.value));
+        stackTrace = stripFilePaths(stackTrace);
+
+        InspectorTest.log(JSON.stringify(stackTrace, null, 4));
+        InspectorTest.completeTest();
+    });
+
+    InspectorTest.evaluateInPage(&quot;testWithNativeCallInBetween()&quot;, function(error, result) {
+        InspectorTest.log(&quot;\nError object:&quot;);
+
+        if (error)
+            InspectorTest.log(error);
+
+        var stackTrace = stripPayloadAfterEval(WebInspector.StackTrace._parseStackTrace(result.value));
+        stackTrace = stripFilePaths(stackTrace);
+
+        InspectorTest.log(JSON.stringify(stackTrace, null, 4));
+        InspectorTest.completeTest();
+    });
+
+    function stripFilePaths(stackTrace)
+    {
+        for (var frame of stackTrace) {
+            if (typeof frame.url === &quot;string&quot;)
+                frame.url = frame.url.replace(/^.+?LayoutTests/, &quot;&quot;);
+        }
+        return stackTrace;
+    }
+
+    function stripCallFramesAfterEval(stackTrace)
+    {
+        var index = 0;
+        for (var frame of stackTrace) {
+            if (frame.nativeCode &amp;&amp; frame.functionName === null)
+                break;
+            index++;
+        }
+        return stackTrace.slice(0, index);
+    }
+
+    function stripPayloadAfterEval(payload)
+    {
+        var index = 0;
+        for (var frame of payload) {
+            if (frame.functionName === &quot;eval code&quot;)
+                break;
+            index++;
+        }
+        return payload.slice(0, index);
+    }
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;runTest()&quot;&gt;
+&lt;p&gt;
+Test that the inspector can parse the stack trace format used by JSC for Error instances and console.trace.&lt;br&gt;
+&lt;/p&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="branchessafari601branchSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebInspectorUI/ChangeLog (193068 => 193069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebInspectorUI/ChangeLog        2015-12-03 18:42:41 UTC (rev 193068)
+++ branches/safari-601-branch/Source/WebInspectorUI/ChangeLog        2015-12-03 18:42:52 UTC (rev 193069)
</span><span class="lines">@@ -1,5 +1,94 @@
</span><span class="cx"> 2015-12-02  Timothy Hatcher  &lt;timothy@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r188017. rdar://problem/23221163
+
+    2015-08-05  Nikita Vasilyev  &lt;nvasilyev@apple.com&gt;
+
+            Web Inspector: Logging error objects should have a better UI
+            https://bugs.webkit.org/show_bug.cgi?id=143853
+
+            Previously, an error object looked like any other object, which wasn't very useful.
+            Source links couldn't be clicked and stacktraces were unreadable.
+
+            Unify console.trace, caught and uncaught exceptions. The following examples use
+            the same StaceTraceView:
+            - ({}).x.y
+            - try { ({}).x.y } catch (e) { console.log(e); }
+            - console.trace()
+
+            Reviewed by Brian Burg.
+
+            * UserInterface/Main.html:
+            * UserInterface/Models/CallFrame.js:
+            (WebInspector.CallFrame.fromPayload):
+            (WebInspector.CallFrame):
+            * UserInterface/Protocol/RemoteObject.js:
+            (WebInspector.RemoteObject.prototype.getOwnPropertyDescriptorsAsObject):
+            * UserInterface/Test.html:
+            * UserInterface/Views/CallFrameView.css:
+            (.call-frame .separator):
+            (.call-frame .subtitle .source-link): Deleted.
+            (.call-frame:focus .subtitle .source-link): Deleted.
+            (.call-frame .subtitle:empty): Deleted.
+            (.call-frame .subtitle): Deleted.
+            * UserInterface/Views/CallFrameView.js:
+            (WebInspector.CallFrameView):
+            - Start usind CallFrameView in stacktraces.
+            - Introduce showFunctionName optional argument. In stacktraces anonymous functions
+            are shown as &quot;(anonymous function)&quot; but in console message location
+            links (the ones on the right side of a console message) we omit them.
+            - Dash was a pseudo-element and it couldn't be copied to the clipboard.
+            Make it an actual HTML element.
+
+            * UserInterface/Views/ConsoleMessageView.css:
+            (.console-message-location.call-frame):
+            (.console-message-location.call-frame &gt; .title):
+            (.console-message-location.call-frame &gt; .subtitle &gt; .source-link):
+            Since .call-frame rules are now used in stacktraces, move console message
+            specific rules from CallFrameView.css to ConsoleMessageView.css.
+
+            * UserInterface/Views/ConsoleMessageView.js:
+            (WebInspector.ConsoleMessageView.prototype._appendLocationLink):
+            (WebInspector.ConsoleMessageView.prototype._appendStackTrace):
+            (WebInspector.ConsoleMessageView.prototype._formatParameter):
+            (WebInspector.ConsoleMessageView.prototype._formatParameterAsError): Added.
+            Format errors differently from other objects.
+
+            * UserInterface/Views/ErrorObjectView.css: Added.
+            (.error-object::before):
+            (.error-object.expanded::before):
+            (.error-object-link-container):
+            (.error-object.expanded &gt; .formatted-error &gt; .error-object-link-container):
+            (.error-object:not(.expanded) .error-object-outline):
+            (.error-object-outline):
+            * UserInterface/Views/ErrorObjectView.js: Added.
+            (WebInspector.ErrorObjectView):
+            (WebInspector.ErrorObjectView.parseStackTrace):
+            (WebInspector.ErrorObjectView.makeSourceLinkWithPrefix):
+            (WebInspector.ErrorObjectView.prototype.get object):
+            (WebInspector.ErrorObjectView.prototype.get element):
+            (WebInspector.ErrorObjectView.prototype.get treeOutline):
+            (WebInspector.ErrorObjectView.prototype.get expanded):
+            (WebInspector.ErrorObjectView.prototype.update):
+            (WebInspector.ErrorObjectView.prototype.expand):
+            (WebInspector.ErrorObjectView.prototype.collapse):
+            (WebInspector.ErrorObjectView.prototype._handlePreviewOrTitleElementClick):
+            (WebInspector.ErrorObjectView.prototype._buildStackTrace):
+            ErrorObjectView is used to log caught exceptions, e.g.:
+            try { i.dont.exist++ } catch (e) { console.log(e) }
+
+            * UserInterface/Views/FormattedValue.js:
+            (WebInspector.FormattedValue.createElementForError): Added.
+            Create error preview.
+
+            (WebInspector.FormattedValue.createElementForTypesAndValue):
+            Fix typo.
+
+            (WebInspector.FormattedValue.createObjectPreviewOrFormattedValueForRemoteObject):
+            Format errors differently from other objects.
+
+2015-12-02  Timothy Hatcher  &lt;timothy@apple.com&gt;
+
</ins><span class="cx">         Merge r188015. rdar://problem/23221163
</span><span class="cx"> 
</span><span class="cx">     2015-08-05  Matt Baker  &lt;mattbaker@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari601branchSourceWebInspectorUIUserInterfaceMainhtml"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Main.html (193068 => 193069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Main.html        2015-12-03 18:42:41 UTC (rev 193068)
+++ branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Main.html        2015-12-03 18:42:52 UTC (rev 193069)
</span><span class="lines">@@ -78,6 +78,7 @@
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/DividerNavigationItem.css&quot;&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/Editing.css&quot;&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/EventListenerSectionGroup.css&quot;&gt;
</span><ins>+    &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/ErrorObjectView.css&quot;&gt;
</ins><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/FilterBar.css&quot;&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/FindBanner.css&quot;&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/FlexibleSpaceNavigationItem.css&quot;&gt;
</span><span class="lines">@@ -137,6 +138,7 @@
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/SidebarPanel.css&quot;&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/Slider.css&quot;&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/SourceCodeTextEditor.css&quot;&gt;
</span><ins>+    &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/StackTraceView.css&quot;&gt;
</ins><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/StorageSidebarPanel.css&quot;&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/StyleRuleIcons.css&quot;&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;Views/SyntaxHighlightingDefaultTheme.css&quot;&gt;
</span><span class="lines">@@ -428,6 +430,7 @@
</span><span class="cx">     &lt;script src=&quot;Views/DefaultDashboardView.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/DividerNavigationItem.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/EditingSupport.js&quot;&gt;&lt;/script&gt;
</span><ins>+    &lt;script src=&quot;Views/ErrorObjectView.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">     &lt;script src=&quot;Views/EventListenerSection.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/EventListenerSectionGroup.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/FilterBar.js&quot;&gt;&lt;/script&gt;
</span><span class="lines">@@ -517,6 +520,7 @@
</span><span class="cx">     &lt;script src=&quot;Views/SourceCodeTimelineTimelineDataGridNode.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/SourceCodeTimelineTreeElement.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/SourceMapResourceTreeElement.js&quot;&gt;&lt;/script&gt;
</span><ins>+    &lt;script src=&quot;Views/StackTraceView.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">     &lt;script src=&quot;Views/StorageSidebarPanel.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/SyntaxHighlightingSupport.js&quot;&gt;&lt;/script&gt;
</span><span class="cx">     &lt;script src=&quot;Views/TextContentView.js&quot;&gt;&lt;/script&gt;
</span></span></pre></div>
<a id="branchessafari601branchSourceWebInspectorUIUserInterfaceModelsCallFramejs"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Models/CallFrame.js (193068 => 193069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Models/CallFrame.js        2015-12-03 18:42:41 UTC (rev 193068)
+++ branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Models/CallFrame.js        2015-12-03 18:42:52 UTC (rev 193069)
</span><span class="lines">@@ -125,7 +125,9 @@
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        var functionName = payload.functionName !== &quot;global code&quot; ? payload.functionName : null;
</del><ins>+        var functionName = null;
+        if (payload.functionName !== &quot;global code&quot; &amp;&amp; payload.functionName !== &quot;eval code&quot;)
+            functionName = payload.functionName;
</ins><span class="cx"> 
</span><span class="cx">         return new WebInspector.CallFrame(null, sourceCodeLocation, functionName, null, null, nativeCode);
</span><span class="cx">     }
</span></span></pre></div>
<a id="branchessafari601branchSourceWebInspectorUIUserInterfaceModelsStackTracejs"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Models/StackTrace.js (193068 => 193069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Models/StackTrace.js        2015-12-03 18:42:41 UTC (rev 193068)
+++ branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Models/StackTrace.js        2015-12-03 18:42:52 UTC (rev 193069)
</span><span class="lines">@@ -42,6 +42,48 @@
</span><span class="cx">         return new WebInspector.StackTrace(callFrames);
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    static fromString(stack)
+    {
+        var payload = WebInspector.StackTrace._parseStackTrace(stack);
+        return WebInspector.StackTrace.fromPayload(payload);
+    }
+
+    static _parseStackTrace(stack)
+    {
+        var lines = stack.split(/\n/g);
+        var result = [];
+
+        for (var line of lines) {
+            var functionName = &quot;&quot;;
+            var url = &quot;&quot;;
+            var lineNumber = 0;
+            var columnNumber = 0;
+
+            var index = line.indexOf(&quot;@&quot;);
+            if (index !== -1) {
+                functionName = line.slice(0, index);
+                url = line.slice(index + 1);
+
+                var columnIndex = url.lastIndexOf(&quot;:&quot;);
+                if (columnIndex !== -1) {
+                    columnNumber = url.slice(columnIndex + 1);
+
+                    url = url.slice(0, columnIndex);
+                    var lineIndex = url.lastIndexOf(&quot;:&quot;, columnIndex);
+                    if (lineIndex !== -1) {
+                        lineNumber = url.slice(lineIndex + 1, columnIndex);
+                        url = url.slice(0, lineIndex);
+                    }
+                }
+            } else
+                functionName = line;
+
+            result.push({functionName, url, lineNumber, columnNumber});
+        }
+
+        return result;
+    }
+
</ins><span class="cx">     // Public
</span><span class="cx"> 
</span><span class="cx">     get callFrames()
</span></span></pre></div>
<a id="branchessafari601branchSourceWebInspectorUIUserInterfaceProtocolRemoteObjectjs"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js (193068 => 193069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js        2015-12-03 18:42:41 UTC (rev 193068)
+++ branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js        2015-12-03 18:42:52 UTC (rev 193069)
</span><span class="lines">@@ -535,6 +535,19 @@
</span><span class="cx">         RuntimeAgent.getProperties(this._objectId, ownProperties, true, this._getPropertyDescriptorsResolver.bind(this, callback));
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    getOwnPropertyDescriptorsAsObject(callback)
+    {
+        this.getOwnPropertyDescriptors(function(properties) {
+            var propertiesResult = {};
+            var internalPropertiesResult = {};
+            for (var propertyDescriptor of properties) {
+                var object = propertyDescriptor.isInternalProperty ? internalPropertiesResult : propertiesResult;
+                object[propertyDescriptor.name] = propertyDescriptor;
+            }
+            callback(propertiesResult, internalPropertiesResult);
+        });
+    }
+
</ins><span class="cx">     _getPropertyDescriptorsResolver(callback, error, properties, internalProperties)
</span><span class="cx">     {
</span><span class="cx">         if (error) {
</span></span></pre></div>
<a id="branchessafari601branchSourceWebInspectorUIUserInterfaceViewsCallFrameViewcss"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/CallFrameView.css (193068 => 193069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/CallFrameView.css        2015-12-03 18:42:41 UTC (rev 193068)
+++ branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/CallFrameView.css        2015-12-03 18:42:52 UTC (rev 193069)
</span><span class="lines">@@ -40,24 +40,6 @@
</span><span class="cx">     display: inline-block;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.call-frame .title {
-    max-width: 20vw;
-    overflow: hidden;
-    text-overflow: ellipsis;
-    display: inline-block;
-}
-
-.call-frame .source-link {
-    max-width: 50vw;
-    overflow: hidden;
-    text-overflow: ellipsis;
-    display: inline-block;
-}
-
-.call-frame .title + .subtitle &gt; .source-link {
-    max-width: 30vw;
-}
-
</del><span class="cx"> .call-frame .subtitle,
</span><span class="cx"> .call-frame .subtitle .source-link {
</span><span class="cx">     color: hsla(0, 0%, 0%, 0.6);
</span><span class="lines">@@ -81,7 +63,7 @@
</span><span class="cx">     background-color: red;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.call-frame .title + .subtitle::before {
-    content: &quot; — &quot;;
-    color: hsla(0, 0%, 0%, 0.4);
</del><ins>+.call-frame .separator {
+    white-space: nowrap;
+    color: hsla(0, 0%, 0%, 0.2);
</ins><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari601branchSourceWebInspectorUIUserInterfaceViewsCallFrameViewjs"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/CallFrameView.js (193068 => 193069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/CallFrameView.js        2015-12-03 18:42:41 UTC (rev 193068)
+++ branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/CallFrameView.js        2015-12-03 18:42:52 UTC (rev 193069)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> 
</span><span class="cx"> WebInspector.CallFrameView = class CallFrameView extends WebInspector.Object
</span><span class="cx"> {
</span><del>-    constructor(callFrame)
</del><ins>+    constructor(callFrame, showFunctionName)
</ins><span class="cx">     {
</span><span class="cx">         console.assert(callFrame instanceof WebInspector.CallFrame);
</span><span class="cx"> 
</span><span class="lines">@@ -40,32 +40,36 @@
</span><span class="cx">             WebInspector.linkifyElement(callFrameElement, sourceCodeLocation);
</span><span class="cx"> 
</span><span class="cx">             var linkElement = document.createElement(&quot;a&quot;);
</span><del>-            linkElement.className = &quot;source-link&quot;;
</del><ins>+            linkElement.classList.add(&quot;source-link&quot;);
</ins><span class="cx">             linkElement.href = sourceCodeLocation.sourceCode.url;
</span><ins>+
+            if (showFunctionName) {
+                var separatorElement = document.createElement(&quot;span&quot;);
+                separatorElement.classList.add(&quot;separator&quot;);
+                separatorElement.textContent = &quot; — &quot;;
+                subtitleElement.appendChild(separatorElement);
+            }
+
</ins><span class="cx">             subtitleElement.appendChild(linkElement);
</span><span class="cx"> 
</span><span class="cx">             sourceCodeLocation.populateLiveDisplayLocationTooltip(linkElement);
</span><span class="cx">             sourceCodeLocation.populateLiveDisplayLocationString(linkElement, &quot;textContent&quot;);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (callFrame.functionName) {
</del><ins>+        var titleElement = document.createElement(&quot;span&quot;);
+        titleElement.classList.add(&quot;title&quot;);
+
+        if (showFunctionName) {
</ins><span class="cx">             var imgElement = document.createElement(&quot;img&quot;);
</span><del>-            imgElement.className = &quot;icon&quot;;
-            callFrameElement.appendChild(imgElement);
</del><ins>+            imgElement.classList.add(&quot;icon&quot;);
</ins><span class="cx"> 
</span><del>-            var titlesElement = document.createElement(&quot;div&quot;);
-            titlesElement.className = &quot;titles&quot;;
-            callFrameElement.appendChild(titlesElement);
</del><ins>+            titleElement.appendChild(imgElement);
+            titleElement.appendChild(document.createTextNode(callFrame.functionName || WebInspector.UIString(&quot;(anonymous function)&quot;)));
+        }
</ins><span class="cx"> 
</span><del>-            var titleElement = document.createElement(&quot;span&quot;);
-            titleElement.className = &quot;title&quot;;
-            titleElement.textContent = callFrame.functionName;
-            titlesElement.appendChild(titleElement);
</del><ins>+        callFrameElement.appendChild(titleElement);
+        callFrameElement.appendChild(subtitleElement);
</ins><span class="cx"> 
</span><del>-            titlesElement.appendChild(subtitleElement);
-        } else
-            callFrameElement.appendChild(subtitleElement);
-
</del><span class="cx">         return callFrameElement;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari601branchSourceWebInspectorUIUserInterfaceViewsConsoleMessageViewcss"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.css (193068 => 193069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.css        2015-12-03 18:42:41 UTC (rev 193068)
+++ branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.css        2015-12-03 18:42:52 UTC (rev 193069)
</span><span class="lines">@@ -236,11 +236,27 @@
</span><span class="cx">     -webkit-user-select: text;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.console-message .call-frame {
</del><ins>+.console-message-location.call-frame {
+    display: inline-block;
</ins><span class="cx">     -webkit-user-select: text;
</span><del>-    height: 1.2em;
</del><ins>+    max-height: 16px;
+
+    max-width: 50vw;
+    overflow: hidden;
+    text-overflow: ellipsis;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+.console-message-location.call-frame &gt; .title {
+    max-width: 20vw;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: inline-block;
+}
+
+.console-message-location.call-frame &gt; .subtitle &gt; .source-link {
+    max-width: 30vw;
+}
+
</ins><span class="cx"> .console-message .go-to-link {
</span><span class="cx">     color: hsla(0, 0%, 0%, 0.6);
</span><span class="cx">     text-decoration: none;
</span></span></pre></div>
<a id="branchessafari601branchSourceWebInspectorUIUserInterfaceViewsConsoleMessageViewjs"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js (193068 => 193069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js        2015-12-03 18:42:41 UTC (rev 193068)
+++ branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js        2015-12-03 18:42:52 UTC (rev 193069)
</span><span class="lines">@@ -319,7 +319,8 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (callFrame) {
</span><del>-            var locationElement = new WebInspector.CallFrameView(callFrame);
</del><ins>+            const showFunctionName = !!callFrame.functionName;
+            var locationElement = new WebInspector.CallFrameView(callFrame, showFunctionName);
</ins><span class="cx">             locationElement.classList.add(&quot;console-message-location&quot;);
</span><span class="cx">             this._element.appendChild(locationElement);
</span><span class="cx"> 
</span><span class="lines">@@ -377,18 +378,11 @@
</span><span class="cx">         if (this._message.type === WebInspector.ConsoleMessage.MessageType.Trace)
</span><span class="cx">             this.expand();
</span><span class="cx"> 
</span><del>-        this._stackTraceElement = this._element.appendChild(document.createElement(&quot;ul&quot;));
-        this._stackTraceElement.classList.add(&quot;console-message-stack-trace-container&quot;);
-        this._stackTraceElement.classList.add(&quot;console-message-text&quot;);
</del><ins>+        this._stackTraceElement = this._element.appendChild(document.createElement(&quot;div&quot;));
+        this._stackTraceElement.classList.add(&quot;console-message-text&quot;, &quot;console-message-stack-trace-container&quot;);
</ins><span class="cx"> 
</span><del>-        for (var callFrame of this._message.stackTrace.callFrames) {
-            var callFrameElement = this._stackTraceElement.appendChild(document.createElement(&quot;li&quot;));
-            callFrameElement.classList.add(&quot;console-message-stack-trace-call-frame&quot;);
-            callFrameElement.textContent = callFrame.functionName || WebInspector.UIString(&quot;(anonymous function)&quot;);
-            var url = (callFrame.sourceCodeLocation &amp;&amp; callFrame.sourceCodeLocation.sourceCode &amp;&amp; callFrame.sourceCodeLocation.sourceCode.url) || &quot;&quot;;
-            if (url &amp;&amp; !this._shouldHideURL(url))
-                callFrameElement.appendChild(this._linkifyCallFrame(callFrame));
-        }
</del><ins>+        var callFramesElement = new WebInspector.StackTraceView(this._message.stackTrace).element;
+        this._stackTraceElement.appendChild(callFramesElement);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     _createRemoteObjectIfNeeded(parameter)
</span><span class="lines">@@ -486,7 +480,7 @@
</span><span class="cx"> 
</span><span class="cx">         var formatters = {
</span><span class="cx">             &quot;object&quot;: this._formatParameterAsObject,
</span><del>-            &quot;error&quot;: this._formatParameterAsObject,
</del><ins>+            &quot;error&quot;: this._formatParameterAsError,
</ins><span class="cx">             &quot;map&quot;: this._formatParameterAsObject,
</span><span class="cx">             &quot;set&quot;: this._formatParameterAsObject,
</span><span class="cx">             &quot;weakmap&quot;: this._formatParameterAsObject,
</span><span class="lines">@@ -527,6 +521,12 @@
</span><span class="cx">         element.appendChild(this._objectTree.element);
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    _formatParameterAsError(object, element)
+    {
+        var errorObjectView = new WebInspector.ErrorObjectView(object);
+        element.appendChild(errorObjectView.element);
+    }
+
</ins><span class="cx">     _formatParameterAsArray(array, element)
</span><span class="cx">     {
</span><span class="cx">         this._objectTree = new WebInspector.ObjectTreeView(array, WebInspector.ObjectTreeView.Mode.Properties, this._rootPropertyPathForObject(array));
</span><span class="lines">@@ -648,30 +648,6 @@
</span><span class="cx">         return WebInspector.linkifyLocation(url, lineNumber, columnNumber, &quot;console-message-url&quot;);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    _linkifyCallFrameLocation(url, lineNumber, columnNumber)
-    {
-        // ConsoleMessage stack trace line numbers are one-based.
-        lineNumber = lineNumber ? lineNumber - 1 : 0;
-        columnNumber = columnNumber ? columnNumber - 1 : 0;
-        return this._linkifyLocation(url, lineNumber, columnNumber);
-    }
-
-    _linkifyCallFrame(callFrame)
-    {
-        var url = &quot;&quot;;
-        var lineNumber = 0;
-        var columnNumber = 0;
-
-        var sourceCodeLocation = callFrame._sourceCodeLocation;
-        if (sourceCodeLocation) {
-            lineNumber = sourceCodeLocation.lineNumber;
-            columnNumber = sourceCodeLocation.columnNumber;
-            url = sourceCodeLocation.sourceCode &amp;&amp; sourceCodeLocation.sourceCode.url || &quot;&quot;;
-        }
-
-        return this._linkifyCallFrameLocation(url, lineNumber, columnNumber);
-    }
-
</del><span class="cx">     _userProvidedColumnNames(columnNamesArgument)
</span><span class="cx">     {
</span><span class="cx">         if (!columnNamesArgument)
</span></span></pre></div>
<a id="branchessafari601branchSourceWebInspectorUIUserInterfaceViewsErrorObjectViewcssfromrev193068branchessafari601branchSourceWebInspectorUIUserInterfaceModelsStackTracejs"></a>
<div class="copfile"><h4>Copied: branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/ErrorObjectView.css (from rev 193068, branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Models/StackTrace.js) (0 => 193069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/ErrorObjectView.css                                (rev 0)
+++ branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/ErrorObjectView.css        2015-12-03 18:42:52 UTC (rev 193069)
</span><span class="lines">@@ -0,0 +1,58 @@
</span><ins>+/*
+ * Copyright (C) 2015 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.
+ */
+
+.error-object::before {
+    display: inline-block;
+    vertical-align: baseline;
+    margin-bottom: -2px;
+    margin-right: 2px;
+    width: 13px;
+    height: 13px;
+    background-image: -webkit-canvas(navigation-sidebar-panel-disclosure-triangle-closed-normal);
+    background-size: 13px 13px;
+    background-repeat: no-repeat;
+    background-position: center;
+    content: &quot;&quot;;
+}
+
+.error-object.expanded::before {
+    background-image: -webkit-canvas(navigation-sidebar-panel-disclosure-triangle-open-normal);
+}
+
+.error-object-link-container {
+    color: hsla(0, 0%, 0%, 0.2);
+}
+
+.error-object.expanded &gt; .formatted-error &gt; .error-object-link-container {
+    display: none;
+}
+
+.error-object:not(.expanded) .error-object-outline {
+    display: none;
+}
+
+.error-object-outline {
+    padding-left: 16px
+}
</ins></span></pre></div>
<a id="branchessafari601branchSourceWebInspectorUIUserInterfaceViewsErrorObjectViewjs"></a>
<div class="addfile"><h4>Added: branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/ErrorObjectView.js (0 => 193069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/ErrorObjectView.js                                (rev 0)
+++ branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/ErrorObjectView.js        2015-12-03 18:42:52 UTC (rev 193069)
</span><span class="lines">@@ -0,0 +1,143 @@
</span><ins>+/*
+ * Copyright (C) 2015 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.ErrorObjectView = class ErrorObjectView extends WebInspector.Object
+{
+    constructor(object)
+    {
+        super();
+
+        console.assert(object instanceof WebInspector.RemoteObject &amp;&amp; object.subtype === &quot;error&quot;, object);
+
+        this._object = object;
+
+        this._element = document.createElement(&quot;div&quot;);
+        this._element.classList.add(&quot;error-object&quot;);
+        var previewElement = WebInspector.FormattedValue.createElementForError(this._object);
+        this._element.appendChild(previewElement);
+        previewElement.addEventListener(&quot;click&quot;, this._handlePreviewOrTitleElementClick.bind(this));
+
+        this._outlineElement = this._element.appendChild(document.createElement(&quot;div&quot;));
+        this._outlineElement.classList.add(&quot;error-object-outline&quot;);
+        this._outline = new WebInspector.TreeOutline(this._outlineElement);
+    }
+
+    // Static
+
+    static makeSourceLinkWithPrefix(sourceURL, lineNumber, columnNumber)
+    {
+        if (!sourceURL)
+            return null;
+
+        var span = document.createElement(&quot;span&quot;);
+        span.classList.add(&quot;error-object-link-container&quot;);
+        span.textContent = &quot; — &quot;;
+
+        var a = WebInspector.linkifyLocation(sourceURL, parseInt(lineNumber) - 1, parseInt(columnNumber));
+        a.classList.add(&quot;error-object-link&quot;);
+        span.appendChild(a);
+
+        return span;
+    }
+
+    // Public
+
+    get object()
+    {
+        return this._object;
+    }
+
+    get element()
+    {
+        return this._element;
+    }
+
+    get treeOutline()
+    {
+        return this._outline;
+    }
+
+    get expanded()
+    {
+        return this._expanded;
+    }
+
+    update()
+    {
+        this._object.getOwnPropertyDescriptorsAsObject(function(properties) {
+            console.assert(properties &amp;&amp; properties.stack &amp;&amp; properties.stack.value);
+
+            if (!this._hasStackTrace)
+                this._buildStackTrace(properties.stack.value.value);
+
+            this._hasStackTrace = true;
+        }.bind(this));
+    }
+
+    expand()
+    {
+        if (this._expanded)
+            return;
+
+        this._expanded = true;
+        this._element.classList.add(&quot;expanded&quot;);
+
+        if (this._previewView)
+            this._previewView.showTitle();
+
+        this.update();
+    }
+
+    collapse()
+    {
+        if (!this._expanded)
+            return;
+
+        this._expanded = false;
+        this._element.classList.remove(&quot;expanded&quot;);
+
+        if (this._previewView)
+            this._previewView.showPreview();
+    }
+
+    // Private
+
+    _handlePreviewOrTitleElementClick(event)
+    {
+        if (!this._expanded)
+            this.expand();
+        else
+            this.collapse();
+
+        event.stopPropagation();
+    }
+
+    _buildStackTrace(stackString)
+    {
+        var stackTrace = WebInspector.StackTrace.fromString(stackString);
+        var stackTraceElement = new WebInspector.StackTraceView(stackTrace).element;
+        this._outlineElement.appendChild(stackTraceElement);
+    }
+};
</ins></span></pre></div>
<a id="branchessafari601branchSourceWebInspectorUIUserInterfaceViewsFormattedValuejs"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/FormattedValue.js (193068 => 193069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/FormattedValue.js        2015-12-03 18:42:41 UTC (rev 193068)
+++ branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/FormattedValue.js        2015-12-03 18:42:52 UTC (rev 193069)
</span><span class="lines">@@ -67,6 +67,33 @@
</span><span class="cx">     return span;
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+WebInspector.FormattedValue.createElementForError = function(object)
+{
+    var span = document.createElement(&quot;span&quot;);
+    span.classList.add(&quot;formatted-error&quot;);
+    span.textContent = object.description;
+
+    if (!object.preview)
+        return span;
+
+    function previewToObject(preview)
+    {
+        var result = {};
+        for (var property of preview.propertyPreviews)
+            result[property.name] = property.value;
+
+        return result;
+    }
+
+    var preview = previewToObject(object.preview);
+    if (!preview.sourceURL)
+        return span;
+
+    var sourceLinkWithPrefix = WebInspector.ErrorObjectView.makeSourceLinkWithPrefix(preview.sourceURL, preview.line, preview.column);
+    span.appendChild(sourceLinkWithPrefix);
+    return span;
+};
+
</ins><span class="cx"> WebInspector.FormattedValue.createElementForNodePreview = function(preview)
</span><span class="cx"> {
</span><span class="cx">     var value = preview.value;
</span><span class="lines">@@ -145,7 +172,7 @@
</span><span class="cx">         return span;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    // Function: if class, show the description, otherwise ellide in previews.
</del><ins>+    // Function: if class, show the description, otherwise elide in previews.
</ins><span class="cx">     if (type === &quot;function&quot;) {
</span><span class="cx">         if (subtype === &quot;class&quot;)
</span><span class="cx">             span.textContent = displayString;
</span><span class="lines">@@ -187,6 +214,9 @@
</span><span class="cx">     if (object.subtype === &quot;node&quot;)
</span><span class="cx">         return WebInspector.FormattedValue.createElementForNode(object);
</span><span class="cx"> 
</span><ins>+    if (object.subtype === &quot;error&quot;)
+        return WebInspector.FormattedValue.createElementForError(object);
+
</ins><span class="cx">     if (object.preview)
</span><span class="cx">         return new WebInspector.ObjectPreviewView(object.preview, previewViewMode);
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari601branchSourceWebInspectorUIUserInterfaceViewsStackTraceViewcssfromrev193068branchessafari601branchSourceWebInspectorUIUserInterfaceModelsStackTracejs"></a>
<div class="copfile"><h4>Copied: branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/StackTraceView.css (from rev 193068, branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Models/StackTrace.js) (0 => 193069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/StackTraceView.css                                (rev 0)
+++ branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/StackTraceView.css        2015-12-03 18:42:52 UTC (rev 193069)
</span><span class="lines">@@ -0,0 +1,28 @@
</span><ins>+/*
+ * Copyright (C) 2015 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.
+ */
+
+.stack-trace &gt; .call-frame {
+    margin: 1px 0;
+}
</ins></span></pre></div>
<a id="branchessafari601branchSourceWebInspectorUIUserInterfaceViewsStackTraceViewjsfromrev193068branchessafari601branchSourceWebInspectorUIUserInterfaceModelsStackTracejs"></a>
<div class="copfile"><h4>Copied: branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/StackTraceView.js (from rev 193068, branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Models/StackTrace.js) (0 => 193069)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/StackTraceView.js                                (rev 0)
+++ branches/safari-601-branch/Source/WebInspectorUI/UserInterface/Views/StackTraceView.js        2015-12-03 18:42:52 UTC (rev 193069)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+/*
+ * Copyright (C) 2015 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.StackTraceView = class StackTraceView extends WebInspector.Object
+{
+    constructor(stackTrace)
+    {
+        super();
+
+        var element = this._element = document.createElement(&quot;div&quot;);
+        element.classList.add(&quot;stack-trace&quot;);
+
+        for (var callFrame of stackTrace.callFrames) {
+            if (!callFrame.sourceCodeLocation &amp;&amp; callFrame.functionName === null)
+                continue;
+
+            var callFrameElement = new WebInspector.CallFrameView(callFrame, true);
+            element.appendChild(callFrameElement);
+        }
+    }
+
+    get element()
+    {
+        return this._element;
+    }
+};
</ins></span></pre>
</div>
</div>

</body>
</html>