<!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>[193453] branches/safari-601.1.46-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/193453">193453</a></dd>
<dt>Author</dt> <dd>timothy@apple.com</dd>
<dt>Date</dt> <dd>2015-12-04 12:53:40 -0800 (Fri, 04 Dec 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/188403">r188403</a>. rdar://problem/23581597</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari601146branchLayoutTestsChangeLog">branches/safari-601.1.46-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari601146branchLayoutTestsinspectormodelremoteobjectexpectedtxt">branches/safari-601.1.46-branch/LayoutTests/inspector/model/remote-object-expected.txt</a></li>
<li><a href="#branchessafari601146branchLayoutTestsinspectormodelremoteobjecthtml">branches/safari-601.1.46-branch/LayoutTests/inspector/model/remote-object.html</a></li>
<li><a href="#branchessafari601146branchSourceJavaScriptCoreChangeLog">branches/safari-601.1.46-branch/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#branchessafari601146branchSourceJavaScriptCoreinspectorInjectedScriptSourcejs">branches/safari-601.1.46-branch/Source/JavaScriptCore/inspector/InjectedScriptSource.js</a></li>
<li><a href="#branchessafari601146branchSourceWebInspectorUIChangeLog">branches/safari-601.1.46-branch/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#branchessafari601146branchSourceWebInspectorUIUserInterfaceViewsObjectPreviewViewjs">branches/safari-601.1.46-branch/Source/WebInspectorUI/UserInterface/Views/ObjectPreviewView.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari601146branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/LayoutTests/ChangeLog (193452 => 193453)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/ChangeLog        2015-12-04 20:53:33 UTC (rev 193452)
+++ branches/safari-601.1.46-branch/LayoutTests/ChangeLog        2015-12-04 20:53:40 UTC (rev 193453)
</span><span class="lines">@@ -1,5 +1,20 @@
</span><span class="cx"> 2015-12-04 Timothy Hatcher <timothy@apple.com>
</span><span class="cx">
</span><ins>+ Merge r188403. rdar://problem/23581597
+
+ 2015-08-13 Joseph Pecoraro <pecoraro@apple.com>
+
+ Web Inspector: A {Map, WeakMap, Set, WeakSet} object contains itself will hang the console
+ https://bugs.webkit.org/show_bug.cgi?id=147966
+
+ Reviewed by Timothy Hatcher.
+
+ * inspector/model/remote-object.html:
+ * inspector/model/remote-object-expected.txt:
+ Add tests for a cylic array, set, and map.
+
+2015-12-04 Timothy Hatcher <timothy@apple.com>
+
</ins><span class="cx"> Merge r187897. rdar://problem/23581597
</span><span class="cx">
</span><span class="cx"> 2015-08-04 Joseph Pecoraro <pecoraro@apple.com>
</span></span></pre></div>
<a id="branchessafari601146branchLayoutTestsinspectormodelremoteobjectexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/LayoutTests/inspector/model/remote-object-expected.txt (193452 => 193453)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/inspector/model/remote-object-expected.txt        2015-12-04 20:53:33 UTC (rev 193452)
+++ branches/safari-601.1.46-branch/LayoutTests/inspector/model/remote-object-expected.txt        2015-12-04 20:53:40 UTC (rev 193453)
</span><span class="lines">@@ -843,6 +843,33 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> -----------------------------------------------------
</span><ins>+EXPRESSION: arr = []; arr[0] = arr; arr
+{
+ "_type": "object",
+ "_subtype": "array",
+ "_objectId": "<filtered>",
+ "_description": "Array",
+ "_size": 1,
+ "_preview": {
+ "_type": "object",
+ "_subtype": "array",
+ "_description": "Array",
+ "_lossless": false,
+ "_overflow": false,
+ "_size": 1,
+ "_properties": [
+ {
+ "_name": "0",
+ "_type": "object",
+ "_subtype": "array",
+ "_value": "Array"
+ }
+ ],
+ "_entries": null
+ }
+}
+
+-----------------------------------------------------
</ins><span class="cx"> EXPRESSION: arr = []; arr.length = 100; arr
</span><span class="cx"> {
</span><span class="cx"> "_type": "object",
</span><span class="lines">@@ -2260,7 +2287,7 @@
</span><span class="cx"> "_type": "object",
</span><span class="cx"> "_subtype": "map",
</span><span class="cx"> "_description": "Map",
</span><del>- "_lossless": true,
</del><ins>+ "_lossless": false,
</ins><span class="cx"> "_overflow": false,
</span><span class="cx"> "_size": 2,
</span><span class="cx"> "_properties": [],
</span><span class="lines">@@ -2469,6 +2496,49 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> -----------------------------------------------------
</span><ins>+EXPRESSION: map = new Map; map.set(map, map); map
+{
+ "_type": "object",
+ "_subtype": "map",
+ "_objectId": "<filtered>",
+ "_description": "Map",
+ "_size": 1,
+ "_preview": {
+ "_type": "object",
+ "_subtype": "map",
+ "_description": "Map",
+ "_lossless": false,
+ "_overflow": false,
+ "_size": 1,
+ "_properties": [],
+ "_entries": [
+ {
+ "_key": {
+ "_type": "object",
+ "_subtype": "map",
+ "_description": "Map",
+ "_lossless": false,
+ "_overflow": true,
+ "_size": 1,
+ "_properties": [],
+ "_entries": []
+ },
+ "_value": {
+ "_type": "object",
+ "_subtype": "map",
+ "_description": "Map",
+ "_lossless": false,
+ "_overflow": true,
+ "_size": 1,
+ "_properties": [],
+ "_entries": []
+ }
+ }
+ ]
+ }
+}
+
+-----------------------------------------------------
</ins><span class="cx"> EXPRESSION: map = new WeakMap; strongKey = {id:1}; map.set(strongKey, [1,2]); map
</span><span class="cx"> {
</span><span class="cx"> "_type": "object",
</span><span class="lines">@@ -2609,7 +2679,7 @@
</span><span class="cx"> "_type": "object",
</span><span class="cx"> "_subtype": "set",
</span><span class="cx"> "_description": "Set",
</span><del>- "_lossless": true,
</del><ins>+ "_lossless": false,
</ins><span class="cx"> "_overflow": false,
</span><span class="cx"> "_size": 3,
</span><span class="cx"> "_properties": [],
</span><span class="lines">@@ -2766,6 +2836,39 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> -----------------------------------------------------
</span><ins>+EXPRESSION: set = new Set; set.add(set); set
+{
+ "_type": "object",
+ "_subtype": "set",
+ "_objectId": "<filtered>",
+ "_description": "Set",
+ "_size": 1,
+ "_preview": {
+ "_type": "object",
+ "_subtype": "set",
+ "_description": "Set",
+ "_lossless": false,
+ "_overflow": false,
+ "_size": 1,
+ "_properties": [],
+ "_entries": [
+ {
+ "_value": {
+ "_type": "object",
+ "_subtype": "set",
+ "_description": "Set",
+ "_lossless": false,
+ "_overflow": true,
+ "_size": 1,
+ "_properties": [],
+ "_entries": []
+ }
+ }
+ ]
+ }
+}
+
+-----------------------------------------------------
</ins><span class="cx"> EXPRESSION: set = new WeakSet; strongKey = {id:1}; set.add(strongKey); set
</span><span class="cx"> {
</span><span class="cx"> "_type": "object",
</span></span></pre></div>
<a id="branchessafari601146branchLayoutTestsinspectormodelremoteobjecthtml"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/LayoutTests/inspector/model/remote-object.html (193452 => 193453)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/inspector/model/remote-object.html        2015-12-04 20:53:33 UTC (rev 193452)
+++ branches/safari-601.1.46-branch/LayoutTests/inspector/model/remote-object.html        2015-12-04 20:53:40 UTC (rev 193453)
</span><span class="lines">@@ -79,6 +79,7 @@
</span><span class="cx"> {expression: "[[undefined]]"},
</span><span class="cx"> {expression: "[{a:1}, {b:2}, {c:2}]"},
</span><span class="cx"> {expression: "[[{a:1}, {b:2}, {c:2}]]"},
</span><ins>+ {expression: "arr = []; arr[0] = arr; arr"}, // cyclic
</ins><span class="cx"> {expression: "arr = []; arr.length = 100; arr"}, // 100 empty elements
</span><span class="cx"> {expression: "arr = []; arr.length = 100; arr.fill(1)"}, // 100 full elements
</span><span class="cx"> {expression: "arr = []; arr.length = 100; arr[10] = 1; arr"}, // sparse
</span><span class="lines">@@ -94,7 +95,7 @@
</span><span class="cx"> {expression: "({a: 1})"},
</span><span class="cx"> {expression: "({a: 1, b: 0, c: -0})"},
</span><span class="cx"> {expression: "({a: 1, b: \"string\", c: /regex/, d: Symbol('sym')})"},
</span><del>- {expression: "o = {a:1}; o.b = o; o"}, // Cyclic.
</del><ins>+ {expression: "o = {a:1}; o.b = o; o"}, // cyclic
</ins><span class="cx"> {expression: "({a:function a(){}, b:function b(){}, get getter(){}, set setter(v){}})"},
</span><span class="cx"> {expression: "function Foo() {}; new Foo"},
</span><span class="cx"> {expression: "var Foo2 = function() {}; new Foo2"},
</span><span class="lines">@@ -132,6 +133,7 @@
</span><span class="cx"> {expression: "map = new Map; map.set(1, 2); map.set('key', 'value'); map"},
</span><span class="cx"> {expression: "map = new Map; map.set({a:1}, {b:2}); map.set(document.body, [1,2]); map"},
</span><span class="cx"> {expression: "map = new Map; for (var i = 0; i <= 100; i++) map.set(i, i); map"},
</span><ins>+ {expression: "map = new Map; map.set(map, map); map"},
</ins><span class="cx"> {expression: "map = new WeakMap; strongKey = {id:1}; map.set(strongKey, [1,2]); map"},
</span><span class="cx">
</span><span class="cx"> // Set / WeakSet
</span><span class="lines">@@ -139,6 +141,7 @@
</span><span class="cx"> {expression: "set = new Set; set.add(1); set.add(2); set.add('key'); set"},
</span><span class="cx"> {expression: "set = new Set; set.add({a:1}); set.add(document.body); set.add([1,2]); set"},
</span><span class="cx"> {expression: "set = new Set; for (var i = 0; i <= 100; i++) set.add(i); set"},
</span><ins>+ {expression: "set = new Set; set.add(set); set"},
</ins><span class="cx"> {expression: "set = new WeakSet; strongKey = {id:1}; set.add(strongKey); set"},
</span><span class="cx">
</span><span class="cx"> // Iterators
</span></span></pre></div>
<a id="branchessafari601146branchSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/JavaScriptCore/ChangeLog (193452 => 193453)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/JavaScriptCore/ChangeLog        2015-12-04 20:53:33 UTC (rev 193452)
+++ branches/safari-601.1.46-branch/Source/JavaScriptCore/ChangeLog        2015-12-04 20:53:40 UTC (rev 193453)
</span><span class="lines">@@ -1,5 +1,35 @@
</span><span class="cx"> 2015-12-04 Timothy Hatcher <timothy@apple.com>
</span><span class="cx">
</span><ins>+ Merge r188403. rdar://problem/23581597
+
+ 2015-08-13 Joseph Pecoraro <pecoraro@apple.com>
+
+ Web Inspector: A {Map, WeakMap, Set, WeakSet} object contains itself will hang the console
+ https://bugs.webkit.org/show_bug.cgi?id=147966
+
+ Reviewed by Timothy Hatcher.
+
+ * inspector/InjectedScriptSource.js:
+ (InjectedScript.prototype._initialPreview):
+ Renamed to initial preview. This is not a complete preview for
+ this object, and it needs some processing in order to be a
+ complete accurate preview.
+
+ (InjectedScript.RemoteObject.prototype._emptyPreview):
+ This attempts to be an accurate empty preview for the given object.
+ For types with entries, it adds an empty entries list and updates
+ the overflow and lossless properties.
+
+ (InjectedScript.RemoteObject.prototype._createObjectPreviewForValue):
+ Take a generatePreview parameter to generate a full preview or empty preview.
+
+ (InjectedScript.RemoteObject.prototype._appendPropertyPreviews):
+ (InjectedScript.RemoteObject.prototype._appendEntryPreviews):
+ (InjectedScript.RemoteObject.prototype._isPreviewableObject):
+ Take care to avoid cycles.
+
+2015-12-04 Timothy Hatcher <timothy@apple.com>
+
</ins><span class="cx"> Merge r187897. rdar://problem/23581597
</span><span class="cx">
</span><span class="cx"> 2015-08-04 Joseph Pecoraro <pecoraro@apple.com>
</span></span></pre></div>
<a id="branchessafari601146branchSourceJavaScriptCoreinspectorInjectedScriptSourcejs"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/JavaScriptCore/inspector/InjectedScriptSource.js (193452 => 193453)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/JavaScriptCore/inspector/InjectedScriptSource.js        2015-12-04 20:53:33 UTC (rev 193452)
+++ branches/safari-601.1.46-branch/Source/JavaScriptCore/inspector/InjectedScriptSource.js        2015-12-04 20:53:40 UTC (rev 193453)
</span><span class="lines">@@ -1018,7 +1018,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> InjectedScript.RemoteObject.prototype = {
</span><del>- _emptyPreview: function()
</del><ins>+ _initialPreview: function()
</ins><span class="cx"> {
</span><span class="cx"> var preview = {
</span><span class="cx"> type: this.type,
</span><span class="lines">@@ -1040,9 +1040,24 @@
</span><span class="cx"> return preview;
</span><span class="cx"> },
</span><span class="cx">
</span><del>- _createObjectPreviewForValue: function(value)
</del><ins>+ _emptyPreview: function()
</ins><span class="cx"> {
</span><del>- var remoteObject = new InjectedScript.RemoteObject(value, undefined, false, true, undefined);
</del><ins>+ var preview = this._initialPreview();
+
+ if (this.subtype === "map" || this.subtype === "set" || this.subtype === "weakmap" || this.subtype === "weakset" || this.subtype === "iterator") {
+ if (this.size) {
+ preview.entries = [];
+ preview.lossless = false;
+ preview.overflow = true;
+ }
+ }
+
+ return preview;
+ },
+
+ _createObjectPreviewForValue: function(value, generatePreview)
+ {
+ var remoteObject = new InjectedScript.RemoteObject(value, undefined, false, generatePreview, undefined);
</ins><span class="cx"> if (remoteObject.objectId)
</span><span class="cx"> injectedScript.releaseObject(remoteObject.objectId);
</span><span class="cx"> if (remoteObject.classPrototype && remoteObject.classPrototype.objectId)
</span><span class="lines">@@ -1053,7 +1068,7 @@
</span><span class="cx">
</span><span class="cx"> _generatePreview: function(object, firstLevelKeys, secondLevelKeys)
</span><span class="cx"> {
</span><del>- var preview = this._emptyPreview();
</del><ins>+ var preview = this._initialPreview();
</ins><span class="cx">
</span><span class="cx"> // Primitives just have a value.
</span><span class="cx"> if (this.type !== "object")
</span><span class="lines">@@ -1077,7 +1092,7 @@
</span><span class="cx"> // Internal Properties.
</span><span class="cx"> var internalPropertyDescriptors = injectedScript._internalPropertyDescriptors(object, true);
</span><span class="cx"> if (internalPropertyDescriptors) {
</span><del>- this._appendPropertyPreviews(preview, internalPropertyDescriptors, true, propertiesThreshold, firstLevelKeys, secondLevelKeys);
</del><ins>+ this._appendPropertyPreviews(object, preview, internalPropertyDescriptors, true, propertiesThreshold, firstLevelKeys, secondLevelKeys);
</ins><span class="cx"> if (propertiesThreshold.indexes < 0 || propertiesThreshold.properties < 0)
</span><span class="cx"> return preview;
</span><span class="cx"> }
</span><span class="lines">@@ -1087,7 +1102,7 @@
</span><span class="cx">
</span><span class="cx"> // Properties.
</span><span class="cx"> var descriptors = injectedScript._propertyDescriptors(object, InjectedScript.CollectionMode.AllProperties);
</span><del>- this._appendPropertyPreviews(preview, descriptors, false, propertiesThreshold, firstLevelKeys, secondLevelKeys);
</del><ins>+ this._appendPropertyPreviews(object, preview, descriptors, false, propertiesThreshold, firstLevelKeys, secondLevelKeys);
</ins><span class="cx"> if (propertiesThreshold.indexes < 0 || propertiesThreshold.properties < 0)
</span><span class="cx"> return preview;
</span><span class="cx"> } catch (e) {
</span><span class="lines">@@ -1097,7 +1112,7 @@
</span><span class="cx"> return preview;
</span><span class="cx"> },
</span><span class="cx">
</span><del>- _appendPropertyPreviews: function(preview, descriptors, internal, propertiesThreshold, firstLevelKeys, secondLevelKeys)
</del><ins>+ _appendPropertyPreviews: function(object, preview, descriptors, internal, propertiesThreshold, firstLevelKeys, secondLevelKeys)
</ins><span class="cx"> {
</span><span class="cx"> for (var descriptor of descriptors) {
</span><span class="cx"> // Seen enough.
</span><span class="lines">@@ -1180,9 +1195,9 @@
</span><span class="cx"> property.subtype = subtype;
</span><span class="cx">
</span><span class="cx"> // Second level.
</span><del>- if ((secondLevelKeys === null || secondLevelKeys) || this._isPreviewableObject(value)) {
</del><ins>+ if ((secondLevelKeys === null || secondLevelKeys) || this._isPreviewableObject(value, object)) {
</ins><span class="cx"> // FIXME: If we want secondLevelKeys filter to continue we would need some refactoring.
</span><del>- var subPreview = this._createObjectPreviewForValue(value);
</del><ins>+ var subPreview = this._createObjectPreviewForValue(value, value !== object);
</ins><span class="cx"> property.valuePreview = subPreview;
</span><span class="cx"> if (!subPreview.lossless)
</span><span class="cx"> preview.lossless = false;
</span><span class="lines">@@ -1240,17 +1255,25 @@
</span><span class="cx"> preview.lossless = false;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ function updateMainPreview(subPreview) {
+ if (!subPreview.lossless)
+ preview.lossless = false;
+ }
+
</ins><span class="cx"> preview.entries = entries.map(function(entry) {
</span><del>- entry.value = this._createObjectPreviewForValue(entry.value);
- if ("key" in entry)
- entry.key = this._createObjectPreviewForValue(entry.key);
</del><ins>+ entry.value = this._createObjectPreviewForValue(entry.value, entry.value !== object);
+ updateMainPreview(entry.value);
+ if ("key" in entry) {
+ entry.key = this._createObjectPreviewForValue(entry.key, entry.key !== object);
+ updateMainPreview(entry.key);
+ }
</ins><span class="cx"> return entry;
</span><span class="cx"> }, this);
</span><span class="cx"> },
</span><span class="cx">
</span><del>- _isPreviewableObject: function(object)
</del><ins>+ _isPreviewableObject: function(value, object)
</ins><span class="cx"> {
</span><del>- return this._isPreviewableObjectInternal(object, new Set, 1);
</del><ins>+ return this._isPreviewableObjectInternal(value, new Set([object]), 1);
</ins><span class="cx"> },
</span><span class="cx">
</span><span class="cx"> _isPreviewableObjectInternal: function(object, knownObjects, depth)
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebInspectorUI/ChangeLog (193452 => 193453)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebInspectorUI/ChangeLog        2015-12-04 20:53:33 UTC (rev 193452)
+++ branches/safari-601.1.46-branch/Source/WebInspectorUI/ChangeLog        2015-12-04 20:53:40 UTC (rev 193453)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2015-12-04 Timothy Hatcher <timothy@apple.com>
+
+ Merge r188403. rdar://problem/23581597
+
+ 2015-08-13 Joseph Pecoraro <pecoraro@apple.com>
+
+ Web Inspector: A {Map, WeakMap, Set, WeakSet} object contains itself will hang the console
+ https://bugs.webkit.org/show_bug.cgi?id=147966
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Views/ObjectPreviewView.js:
+ (WebInspector.ObjectPreviewView.prototype._appendEntryPreviews):
+ (WebInspector.ObjectPreviewView.prototype._appendPropertyPreviews):
+ For empty overflow previews, don't show ", ..." if we didn't show any
+ values; just show "..." in these cases.
+
</ins><span class="cx"> 2015-12-02 Timothy Hatcher <timothy@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r191967. rdar://problem/23221163
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebInspectorUIUserInterfaceViewsObjectPreviewViewjs"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebInspectorUI/UserInterface/Views/ObjectPreviewView.js (193452 => 193453)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebInspectorUI/UserInterface/Views/ObjectPreviewView.js        2015-12-04 20:53:33 UTC (rev 193452)
+++ branches/safari-601.1.46-branch/Source/WebInspectorUI/UserInterface/Views/ObjectPreviewView.js        2015-12-04 20:53:40 UTC (rev 193453)
</span><span class="lines">@@ -177,10 +177,14 @@
</span><span class="cx"> overflow = true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (overflow)
- element.appendChild(document.createTextNode(", \u2026"));
- element.appendChild(document.createTextNode(isIterator ? "]" : "}"));
</del><ins>+ if (overflow) {
+ if (limit > 0)
+ element.append(", ");
+ element.append("\u2026");
+ }
</ins><span class="cx">
</span><ins>+ element.append(isIterator ? "]" : "}");
+
</ins><span class="cx"> return lossless;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -238,10 +242,14 @@
</span><span class="cx"> overflow = true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (overflow)
- element.appendChild(document.createTextNode(", \u2026"));
- element.appendChild(document.createTextNode(isArray ? "]" : "}"));
</del><ins>+ if (overflow) {
+ if (limit > 0)
+ element.append(", ");
+ element.append("\u2026");
+ }
</ins><span class="cx">
</span><ins>+ element.append(isArray ? "]" : "}");
+
</ins><span class="cx"> return lossless;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>