<!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>[183025] trunk</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/183025">183025</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-04-20 13:25:56 -0700 (Mon, 20 Apr 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: Improve Support for WeakSet in Console
https://bugs.webkit.org/show_bug.cgi?id=143951

Patch by Joseph Pecoraro &lt;pecoraro@apple.com&gt; on 2015-04-20
Reviewed by Darin Adler.

Source/JavaScriptCore:

* inspector/InjectedScriptSource.js:
* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::subtype):
(Inspector::JSInjectedScriptHost::weakSetSize):
(Inspector::JSInjectedScriptHost::weakSetEntries):
* inspector/JSInjectedScriptHost.h:
* inspector/JSInjectedScriptHostPrototype.cpp:
(Inspector::JSInjectedScriptHostPrototype::finishCreation):
(Inspector::jsInjectedScriptHostPrototypeFunctionWeakSetSize):
(Inspector::jsInjectedScriptHostPrototypeFunctionWeakSetEntries):
Treat WeakSets like special sets.

* inspector/protocol/Runtime.json:
Add a new object subtype, &quot;weakset&quot;.

Source/WebInspectorUI:

* UserInterface/Models/NativeFunctionParameters.js:
WeakSet has the same APIs and parameters as Set for the functions it implements.

* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.prototype.isCollectionType):
(WebInspector.RemoteObject.prototype.isWeakCollection):
(WebInspector.RemoteObject.prototype.getCollectionEntries):
(WebInspector.RemoteObject.prototype._weakCollectionObjectGroup):
WeakSet is a weak collection.

* UserInterface/Models/ObjectPreview.js:
(WebInspector.ObjectPreview.prototype.hasSize):
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._formatParameter):
* UserInterface/Views/FormattedValue.css:
(.formatted-object, .formatted-node, .formatted-error, .formatted-map, .formatted-set, .formatted-weakmap, .formatted-weakset):
(:matches(.formatted-array, .formatted-map, .formatted-set, .formatted-weakmap, .formatted-weakset) &gt; .size):
(.formatted-object, .formatted-node, .formatted-error, .formatted-map, .formatted-set, .formatted-weakmap): Deleted.
(:matches(.formatted-array, .formatted-map, .formatted-set, .formatted-weakmap) &gt; .size): Deleted.
* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createElementForTypesAndValue):
Treat a WeakSet like a set in more places.

LayoutTests:

* inspector/model/remote-object-expected.txt:
* inspector/model/remote-object.html:
Update the test to include a WeakSet example.
Also rebaseline for iterator changes that landed recently.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsinspectormodelremoteobjectexpectedtxt">trunk/LayoutTests/inspector/model/remote-object-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectormodelremoteobjecthtml">trunk/LayoutTests/inspector/model/remote-object.html</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</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="#trunkSourceJavaScriptCoreinspectorJSInjectedScriptHosth">trunk/Source/JavaScriptCore/inspector/JSInjectedScriptHost.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorJSInjectedScriptHostPrototypecpp">trunk/Source/JavaScriptCore/inspector/JSInjectedScriptHostPrototype.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorprotocolRuntimejson">trunk/Source/JavaScriptCore/inspector/protocol/Runtime.json</a></li>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsNativeFunctionParametersjs">trunk/Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsObjectPreviewjs">trunk/Source/WebInspectorUI/UserInterface/Models/ObjectPreview.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolRemoteObjectjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsConsoleMessageViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsFormattedValuecss">trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsFormattedValuejs">trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (183024 => 183025)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-04-20 19:40:03 UTC (rev 183024)
+++ trunk/LayoutTests/ChangeLog        2015-04-20 20:25:56 UTC (rev 183025)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2015-04-20  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Web Inspector: Improve Support for WeakSet in Console
+        https://bugs.webkit.org/show_bug.cgi?id=143951
+
+        Reviewed by Darin Adler.
+
+        * inspector/model/remote-object-expected.txt:
+        * inspector/model/remote-object.html:
+        Update the test to include a WeakSet example.
+        Also rebaseline for iterator changes that landed recently.
+
</ins><span class="cx"> 2015-04-20  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix content extension test flakiness.
</span></span></pre></div>
<a id="trunkLayoutTestsinspectormodelremoteobjectexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/model/remote-object-expected.txt (183024 => 183025)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/model/remote-object-expected.txt        2015-04-20 19:40:03 UTC (rev 183024)
+++ trunk/LayoutTests/inspector/model/remote-object-expected.txt        2015-04-20 20:25:56 UTC (rev 183025)
</span><span class="lines">@@ -3128,16 +3128,53 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> -----------------------------------------------------
</span><ins>+EXPRESSION: set = new WeakSet; strongKey = {id:1}; set.add(strongKey); set
+{
+  &quot;_type&quot;: &quot;object&quot;,
+  &quot;_subtype&quot;: &quot;weakset&quot;,
+  &quot;_objectId&quot;: &quot;&lt;filtered&gt;&quot;,
+  &quot;_description&quot;: &quot;WeakSet&quot;,
+  &quot;_size&quot;: 1,
+  &quot;_preview&quot;: {
+    &quot;_type&quot;: &quot;object&quot;,
+    &quot;_subtype&quot;: &quot;weakset&quot;,
+    &quot;_description&quot;: &quot;WeakSet&quot;,
+    &quot;_lossless&quot;: true,
+    &quot;_overflow&quot;: false,
+    &quot;_size&quot;: 1,
+    &quot;_properties&quot;: [],
+    &quot;_entries&quot;: [
+      {
+        &quot;_value&quot;: {
+          &quot;_type&quot;: &quot;object&quot;,
+          &quot;_description&quot;: &quot;Object&quot;,
+          &quot;_lossless&quot;: true,
+          &quot;_overflow&quot;: false,
+          &quot;_properties&quot;: [
+            {
+              &quot;_name&quot;: &quot;id&quot;,
+              &quot;_type&quot;: &quot;number&quot;,
+              &quot;_value&quot;: &quot;1&quot;
+            }
+          ],
+          &quot;_entries&quot;: null
+        }
+      }
+    ]
+  }
+}
+
+-----------------------------------------------------
</ins><span class="cx"> EXPRESSION: 'a'[Symbol.iterator]()
</span><span class="cx"> {
</span><span class="cx">   &quot;_type&quot;: &quot;object&quot;,
</span><span class="cx">   &quot;_subtype&quot;: &quot;iterator&quot;,
</span><span class="cx">   &quot;_objectId&quot;: &quot;&lt;filtered&gt;&quot;,
</span><del>-  &quot;_description&quot;: &quot;StringIterator&quot;,
</del><ins>+  &quot;_description&quot;: &quot;String Iterator&quot;,
</ins><span class="cx">   &quot;_preview&quot;: {
</span><span class="cx">     &quot;_type&quot;: &quot;object&quot;,
</span><span class="cx">     &quot;_subtype&quot;: &quot;iterator&quot;,
</span><del>-    &quot;_description&quot;: &quot;StringIterator&quot;,
</del><ins>+    &quot;_description&quot;: &quot;String Iterator&quot;,
</ins><span class="cx">     &quot;_lossless&quot;: true,
</span><span class="cx">     &quot;_overflow&quot;: false,
</span><span class="cx">     &quot;_properties&quot;: [
</span><span class="lines">@@ -3169,11 +3206,11 @@
</span><span class="cx">   &quot;_type&quot;: &quot;object&quot;,
</span><span class="cx">   &quot;_subtype&quot;: &quot;iterator&quot;,
</span><span class="cx">   &quot;_objectId&quot;: &quot;&lt;filtered&gt;&quot;,
</span><del>-  &quot;_description&quot;: &quot;StringIterator&quot;,
</del><ins>+  &quot;_description&quot;: &quot;String Iterator&quot;,
</ins><span class="cx">   &quot;_preview&quot;: {
</span><span class="cx">     &quot;_type&quot;: &quot;object&quot;,
</span><span class="cx">     &quot;_subtype&quot;: &quot;iterator&quot;,
</span><del>-    &quot;_description&quot;: &quot;StringIterator&quot;,
</del><ins>+    &quot;_description&quot;: &quot;String Iterator&quot;,
</ins><span class="cx">     &quot;_lossless&quot;: false,
</span><span class="cx">     &quot;_overflow&quot;: true,
</span><span class="cx">     &quot;_properties&quot;: [
</span><span class="lines">@@ -3245,11 +3282,11 @@
</span><span class="cx">   &quot;_type&quot;: &quot;object&quot;,
</span><span class="cx">   &quot;_subtype&quot;: &quot;iterator&quot;,
</span><span class="cx">   &quot;_objectId&quot;: &quot;&lt;filtered&gt;&quot;,
</span><del>-  &quot;_description&quot;: &quot;ArrayIterator&quot;,
</del><ins>+  &quot;_description&quot;: &quot;Array Iterator&quot;,
</ins><span class="cx">   &quot;_preview&quot;: {
</span><span class="cx">     &quot;_type&quot;: &quot;object&quot;,
</span><span class="cx">     &quot;_subtype&quot;: &quot;iterator&quot;,
</span><del>-    &quot;_description&quot;: &quot;ArrayIterator&quot;,
</del><ins>+    &quot;_description&quot;: &quot;Array Iterator&quot;,
</ins><span class="cx">     &quot;_lossless&quot;: true,
</span><span class="cx">     &quot;_overflow&quot;: false,
</span><span class="cx">     &quot;_properties&quot;: [
</span><span class="lines">@@ -3286,11 +3323,11 @@
</span><span class="cx">   &quot;_type&quot;: &quot;object&quot;,
</span><span class="cx">   &quot;_subtype&quot;: &quot;iterator&quot;,
</span><span class="cx">   &quot;_objectId&quot;: &quot;&lt;filtered&gt;&quot;,
</span><del>-  &quot;_description&quot;: &quot;ArrayIterator&quot;,
</del><ins>+  &quot;_description&quot;: &quot;Array Iterator&quot;,
</ins><span class="cx">   &quot;_preview&quot;: {
</span><span class="cx">     &quot;_type&quot;: &quot;object&quot;,
</span><span class="cx">     &quot;_subtype&quot;: &quot;iterator&quot;,
</span><del>-    &quot;_description&quot;: &quot;ArrayIterator&quot;,
</del><ins>+    &quot;_description&quot;: &quot;Array Iterator&quot;,
</ins><span class="cx">     &quot;_lossless&quot;: true,
</span><span class="cx">     &quot;_overflow&quot;: false,
</span><span class="cx">     &quot;_properties&quot;: [
</span><span class="lines">@@ -3344,11 +3381,11 @@
</span><span class="cx">   &quot;_type&quot;: &quot;object&quot;,
</span><span class="cx">   &quot;_subtype&quot;: &quot;iterator&quot;,
</span><span class="cx">   &quot;_objectId&quot;: &quot;&lt;filtered&gt;&quot;,
</span><del>-  &quot;_description&quot;: &quot;ArrayIterator&quot;,
</del><ins>+  &quot;_description&quot;: &quot;Array Iterator&quot;,
</ins><span class="cx">   &quot;_preview&quot;: {
</span><span class="cx">     &quot;_type&quot;: &quot;object&quot;,
</span><span class="cx">     &quot;_subtype&quot;: &quot;iterator&quot;,
</span><del>-    &quot;_description&quot;: &quot;ArrayIterator&quot;,
</del><ins>+    &quot;_description&quot;: &quot;Array Iterator&quot;,
</ins><span class="cx">     &quot;_lossless&quot;: false,
</span><span class="cx">     &quot;_overflow&quot;: true,
</span><span class="cx">     &quot;_properties&quot;: [
</span><span class="lines">@@ -3427,11 +3464,11 @@
</span><span class="cx">   &quot;_type&quot;: &quot;object&quot;,
</span><span class="cx">   &quot;_subtype&quot;: &quot;iterator&quot;,
</span><span class="cx">   &quot;_objectId&quot;: &quot;&lt;filtered&gt;&quot;,
</span><del>-  &quot;_description&quot;: &quot;ArrayIterator&quot;,
</del><ins>+  &quot;_description&quot;: &quot;Array Iterator&quot;,
</ins><span class="cx">   &quot;_preview&quot;: {
</span><span class="cx">     &quot;_type&quot;: &quot;object&quot;,
</span><span class="cx">     &quot;_subtype&quot;: &quot;iterator&quot;,
</span><del>-    &quot;_description&quot;: &quot;ArrayIterator&quot;,
</del><ins>+    &quot;_description&quot;: &quot;Array Iterator&quot;,
</ins><span class="cx">     &quot;_lossless&quot;: false,
</span><span class="cx">     &quot;_overflow&quot;: true,
</span><span class="cx">     &quot;_properties&quot;: [
</span><span class="lines">@@ -3510,11 +3547,11 @@
</span><span class="cx">   &quot;_type&quot;: &quot;object&quot;,
</span><span class="cx">   &quot;_subtype&quot;: &quot;iterator&quot;,
</span><span class="cx">   &quot;_objectId&quot;: &quot;&lt;filtered&gt;&quot;,
</span><del>-  &quot;_description&quot;: &quot;ArrayIterator&quot;,
</del><ins>+  &quot;_description&quot;: &quot;Array Iterator&quot;,
</ins><span class="cx">   &quot;_preview&quot;: {
</span><span class="cx">     &quot;_type&quot;: &quot;object&quot;,
</span><span class="cx">     &quot;_subtype&quot;: &quot;iterator&quot;,
</span><del>-    &quot;_description&quot;: &quot;ArrayIterator&quot;,
</del><ins>+    &quot;_description&quot;: &quot;Array Iterator&quot;,
</ins><span class="cx">     &quot;_lossless&quot;: false,
</span><span class="cx">     &quot;_overflow&quot;: true,
</span><span class="cx">     &quot;_properties&quot;: [
</span><span class="lines">@@ -4005,16 +4042,16 @@
</span><span class="cx">   &quot;_type&quot;: &quot;object&quot;,
</span><span class="cx">   &quot;_subtype&quot;: &quot;iterator&quot;,
</span><span class="cx">   &quot;_objectId&quot;: &quot;&lt;filtered&gt;&quot;,
</span><del>-  &quot;_description&quot;: &quot;ArgumentsIterator&quot;,
</del><ins>+  &quot;_description&quot;: &quot;Array Iterator&quot;,
</ins><span class="cx">   &quot;_preview&quot;: {
</span><span class="cx">     &quot;_type&quot;: &quot;object&quot;,
</span><span class="cx">     &quot;_subtype&quot;: &quot;iterator&quot;,
</span><del>-    &quot;_description&quot;: &quot;ArgumentsIterator&quot;,
</del><ins>+    &quot;_description&quot;: &quot;Array Iterator&quot;,
</ins><span class="cx">     &quot;_lossless&quot;: true,
</span><span class="cx">     &quot;_overflow&quot;: false,
</span><span class="cx">     &quot;_properties&quot;: [
</span><span class="cx">       {
</span><del>-        &quot;_name&quot;: &quot;arguments&quot;,
</del><ins>+        &quot;_name&quot;: &quot;array&quot;,
</ins><span class="cx">         &quot;_type&quot;: &quot;object&quot;,
</span><span class="cx">         &quot;_subtype&quot;: &quot;array&quot;,
</span><span class="cx">         &quot;_valuePreview&quot;: {
</span><span class="lines">@@ -4039,6 +4076,12 @@
</span><span class="cx">           &quot;_entries&quot;: null
</span><span class="cx">         },
</span><span class="cx">         &quot;_internal&quot;: true
</span><ins>+      },
+      {
+        &quot;_name&quot;: &quot;kind&quot;,
+        &quot;_type&quot;: &quot;string&quot;,
+        &quot;_value&quot;: &quot;value&quot;,
+        &quot;_internal&quot;: true
</ins><span class="cx">       }
</span><span class="cx">     ],
</span><span class="cx">     &quot;_entries&quot;: [
</span></span></pre></div>
<a id="trunkLayoutTestsinspectormodelremoteobjecthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/model/remote-object.html (183024 => 183025)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/model/remote-object.html        2015-04-20 19:40:03 UTC (rev 183024)
+++ trunk/LayoutTests/inspector/model/remote-object.html        2015-04-20 20:25:56 UTC (rev 183025)
</span><span class="lines">@@ -129,11 +129,12 @@
</span><span class="cx">         {expression: &quot;map = new Map; for (var i = 0; i &lt;= 100; i++) map.set(i, i); map&quot;},
</span><span class="cx">         {expression: &quot;map = new WeakMap; strongKey = {id:1}; map.set(strongKey, [1,2]); map&quot;},
</span><span class="cx"> 
</span><del>-        // Set
</del><ins>+        // Set / WeakSet
</ins><span class="cx">         {expression: &quot;new Set&quot;},
</span><span class="cx">         {expression: &quot;set = new Set; set.add(1); set.add(2); set.add('key'); set&quot;},
</span><span class="cx">         {expression: &quot;set = new Set; set.add({a:1}); set.add(document.body); set.add([1,2]); set&quot;},
</span><span class="cx">         {expression: &quot;set = new Set; for (var i = 0; i &lt;= 100; i++) set.add(i); set&quot;},
</span><ins>+        {expression: &quot;set = new WeakSet; strongKey = {id:1}; set.add(strongKey); set&quot;},
</ins><span class="cx"> 
</span><span class="cx">         // Iterators
</span><span class="cx">         {expression: &quot;'a'[Symbol.iterator]()&quot;},
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (183024 => 183025)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-04-20 19:40:03 UTC (rev 183024)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-04-20 20:25:56 UTC (rev 183025)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2015-04-20  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Web Inspector: Improve Support for WeakSet in Console
+        https://bugs.webkit.org/show_bug.cgi?id=143951
+
+        Reviewed by Darin Adler.
+
+        * inspector/InjectedScriptSource.js:
+        * inspector/JSInjectedScriptHost.cpp:
+        (Inspector::JSInjectedScriptHost::subtype):
+        (Inspector::JSInjectedScriptHost::weakSetSize):
+        (Inspector::JSInjectedScriptHost::weakSetEntries):
+        * inspector/JSInjectedScriptHost.h:
+        * inspector/JSInjectedScriptHostPrototype.cpp:
+        (Inspector::JSInjectedScriptHostPrototype::finishCreation):
+        (Inspector::jsInjectedScriptHostPrototypeFunctionWeakSetSize):
+        (Inspector::jsInjectedScriptHostPrototypeFunctionWeakSetEntries):
+        Treat WeakSets like special sets.
+
+        * inspector/protocol/Runtime.json:
+        Add a new object subtype, &quot;weakset&quot;.
+
</ins><span class="cx"> 2015-04-20  Yusuke Suzuki  &lt;utatane.tea@gmail.com&gt;
</span><span class="cx"> 
</span><span class="cx">         HashMap storing PropertyKey StringImpl* need to use IdentifierRepHash to handle Symbols
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorInjectedScriptSourcejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/InjectedScriptSource.js (183024 => 183025)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/InjectedScriptSource.js        2015-04-20 19:40:03 UTC (rev 183024)
+++ trunk/Source/JavaScriptCore/inspector/InjectedScriptSource.js        2015-04-20 20:25:56 UTC (rev 183025)
</span><span class="lines">@@ -853,6 +853,11 @@
</span><span class="cx">         return InjectedScriptHost.weakMapEntries(object, numberToFetch);
</span><span class="cx">     },
</span><span class="cx"> 
</span><ins>+    _getWeakSetEntries: function(object, numberToFetch)
+    {
+        return InjectedScriptHost.weakSetEntries(object, numberToFetch);
+    },
+
</ins><span class="cx">     _getIteratorEntries: function(object, numberToFetch)
</span><span class="cx">     {
</span><span class="cx">         return InjectedScriptHost.iteratorEntries(object, numberToFetch);
</span><span class="lines">@@ -866,6 +871,8 @@
</span><span class="cx">             return this._getMapEntries(object, startIndex, numberToFetch);
</span><span class="cx">         if (subtype === &quot;weakmap&quot;)
</span><span class="cx">             return this._getWeakMapEntries(object, numberToFetch);
</span><ins>+        if (subtype === &quot;weakset&quot;)
+            return this._getWeakSetEntries(object, numberToFetch);
</ins><span class="cx">         if (subtype === &quot;iterator&quot;)
</span><span class="cx">             return this._getIteratorEntries(object, numberToFetch);
</span><span class="cx"> 
</span><span class="lines">@@ -939,6 +946,8 @@
</span><span class="cx">         this.size = object.size;
</span><span class="cx">     else if (subtype === &quot;weakmap&quot;)
</span><span class="cx">         this.size = InjectedScriptHost.weakMapSize(object);
</span><ins>+    else if (subtype === &quot;weakset&quot;)
+        this.size = InjectedScriptHost.weakSetSize(object);
</ins><span class="cx">     else if (subtype === &quot;class&quot;)
</span><span class="cx">         this.classPrototype = injectedScript._wrapObject(object.prototype, objectGroupName);
</span><span class="cx"> 
</span><span class="lines">@@ -998,7 +1007,7 @@
</span><span class="cx"> 
</span><span class="cx">         try {
</span><span class="cx">             // Maps, Sets, and Iterators have entries.
</span><del>-            if (this.subtype === &quot;map&quot; || this.subtype === &quot;set&quot; || this.subtype === &quot;weakmap&quot; || this.subtype === &quot;iterator&quot;)
</del><ins>+            if (this.subtype === &quot;map&quot; || this.subtype === &quot;set&quot; || this.subtype === &quot;weakmap&quot; || this.subtype === &quot;weakset&quot; || this.subtype === &quot;iterator&quot;)
</ins><span class="cx">                 this._appendEntryPreviews(object, preview);
</span><span class="cx"> 
</span><span class="cx">             preview.properties = [];
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorJSInjectedScriptHostcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp (183024 => 183025)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp        2015-04-20 19:40:03 UTC (rev 183024)
+++ trunk/Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp        2015-04-20 20:25:56 UTC (rev 183025)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2013, 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -43,6 +43,7 @@
</span><span class="cx"> #include &quot;JSStringIterator.h&quot;
</span><span class="cx"> #include &quot;JSTypedArrays.h&quot;
</span><span class="cx"> #include &quot;JSWeakMap.h&quot;
</span><ins>+#include &quot;JSWeakSet.h&quot;
</ins><span class="cx"> #include &quot;ObjectConstructor.h&quot;
</span><span class="cx"> #include &quot;RegExpObject.h&quot;
</span><span class="cx"> #include &quot;SourceCode.h&quot;
</span><span class="lines">@@ -158,6 +159,8 @@
</span><span class="cx">         return jsNontrivialString(exec, ASCIILiteral(&quot;set&quot;));
</span><span class="cx">     if (value.inherits(JSWeakMap::info()))
</span><span class="cx">         return jsNontrivialString(exec, ASCIILiteral(&quot;weakmap&quot;));
</span><ins>+    if (value.inherits(JSWeakSet::info()))
+        return jsNontrivialString(exec, ASCIILiteral(&quot;weakset&quot;));
</ins><span class="cx"> 
</span><span class="cx">     if (value.inherits(JSArrayIterator::info())
</span><span class="cx">         || value.inherits(JSMapIterator::info())
</span><span class="lines">@@ -382,6 +385,49 @@
</span><span class="cx">     return array;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSValue JSInjectedScriptHost::weakSetSize(ExecState* exec)
+{
+    if (exec-&gt;argumentCount() &lt; 1)
+        return jsUndefined();
+
+    JSValue value = exec-&gt;uncheckedArgument(0);
+    JSWeakSet* weakSet = jsDynamicCast&lt;JSWeakSet*&gt;(value);
+    if (!weakSet)
+        return jsUndefined();
+
+    return jsNumber(weakSet-&gt;weakMapData()-&gt;size());
+}
+
+JSValue JSInjectedScriptHost::weakSetEntries(ExecState* exec)
+{
+    if (exec-&gt;argumentCount() &lt; 1)
+        return jsUndefined();
+
+    JSValue value = exec-&gt;uncheckedArgument(0);
+    JSWeakSet* weakSet = jsDynamicCast&lt;JSWeakSet*&gt;(value);
+    if (!weakSet)
+        return jsUndefined();
+
+    unsigned fetched = 0;
+    unsigned numberToFetch = 100;
+
+    JSValue numberToFetchArg = exec-&gt;argument(1);
+    double fetchDouble = numberToFetchArg.toInteger(exec);
+    if (fetchDouble &gt;= 0)
+        numberToFetch = static_cast&lt;unsigned&gt;(fetchDouble);
+
+    JSArray* array = constructEmptyArray(exec, nullptr);
+    for (auto it = weakSet-&gt;weakMapData()-&gt;begin(); it != weakSet-&gt;weakMapData()-&gt;end(); ++it) {
+        JSObject* entry = constructEmptyObject(exec);
+        entry-&gt;putDirect(exec-&gt;vm(), Identifier::fromString(exec, &quot;value&quot;), it-&gt;key);
+        array-&gt;putDirectIndex(exec, fetched++, entry);
+        if (numberToFetch &amp;&amp; fetched &gt;= numberToFetch)
+            break;
+    }
+
+    return array;
+}
+
</ins><span class="cx"> JSValue JSInjectedScriptHost::iteratorEntries(ExecState* exec)
</span><span class="cx"> {
</span><span class="cx">     if (exec-&gt;argumentCount() &lt; 1)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorJSInjectedScriptHosth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/JSInjectedScriptHost.h (183024 => 183025)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/JSInjectedScriptHost.h        2015-04-20 19:40:03 UTC (rev 183024)
+++ trunk/Source/JavaScriptCore/inspector/JSInjectedScriptHost.h        2015-04-20 20:25:56 UTC (rev 183025)
</span><span class="lines">@@ -28,6 +28,10 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;JSDestructibleObject.h&quot;
</span><span class="cx"> 
</span><ins>+namespace JSC {
+class WeakMapData;
+}
+
</ins><span class="cx"> namespace Inspector {
</span><span class="cx"> 
</span><span class="cx"> class InjectedScriptHost;
</span><span class="lines">@@ -68,6 +72,8 @@
</span><span class="cx">     JSC::JSValue getInternalProperties(JSC::ExecState*);
</span><span class="cx">     JSC::JSValue weakMapSize(JSC::ExecState*);
</span><span class="cx">     JSC::JSValue weakMapEntries(JSC::ExecState*);
</span><ins>+    JSC::JSValue weakSetSize(JSC::ExecState*);
+    JSC::JSValue weakSetEntries(JSC::ExecState*);
</ins><span class="cx">     JSC::JSValue iteratorEntries(JSC::ExecState*);
</span><span class="cx"> 
</span><span class="cx"> protected:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorJSInjectedScriptHostPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/JSInjectedScriptHostPrototype.cpp (183024 => 183025)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/JSInjectedScriptHostPrototype.cpp        2015-04-20 19:40:03 UTC (rev 183024)
+++ trunk/Source/JavaScriptCore/inspector/JSInjectedScriptHostPrototype.cpp        2015-04-20 20:25:56 UTC (rev 183025)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2013, 2015 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -45,6 +45,8 @@
</span><span class="cx"> static EncodedJSValue JSC_HOST_CALL jsInjectedScriptHostPrototypeFunctionIsHTMLAllCollection(ExecState*);
</span><span class="cx"> static EncodedJSValue JSC_HOST_CALL jsInjectedScriptHostPrototypeFunctionWeakMapSize(ExecState*);
</span><span class="cx"> static EncodedJSValue JSC_HOST_CALL jsInjectedScriptHostPrototypeFunctionWeakMapEntries(ExecState*);
</span><ins>+static EncodedJSValue JSC_HOST_CALL jsInjectedScriptHostPrototypeFunctionWeakSetSize(ExecState*);
+static EncodedJSValue JSC_HOST_CALL jsInjectedScriptHostPrototypeFunctionWeakSetEntries(ExecState*);
</ins><span class="cx"> static EncodedJSValue JSC_HOST_CALL jsInjectedScriptHostPrototypeFunctionIteratorEntries(ExecState*);
</span><span class="cx"> 
</span><span class="cx"> static EncodedJSValue JSC_HOST_CALL jsInjectedScriptHostPrototypeAttributeEvaluate(ExecState*);
</span><span class="lines">@@ -64,6 +66,8 @@
</span><span class="cx">     JSC_NATIVE_FUNCTION(&quot;isHTMLAllCollection&quot;, jsInjectedScriptHostPrototypeFunctionIsHTMLAllCollection, DontEnum, 1);
</span><span class="cx">     JSC_NATIVE_FUNCTION(&quot;weakMapSize&quot;, jsInjectedScriptHostPrototypeFunctionWeakMapSize, DontEnum, 1);
</span><span class="cx">     JSC_NATIVE_FUNCTION(&quot;weakMapEntries&quot;, jsInjectedScriptHostPrototypeFunctionWeakMapEntries, DontEnum, 1);
</span><ins>+    JSC_NATIVE_FUNCTION(&quot;weakSetSize&quot;, jsInjectedScriptHostPrototypeFunctionWeakSetSize, DontEnum, 1);
+    JSC_NATIVE_FUNCTION(&quot;weakSetEntries&quot;, jsInjectedScriptHostPrototypeFunctionWeakSetEntries, DontEnum, 1);
</ins><span class="cx">     JSC_NATIVE_FUNCTION(&quot;iteratorEntries&quot;, jsInjectedScriptHostPrototypeFunctionIteratorEntries, DontEnum, 1);
</span><span class="cx"> 
</span><span class="cx">     Identifier evaluateIdentifier = Identifier::fromString(&amp;vm, &quot;evaluate&quot;);
</span><span class="lines">@@ -128,6 +132,28 @@
</span><span class="cx">     return JSValue::encode(castedThis-&gt;weakMapEntries(exec));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+EncodedJSValue JSC_HOST_CALL jsInjectedScriptHostPrototypeFunctionWeakSetSize(ExecState* exec)
+{
+    JSValue thisValue = exec-&gt;thisValue();
+    JSInjectedScriptHost* castedThis = jsDynamicCast&lt;JSInjectedScriptHost*&gt;(thisValue);
+    if (!castedThis)
+        return throwVMTypeError(exec);
+
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSInjectedScriptHost::info());
+    return JSValue::encode(castedThis-&gt;weakSetSize(exec));
+}
+
+EncodedJSValue JSC_HOST_CALL jsInjectedScriptHostPrototypeFunctionWeakSetEntries(ExecState* exec)
+{
+    JSValue thisValue = exec-&gt;thisValue();
+    JSInjectedScriptHost* castedThis = jsDynamicCast&lt;JSInjectedScriptHost*&gt;(thisValue);
+    if (!castedThis)
+        return throwVMTypeError(exec);
+
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSInjectedScriptHost::info());
+    return JSValue::encode(castedThis-&gt;weakSetEntries(exec));
+}
+
</ins><span class="cx"> EncodedJSValue JSC_HOST_CALL jsInjectedScriptHostPrototypeFunctionIteratorEntries(ExecState* exec)
</span><span class="cx"> {
</span><span class="cx">     JSValue thisValue = exec-&gt;thisValue();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorprotocolRuntimejson"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/protocol/Runtime.json (183024 => 183025)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/protocol/Runtime.json        2015-04-20 19:40:03 UTC (rev 183024)
+++ trunk/Source/JavaScriptCore/inspector/protocol/Runtime.json        2015-04-20 20:25:56 UTC (rev 183025)
</span><span class="lines">@@ -13,12 +13,12 @@
</span><span class="cx">             &quot;description&quot;: &quot;Mirror object referencing original JavaScript object.&quot;,
</span><span class="cx">             &quot;properties&quot;: [
</span><span class="cx">                 { &quot;name&quot;: &quot;type&quot;, &quot;type&quot;: &quot;string&quot;, &quot;enum&quot;: [&quot;object&quot;, &quot;function&quot;, &quot;undefined&quot;, &quot;string&quot;, &quot;number&quot;, &quot;boolean&quot;, &quot;symbol&quot;], &quot;description&quot;: &quot;Object type.&quot; },
</span><del>-                { &quot;name&quot;: &quot;subtype&quot;, &quot;type&quot;: &quot;string&quot;, &quot;optional&quot;: true, &quot;enum&quot;: [&quot;array&quot;, &quot;null&quot;, &quot;node&quot;, &quot;regexp&quot;, &quot;date&quot;, &quot;error&quot;, &quot;map&quot;, &quot;set&quot;, &quot;weakmap&quot;, &quot;iterator&quot;, &quot;class&quot;], &quot;description&quot;: &quot;Object subtype hint. Specified for &lt;code&gt;object&lt;/code&gt; &lt;code&gt;function&lt;/code&gt; (for class) type values only.&quot; },
</del><ins>+                { &quot;name&quot;: &quot;subtype&quot;, &quot;type&quot;: &quot;string&quot;, &quot;optional&quot;: true, &quot;enum&quot;: [&quot;array&quot;, &quot;null&quot;, &quot;node&quot;, &quot;regexp&quot;, &quot;date&quot;, &quot;error&quot;, &quot;map&quot;, &quot;set&quot;, &quot;weakmap&quot;, &quot;weakset&quot;, &quot;iterator&quot;, &quot;class&quot;], &quot;description&quot;: &quot;Object subtype hint. Specified for &lt;code&gt;object&lt;/code&gt; &lt;code&gt;function&lt;/code&gt; (for class) type values only.&quot; },
</ins><span class="cx">                 { &quot;name&quot;: &quot;className&quot;, &quot;type&quot;: &quot;string&quot;, &quot;optional&quot;: true, &quot;description&quot;: &quot;Object class (constructor) name. Specified for &lt;code&gt;object&lt;/code&gt; type values only.&quot; },
</span><span class="cx">                 { &quot;name&quot;: &quot;value&quot;, &quot;type&quot;: &quot;any&quot;, &quot;optional&quot;: true, &quot;description&quot;: &quot;Remote object value (in case of primitive values or JSON values if it was requested).&quot; },
</span><span class="cx">                 { &quot;name&quot;: &quot;description&quot;, &quot;type&quot;: &quot;string&quot;, &quot;optional&quot;: true, &quot;description&quot;: &quot;String representation of the object.&quot; },
</span><span class="cx">                 { &quot;name&quot;: &quot;objectId&quot;, &quot;$ref&quot;: &quot;RemoteObjectId&quot;, &quot;optional&quot;: true, &quot;description&quot;: &quot;Unique object identifier (for non-primitive values).&quot; },
</span><del>-                { &quot;name&quot;: &quot;size&quot;, &quot;type&quot;: &quot;integer&quot;, &quot;optional&quot;: true, &quot;description&quot;: &quot;Size of the array/collection. Specified for array/map/set/weakmap object type values only.&quot; },
</del><ins>+                { &quot;name&quot;: &quot;size&quot;, &quot;type&quot;: &quot;integer&quot;, &quot;optional&quot;: true, &quot;description&quot;: &quot;Size of the array/collection. Specified for array/map/set/weakmap/weakset object type values only.&quot; },
</ins><span class="cx">                 { &quot;name&quot;: &quot;classPrototype&quot;, &quot;$ref&quot;: &quot;RemoteObject&quot;, &quot;optional&quot;: true, &quot;description&quot;: &quot;Remote object for the class prototype. Specified for class object type values only.&quot; },
</span><span class="cx">                 { &quot;name&quot;: &quot;preview&quot;, &quot;$ref&quot;: &quot;ObjectPreview&quot;, &quot;optional&quot;: true, &quot;description&quot;: &quot;Preview containing abbreviated property values. Specified for &lt;code&gt;object&lt;/code&gt; type values only.&quot; }
</span><span class="cx">             ]
</span><span class="lines">@@ -29,13 +29,13 @@
</span><span class="cx">             &quot;description&quot;: &quot;Object containing abbreviated remote object value.&quot;,
</span><span class="cx">             &quot;properties&quot;: [
</span><span class="cx">                 { &quot;name&quot;: &quot;type&quot;, &quot;type&quot;: &quot;string&quot;, &quot;enum&quot;: [&quot;object&quot;, &quot;function&quot;, &quot;undefined&quot;, &quot;string&quot;, &quot;number&quot;, &quot;boolean&quot;, &quot;symbol&quot;], &quot;description&quot;: &quot;Object type.&quot; },
</span><del>-                { &quot;name&quot;: &quot;subtype&quot;, &quot;type&quot;: &quot;string&quot;, &quot;optional&quot;: true, &quot;enum&quot;: [&quot;array&quot;, &quot;null&quot;, &quot;node&quot;, &quot;regexp&quot;, &quot;date&quot;, &quot;error&quot;, &quot;map&quot;, &quot;set&quot;, &quot;weakmap&quot;, &quot;iterator&quot;, &quot;class&quot;], &quot;description&quot;: &quot;Object subtype hint. Specified for &lt;code&gt;object&lt;/code&gt; type values only.&quot; },
</del><ins>+                { &quot;name&quot;: &quot;subtype&quot;, &quot;type&quot;: &quot;string&quot;, &quot;optional&quot;: true, &quot;enum&quot;: [&quot;array&quot;, &quot;null&quot;, &quot;node&quot;, &quot;regexp&quot;, &quot;date&quot;, &quot;error&quot;, &quot;map&quot;, &quot;set&quot;, &quot;weakmap&quot;, &quot;weakset&quot;, &quot;iterator&quot;, &quot;class&quot;], &quot;description&quot;: &quot;Object subtype hint. Specified for &lt;code&gt;object&lt;/code&gt; type values only.&quot; },
</ins><span class="cx">                 { &quot;name&quot;: &quot;description&quot;, &quot;type&quot;: &quot;string&quot;, &quot;optional&quot;: true, &quot;description&quot;: &quot;String representation of the object.&quot; },
</span><span class="cx">                 { &quot;name&quot;: &quot;lossless&quot;, &quot;type&quot;: &quot;boolean&quot;, &quot;description&quot;: &quot;Determines whether preview is lossless (contains all information of the original object).&quot; },
</span><span class="cx">                 { &quot;name&quot;: &quot;overflow&quot;, &quot;type&quot;: &quot;boolean&quot;, &quot;optional&quot;: true, &quot;description&quot;: &quot;True iff some of the properties of the original did not fit.&quot; },
</span><span class="cx">                 { &quot;name&quot;: &quot;properties&quot;, &quot;type&quot;: &quot;array&quot;, &quot;items&quot;: { &quot;$ref&quot;: &quot;PropertyPreview&quot; }, &quot;optional&quot;: true, &quot;description&quot;: &quot;List of the properties.&quot; },
</span><span class="cx">                 { &quot;name&quot;: &quot;entries&quot;, &quot;type&quot;: &quot;array&quot;, &quot;items&quot;: { &quot;$ref&quot;: &quot;EntryPreview&quot; }, &quot;optional&quot;: true, &quot;description&quot;: &quot;List of the entries. Specified for &lt;code&gt;map&lt;/code&gt; and &lt;code&gt;set&lt;/code&gt; subtype values only.&quot; },
</span><del>-                { &quot;name&quot;: &quot;size&quot;, &quot;type&quot;: &quot;integer&quot;, &quot;optional&quot;: true, &quot;description&quot;: &quot;Size of the array/collection. Specified for array/map/set/weakmap object type values only.&quot; }
</del><ins>+                { &quot;name&quot;: &quot;size&quot;, &quot;type&quot;: &quot;integer&quot;, &quot;optional&quot;: true, &quot;description&quot;: &quot;Size of the array/collection. Specified for array/map/set/weakmap/weakset object type values only.&quot; }
</ins><span class="cx">             ]
</span><span class="cx">         },
</span><span class="cx">         {
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx">             &quot;properties&quot;: [
</span><span class="cx">                 { &quot;name&quot;: &quot;name&quot;, &quot;type&quot;: &quot;string&quot;, &quot;description&quot;: &quot;Property name.&quot; },
</span><span class="cx">                 { &quot;name&quot;: &quot;type&quot;, &quot;type&quot;: &quot;string&quot;, &quot;enum&quot;: [&quot;object&quot;, &quot;function&quot;, &quot;undefined&quot;, &quot;string&quot;, &quot;number&quot;, &quot;boolean&quot;, &quot;symbol&quot;, &quot;accessor&quot;], &quot;description&quot;: &quot;Object type.&quot; },
</span><del>-                { &quot;name&quot;: &quot;subtype&quot;, &quot;type&quot;: &quot;string&quot;, &quot;optional&quot;: true, &quot;enum&quot;: [&quot;array&quot;, &quot;null&quot;, &quot;node&quot;, &quot;regexp&quot;, &quot;date&quot;, &quot;error&quot;, &quot;map&quot;, &quot;set&quot;, &quot;weakmap&quot;, &quot;iterator&quot;, &quot;class&quot;], &quot;description&quot;: &quot;Object subtype hint. Specified for &lt;code&gt;object&lt;/code&gt; type values only.&quot; },
</del><ins>+                { &quot;name&quot;: &quot;subtype&quot;, &quot;type&quot;: &quot;string&quot;, &quot;optional&quot;: true, &quot;enum&quot;: [&quot;array&quot;, &quot;null&quot;, &quot;node&quot;, &quot;regexp&quot;, &quot;date&quot;, &quot;error&quot;, &quot;map&quot;, &quot;set&quot;, &quot;weakmap&quot;, &quot;weakset&quot;, &quot;iterator&quot;, &quot;class&quot;], &quot;description&quot;: &quot;Object subtype hint. Specified for &lt;code&gt;object&lt;/code&gt; type values only.&quot; },
</ins><span class="cx">                 { &quot;name&quot;: &quot;value&quot;, &quot;type&quot;: &quot;string&quot;, &quot;optional&quot;: true, &quot;description&quot;: &quot;User-friendly property value string.&quot; },
</span><span class="cx">                 { &quot;name&quot;: &quot;valuePreview&quot;, &quot;$ref&quot;: &quot;ObjectPreview&quot;, &quot;optional&quot;: true, &quot;description&quot;: &quot;Nested value preview.&quot; },
</span><span class="cx">                 { &quot;name&quot;: &quot;internal&quot;, &quot;type&quot;: &quot;boolean&quot;, &quot;optional&quot;: true, &quot;description&quot;: &quot;True if this is an internal property.&quot; }
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (183024 => 183025)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2015-04-20 19:40:03 UTC (rev 183024)
+++ trunk/Source/WebInspectorUI/ChangeLog        2015-04-20 20:25:56 UTC (rev 183025)
</span><span class="lines">@@ -1,3 +1,33 @@
</span><ins>+2015-04-20  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Web Inspector: Improve Support for WeakSet in Console
+        https://bugs.webkit.org/show_bug.cgi?id=143951
+
+        Reviewed by Darin Adler.
+
+        * UserInterface/Models/NativeFunctionParameters.js:
+        WeakSet has the same APIs and parameters as Set for the functions it implements.
+
+        * UserInterface/Protocol/RemoteObject.js:
+        (WebInspector.RemoteObject.prototype.isCollectionType):
+        (WebInspector.RemoteObject.prototype.isWeakCollection):
+        (WebInspector.RemoteObject.prototype.getCollectionEntries):
+        (WebInspector.RemoteObject.prototype._weakCollectionObjectGroup):
+        WeakSet is a weak collection.
+
+        * UserInterface/Models/ObjectPreview.js:
+        (WebInspector.ObjectPreview.prototype.hasSize):
+        * UserInterface/Views/ConsoleMessageView.js:
+        (WebInspector.ConsoleMessageView.prototype._formatParameter):
+        * UserInterface/Views/FormattedValue.css:
+        (.formatted-object, .formatted-node, .formatted-error, .formatted-map, .formatted-set, .formatted-weakmap, .formatted-weakset):
+        (:matches(.formatted-array, .formatted-map, .formatted-set, .formatted-weakmap, .formatted-weakset) &gt; .size):
+        (.formatted-object, .formatted-node, .formatted-error, .formatted-map, .formatted-set, .formatted-weakmap): Deleted.
+        (:matches(.formatted-array, .formatted-map, .formatted-set, .formatted-weakmap) &gt; .size): Deleted.
+        * UserInterface/Views/FormattedValue.js:
+        (WebInspector.FormattedValue.createElementForTypesAndValue):
+        Treat a WeakSet like a set in more places.
+
</ins><span class="cx"> 2015-04-18  Nikita Vasilyev  &lt;nvasilyev@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: Pass multiple arguments to classList.add and classList.remove
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsNativeFunctionParametersjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js (183024 => 183025)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js        2015-04-20 19:40:03 UTC (rev 183024)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js        2015-04-20 20:25:56 UTC (rev 183025)
</span><span class="lines">@@ -2063,6 +2063,7 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> WebInspector.NativePrototypeFunctionParameters.WeakMap = WebInspector.NativePrototypeFunctionParameters.Map;
</span><ins>+WebInspector.NativePrototypeFunctionParameters.WeakSet = WebInspector.NativePrototypeFunctionParameters.Set;
</ins><span class="cx"> 
</span><span class="cx"> (function() {
</span><span class="cx">     function mixin(o, mixin) {
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsObjectPreviewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Models/ObjectPreview.js (183024 => 183025)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/ObjectPreview.js        2015-04-20 19:40:03 UTC (rev 183024)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/ObjectPreview.js        2015-04-20 20:25:56 UTC (rev 183025)
</span><span class="lines">@@ -112,6 +112,6 @@
</span><span class="cx"> 
</span><span class="cx">     hasSize()
</span><span class="cx">     {
</span><del>-        return this._size !== undefined &amp;&amp; (this._subtype === &quot;array&quot; || this._subtype === &quot;set&quot; || this._subtype === &quot;map&quot; || this._subtype === &quot;weakmap&quot;);
</del><ins>+        return this._size !== undefined &amp;&amp; (this._subtype === &quot;array&quot; || this._subtype === &quot;set&quot; || this._subtype === &quot;map&quot; || this._subtype === &quot;weakmap&quot; || this._subtype === &quot;weakset&quot;);
</ins><span class="cx">     }
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolRemoteObjectjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js (183024 => 183025)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js        2015-04-20 19:40:03 UTC (rev 183024)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js        2015-04-20 20:25:56 UTC (rev 183025)
</span><span class="lines">@@ -342,12 +342,12 @@
</span><span class="cx"> 
</span><span class="cx">     isCollectionType()
</span><span class="cx">     {
</span><del>-        return this._subtype === &quot;map&quot; || this._subtype === &quot;set&quot; || this._subtype === &quot;weakmap&quot;;
</del><ins>+        return this._subtype === &quot;map&quot; || this._subtype === &quot;set&quot; || this._subtype === &quot;weakmap&quot; || this._subtype === &quot;weakset&quot;;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     isWeakCollection()
</span><span class="cx">     {
</span><del>-        return this._subtype === &quot;weakmap&quot;;
</del><ins>+        return this._subtype === &quot;weakmap&quot; || this._subtype === &quot;weakset&quot;;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     getCollectionEntries(start, numberToFetch, callback)
</span><span class="lines">@@ -359,8 +359,9 @@
</span><span class="cx">         console.assert(numberToFetch &gt;= 0);
</span><span class="cx">         console.assert(this.isCollectionType());
</span><span class="cx"> 
</span><del>-        // WeakMaps are not ordered. We should never send a non-zero start.
</del><ins>+        // WeakMaps and WeakSets are not ordered. We should never send a non-zero start.
</ins><span class="cx">         console.assert((this._subtype === &quot;weakmap&quot; &amp;&amp; start === 0) || this._subtype !== &quot;weakmap&quot;);
</span><ins>+        console.assert((this._subtype === &quot;weakset&quot; &amp;&amp; start === 0) || this._subtype !== &quot;weakset&quot;);
</ins><span class="cx"> 
</span><span class="cx">         var objectGroup = this.isWeakCollection() ? this._weakCollectionObjectGroup() : &quot;&quot;;
</span><span class="cx"> 
</span><span class="lines">@@ -476,7 +477,7 @@
</span><span class="cx"> 
</span><span class="cx">     _weakCollectionObjectGroup()
</span><span class="cx">     {
</span><del>-        return JSON.stringify(this._objectId) + &quot;-WeakMap&quot;;
</del><ins>+        return JSON.stringify(this._objectId) + &quot;-&quot; + this._subtype;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     _getPropertyDescriptors(ownProperties, callback)
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsConsoleMessageViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js (183024 => 183025)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js        2015-04-20 19:40:03 UTC (rev 183024)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js        2015-04-20 20:25:56 UTC (rev 183025)
</span><span class="lines">@@ -433,6 +433,7 @@
</span><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><ins>+            &quot;weakset&quot;: this._formatParameterAsObject,
</ins><span class="cx">             &quot;iterator&quot;: this._formatParameterAsObject,
</span><span class="cx">             &quot;class&quot;: this._formatParameterAsObject,
</span><span class="cx">             &quot;array&quot;: this._formatParameterAsArray,
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsFormattedValuecss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.css (183024 => 183025)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.css        2015-04-20 19:40:03 UTC (rev 183024)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.css        2015-04-20 20:25:56 UTC (rev 183025)
</span><span class="lines">@@ -23,13 +23,13 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-.formatted-object, .formatted-node, .formatted-error, .formatted-map, .formatted-set, .formatted-weakmap {
</del><ins>+.formatted-object, .formatted-node, .formatted-error, .formatted-map, .formatted-set, .formatted-weakmap, .formatted-weakset {
</ins><span class="cx">     position: relative;
</span><span class="cx">     display: inline-block;
</span><span class="cx">     color: black;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-:matches(.formatted-array, .formatted-map, .formatted-set, .formatted-weakmap) &gt; .size {
</del><ins>+:matches(.formatted-array, .formatted-map, .formatted-set, .formatted-weakmap, .formatted-weakset) &gt; .size {
</ins><span class="cx">     font-style: normal;
</span><span class="cx">     color: rgba(0, 0, 0, 0.33);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsFormattedValuejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.js (183024 => 183025)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.js        2015-04-20 19:40:03 UTC (rev 183024)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/FormattedValue.js        2015-04-20 20:25:56 UTC (rev 183025)
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx">     span.textContent = displayString;
</span><span class="cx"> 
</span><span class="cx">     // If there is a size, include it.
</span><del>-    if (size !== undefined &amp;&amp; (subtype === &quot;array&quot; || subtype === &quot;set&quot; || subtype === &quot;map&quot; || subtype === &quot;weakmap&quot;)) {
</del><ins>+    if (size !== undefined &amp;&amp; (subtype === &quot;array&quot; || subtype === &quot;set&quot; || subtype === &quot;map&quot; || subtype === &quot;weakmap&quot; || subtype === &quot;weakset&quot;)) {
</ins><span class="cx">         var sizeElement = span.appendChild(document.createElement(&quot;span&quot;));
</span><span class="cx">         sizeElement.className = &quot;size&quot;;
</span><span class="cx">         sizeElement.textContent = &quot; (&quot; + size + &quot;)&quot;;
</span></span></pre>
</div>
</div>

</body>
</html>