<!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>[182493] 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/182493">182493</a></dd>
<dt>Author</dt> <dd>joepeck@webkit.org</dd>
<dt>Date</dt> <dd>2015-04-07 14:28:57 -0700 (Tue, 07 Apr 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Web Inspector: ES6: Show Symbol properties on Objects
https://bugs.webkit.org/show_bug.cgi?id=141279
Reviewed by Timothy Hatcher.
Source/JavaScriptCore:
* inspector/protocol/Runtime.json:
Give PropertyDescriptor a reference to the Symbol RemoteObject
if the property is a symbol property.
* inspector/InjectedScriptSource.js:
Enumerate symbol properties on objects.
Source/WebInspectorUI:
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Models/PropertyDescriptor.js:
(WebInspector.PropertyDescriptor.get symbol):
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.wrappedCallback):
Update new PropertyDescriptor call site.
* UserInterface/Views/ObjectTreeBaseTreeElement.js:
(WebInspector.ObjectTreeBaseTreeElement._logSymbolProperty):
Provide a context menu for rows with Symbol properties to log
the Symbol property, and therefore get a reference to it.
* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView.comparePropertyDescriptors):
Better handle symbol properties in sorting.
* UserInterface/Views/TypePropertiesSection.js:
(WebInspector.TypePropertiesSection.PropertyComparator):
Return better value when values are equal.
LayoutTests:
* inspector/model/remote-object-expected.txt:
* inspector/model/remote-object-get-properties-expected.txt:
* inspector/model/remote-object-get-properties.html:
* inspector/model/remote-object.html:
Update tests to include objects with Symbol properties.</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="#trunkLayoutTestsinspectormodelremoteobjectgetpropertiesexpectedtxt">trunk/LayoutTests/inspector/model/remote-object-get-properties-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectormodelremoteobjectgetpropertieshtml">trunk/LayoutTests/inspector/model/remote-object-get-properties.html</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="#trunkSourceJavaScriptCoreinspectorprotocolRuntimejson">trunk/Source/JavaScriptCore/inspector/protocol/Runtime.json</a></li>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs">trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsPropertyDescriptorjs">trunk/Source/WebInspectorUI/UserInterface/Models/PropertyDescriptor.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolRemoteObjectjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsObjectTreeBaseTreeElementjs">trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsObjectTreeViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsTypePropertiesSectionjs">trunk/Source/WebInspectorUI/UserInterface/Views/TypePropertiesSection.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (182492 => 182493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-04-07 21:17:36 UTC (rev 182492)
+++ trunk/LayoutTests/ChangeLog        2015-04-07 21:28:57 UTC (rev 182493)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2015-04-07 Joseph Pecoraro <pecoraro@apple.com>
+
+ Web Inspector: ES6: Show Symbol properties on Objects
+ https://bugs.webkit.org/show_bug.cgi?id=141279
+
+ Reviewed by Timothy Hatcher.
+
+ * inspector/model/remote-object-expected.txt:
+ * inspector/model/remote-object-get-properties-expected.txt:
+ * inspector/model/remote-object-get-properties.html:
+ * inspector/model/remote-object.html:
+ Update tests to include objects with Symbol properties.
+
</ins><span class="cx"> 2015-02-25 Sergio Villar Senin <svillar@igalia.com>
</span><span class="cx">
</span><span class="cx"> [CSS Grid Layout] Update track sizes after distributing extra space
</span></span></pre></div>
<a id="trunkLayoutTestsinspectormodelremoteobjectexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/model/remote-object-expected.txt (182492 => 182493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/model/remote-object-expected.txt        2015-04-07 21:17:36 UTC (rev 182492)
+++ trunk/LayoutTests/inspector/model/remote-object-expected.txt        2015-04-07 21:28:57 UTC (rev 182493)
</span><span class="lines">@@ -2047,6 +2047,48 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> -----------------------------------------------------
</span><ins>+EXPRESSION: obj = {}; obj['prop'] = 1; obj[Symbol()] = 2; obj[Symbol('sym')] = 3; obj[Symbol('sym')] = 4; obj[Symbol.iterator] = Symbol(); obj
+{
+ "_type": "object",
+ "_objectId": "<filtered>",
+ "_description": "Object",
+ "_preview": {
+ "_type": "object",
+ "_description": "Object",
+ "_lossless": true,
+ "_overflow": false,
+ "_properties": [
+ {
+ "_name": "prop",
+ "_type": "number",
+ "_value": "1"
+ },
+ {
+ "_name": "Symbol()",
+ "_type": "number",
+ "_value": "2"
+ },
+ {
+ "_name": "Symbol(sym)",
+ "_type": "number",
+ "_value": "3"
+ },
+ {
+ "_name": "Symbol(sym)",
+ "_type": "number",
+ "_value": "4"
+ },
+ {
+ "_name": "Symbol(Symbol.iterator)",
+ "_type": "symbol",
+ "_value": "Symbol()"
+ }
+ ],
+ "_entries": null
+ }
+}
+
+-----------------------------------------------------
</ins><span class="cx"> EXPRESSION: document.body
</span><span class="cx"> {
</span><span class="cx"> "_type": "object",
</span></span></pre></div>
<a id="trunkLayoutTestsinspectormodelremoteobjectgetpropertiesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/model/remote-object-get-properties-expected.txt (182492 => 182493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/model/remote-object-get-properties-expected.txt        2015-04-07 21:17:36 UTC (rev 182492)
+++ trunk/LayoutTests/inspector/model/remote-object-get-properties-expected.txt        2015-04-07 21:28:57 UTC (rev 182493)
</span><span class="lines">@@ -265,5 +265,49 @@
</span><span class="cx"> boundThis
</span><span class="cx"> boundArgs
</span><span class="cx"> -----------------------------------------------------
</span><ins>+
+-----------------------------------------------------
+EXPRESSION: window.objectWithSymbolProperties
+type: object
+description: Object
+
+OWN PROPERTIES:
+ prop
+ prop2
+ Symbol()
+ Symbol(sym)
+ Symbol(sym)
+ Symbol()
+ __proto__
+
+DISPLAYABLE PROPERTIES:
+ prop
+ prop2
+ Symbol()
+ Symbol(sym)
+ Symbol(sym)
+ Symbol()
+ __proto__
+
+ALL PROPERTIES:
+ prop
+ prop2
+ Symbol()
+ Symbol(sym)
+ Symbol(sym)
+ Symbol()
+ toString
+ toLocaleString
+ valueOf
+ hasOwnProperty
+ propertyIsEnumerable
+ isPrototypeOf
+ __defineGetter__
+ __defineSetter__
+ __lookupGetter__
+ __lookupSetter__
+ constructor
+ __proto__
+-----------------------------------------------------
</ins><span class="cx"> DONE
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsinspectormodelremoteobjectgetpropertieshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/model/remote-object-get-properties.html (182492 => 182493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/model/remote-object-get-properties.html        2015-04-07 21:17:36 UTC (rev 182492)
+++ trunk/LayoutTests/inspector/model/remote-object-get-properties.html        2015-04-07 21:28:57 UTC (rev 182493)
</span><span class="lines">@@ -43,6 +43,7 @@
</span><span class="cx"> var badGetterObject = new ClassWithBadGetter;
</span><span class="cx"> var unboundFunction = function() { console.log(arguments); }
</span><span class="cx"> var boundFunction = unboundFunction.bind(document.body, 1, 2, 3);
</span><ins>+var objectWithSymbolProperties = {prop:1, [Symbol()]:2, [Symbol('sym')]:3, [Symbol('sym')]:4, [Symbol()]: Symbol(), prop2: 5};
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> // --------
</span><span class="lines">@@ -59,6 +60,7 @@
</span><span class="cx"> {expression: "window.badGetterObject"},
</span><span class="cx"> {expression: "window.unboundFunction"},
</span><span class="cx"> {expression: "window.boundFunction"},
</span><ins>+ {expression: "window.objectWithSymbolProperties"},
</ins><span class="cx"> ]
</span><span class="cx">
</span><span class="cx"> function runNextStep() {
</span></span></pre></div>
<a id="trunkLayoutTestsinspectormodelremoteobjecthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/model/remote-object.html (182492 => 182493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/model/remote-object.html        2015-04-07 21:17:36 UTC (rev 182492)
+++ trunk/LayoutTests/inspector/model/remote-object.html        2015-04-07 21:28:57 UTC (rev 182493)
</span><span class="lines">@@ -103,6 +103,7 @@
</span><span class="cx"> {expression: "window.loadEvent"}, // window.loadEvent is set inside of <body onload="..."> below.
</span><span class="cx"> {expression: "new ArrayBuffer(16)"},
</span><span class="cx"> {expression: "new DataView(new ArrayBuffer(16))"},
</span><ins>+ {expression: "obj = {}; obj['prop'] = 1; obj[Symbol()] = 2; obj[Symbol('sym')] = 3; obj[Symbol('sym')] = 4; obj[Symbol.iterator] = Symbol(); obj"}, // Symbol properties
</ins><span class="cx">
</span><span class="cx"> // Node
</span><span class="cx"> {expression: "document.body"},
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (182492 => 182493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-04-07 21:17:36 UTC (rev 182492)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-04-07 21:28:57 UTC (rev 182493)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2015-04-07 Joseph Pecoraro <pecoraro@apple.com>
+
+ Web Inspector: ES6: Show Symbol properties on Objects
+ https://bugs.webkit.org/show_bug.cgi?id=141279
+
+ Reviewed by Timothy Hatcher.
+
+ * inspector/protocol/Runtime.json:
+ Give PropertyDescriptor a reference to the Symbol RemoteObject
+ if the property is a symbol property.
+
+ * inspector/InjectedScriptSource.js:
+ Enumerate symbol properties on objects.
+
</ins><span class="cx"> 2015-04-07 Filip Pizlo <fpizlo@apple.com>
</span><span class="cx">
</span><span class="cx"> Make it possible to enable LLVM FastISel
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorInjectedScriptSourcejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/InjectedScriptSource.js (182492 => 182493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/InjectedScriptSource.js        2015-04-07 21:17:36 UTC (rev 182492)
+++ trunk/Source/JavaScriptCore/inspector/InjectedScriptSource.js        2015-04-07 21:28:57 UTC (rev 182493)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2007, 2014 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2007, 2014-2015 Apple Inc. All rights reserved.
</ins><span class="cx"> * Copyright (C) 2013 Google Inc. All rights reserved.
</span><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="lines">@@ -239,6 +239,8 @@
</span><span class="cx"> descriptor.configurable = false;
</span><span class="cx"> if (!("enumerable" in descriptor))
</span><span class="cx"> descriptor.enumerable = false;
</span><ins>+ if ("symbol" in descriptor)
+ descriptor.symbol = this._wrapObject(descriptor.symbol, objectGroupName);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return descriptors;
</span><span class="lines">@@ -607,20 +609,25 @@
</span><span class="cx"> _propertyDescriptors: function(object, collectionMode)
</span><span class="cx"> {
</span><span class="cx"> var descriptors = [];
</span><del>- var nameProcessed = {};
- nameProcessed["__proto__"] = null;
</del><ins>+ var nameProcessed = new Set;
</ins><span class="cx">
</span><del>- function createFakeValueDescriptor(name, descriptor, isOwnProperty, possibleNativeBindingGetter)
</del><ins>+ function createFakeValueDescriptor(name, symbol, descriptor, isOwnProperty, possibleNativeBindingGetter)
</ins><span class="cx"> {
</span><span class="cx"> try {
</span><span class="cx"> var descriptor = {name, value: object[name], writable: descriptor.writable || false, configurable: descriptor.configurable || false, enumerable: descriptor.enumerable || false};
</span><span class="cx"> if (possibleNativeBindingGetter)
</span><span class="cx"> descriptor.nativeGetter = true;
</span><ins>+ if (isOwnProperty)
+ descriptor.isOwn = true;
+ if (symbol)
+ descriptor.symbol = symbol;
</ins><span class="cx"> return descriptor;
</span><span class="cx"> } catch (e) {
</span><span class="cx"> var errorDescriptor = {name, value: e, wasThrown: true};
</span><span class="cx"> if (isOwnProperty)
</span><span class="cx"> errorDescriptor.isOwn = true;
</span><ins>+ if (symbol)
+ errorDescriptor.symbol = symbol;
</ins><span class="cx"> return errorDescriptor;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -652,20 +659,23 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- function processPropertyNames(o, names, isOwnProperty)
</del><ins>+ function processProperties(o, properties, isOwnProperty)
</ins><span class="cx"> {
</span><del>- for (var i = 0; i < names.length; ++i) {
- var name = names[i];
- if (nameProcessed[name] || name === "__proto__")
</del><ins>+ for (var i = 0; i < properties.length; ++i) {
+ var property = properties[i];
+ if (nameProcessed.has(property) || property === "__proto__")
</ins><span class="cx"> continue;
</span><span class="cx">
</span><del>- nameProcessed[name] = true;
</del><ins>+ nameProcessed.add(property);
</ins><span class="cx">
</span><del>- var descriptor = Object.getOwnPropertyDescriptor(o, name);
</del><ins>+ var name = toString(property);
+ var symbol = isSymbol(property) ? property : null;
+
+ var descriptor = Object.getOwnPropertyDescriptor(o, property);
</ins><span class="cx"> if (!descriptor) {
</span><span class="cx"> // FIXME: Bad descriptor. Can we get here?
</span><span class="cx"> // Fall back to very restrictive settings.
</span><del>- var fakeDescriptor = createFakeValueDescriptor(name, {writable: false, configurable: false, enumerable: false}, isOwnProperty);
</del><ins>+ var fakeDescriptor = createFakeValueDescriptor(name, symbol, {writable: false, configurable: false, enumerable: false}, isOwnProperty);
</ins><span class="cx"> processDescriptor(fakeDescriptor, isOwnProperty);
</span><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="lines">@@ -674,7 +684,7 @@
</span><span class="cx"> // FIXME: <https://webkit.org/b/140575> Web Inspector: Native Bindings Descriptors are Incomplete
</span><span class="cx"> // Developers may create such a descriptors, so we should be resilient:
</span><span class="cx"> // var x = {}; Object.defineProperty(x, "p", {get:undefined}); Object.getOwnPropertyDescriptor(x, "p")
</span><del>- var fakeDescriptor = createFakeValueDescriptor(name, descriptor, isOwnProperty, true);
</del><ins>+ var fakeDescriptor = createFakeValueDescriptor(name, symbol, descriptor, isOwnProperty, true);
</ins><span class="cx"> processDescriptor(fakeDescriptor, isOwnProperty, true);
</span><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="lines">@@ -682,6 +692,8 @@
</span><span class="cx"> descriptor.name = name;
</span><span class="cx"> if (isOwnProperty)
</span><span class="cx"> descriptor.isOwn = true;
</span><ins>+ if (symbol)
+ descriptor.symbol = symbol;
</ins><span class="cx"> processDescriptor(descriptor, isOwnProperty);
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -689,7 +701,9 @@
</span><span class="cx"> // Iterate prototype chain.
</span><span class="cx"> for (var o = object; this._isDefined(o); o = o.__proto__) {
</span><span class="cx"> var isOwnProperty = o === object;
</span><del>- processPropertyNames(o, Object.getOwnPropertyNames(o), isOwnProperty);
</del><ins>+ processProperties(o, Object.getOwnPropertyNames(o), isOwnProperty);
+ if (Object.getOwnPropertySymbols)
+ processProperties(o, Object.getOwnPropertySymbols(o), isOwnProperty);
</ins><span class="cx"> if (collectionMode === InjectedScript.CollectionMode.OwnProperties)
</span><span class="cx"> break;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorprotocolRuntimejson"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/protocol/Runtime.json (182492 => 182493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/protocol/Runtime.json        2015-04-07 21:17:36 UTC (rev 182492)
+++ trunk/Source/JavaScriptCore/inspector/protocol/Runtime.json        2015-04-07 21:28:57 UTC (rev 182493)
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx"> "type": "object",
</span><span class="cx"> "description": "Object property descriptor.",
</span><span class="cx"> "properties": [
</span><del>- { "name": "name", "type": "string", "description": "Property name." },
</del><ins>+ { "name": "name", "type": "string", "description": "Property name or symbol description." },
</ins><span class="cx"> { "name": "value", "$ref": "RemoteObject", "optional": true, "description": "The value associated with the property." },
</span><span class="cx"> { "name": "writable", "type": "boolean", "optional": true, "description": "True if the value associated with the property may be changed (data descriptors only)." },
</span><span class="cx"> { "name": "get", "$ref": "RemoteObject", "optional": true, "description": "A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only)." },
</span><span class="lines">@@ -80,6 +80,7 @@
</span><span class="cx"> { "name": "enumerable", "type": "boolean", "description": "True if this property shows up during enumeration of the properties on the corresponding object." },
</span><span class="cx"> { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the evaluation." },
</span><span class="cx"> { "name": "isOwn", "optional": true, "type": "boolean", "description": "True if the property is owned for the object." },
</span><ins>+ { "name": "symbol", "optional": true, "$ref": "Runtime.RemoteObject", "description": "Property symbol object, if the property is a symbol." },
</ins><span class="cx"> { "name": "nativeGetter", "optional": true, "type": "boolean", "description": "True if the property value came from a native getter." }
</span><span class="cx"> ]
</span><span class="cx"> },
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (182492 => 182493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2015-04-07 21:17:36 UTC (rev 182492)
+++ trunk/Source/WebInspectorUI/ChangeLog        2015-04-07 21:28:57 UTC (rev 182493)
</span><span class="lines">@@ -1,3 +1,31 @@
</span><ins>+2015-04-07 Joseph Pecoraro <pecoraro@apple.com>
+
+ Web Inspector: ES6: Show Symbol properties on Objects
+ https://bugs.webkit.org/show_bug.cgi?id=141279
+
+ Reviewed by Timothy Hatcher.
+
+ * Localizations/en.lproj/localizedStrings.js:
+ * UserInterface/Models/PropertyDescriptor.js:
+ (WebInspector.PropertyDescriptor.get symbol):
+
+ * UserInterface/Protocol/RemoteObject.js:
+ (WebInspector.RemoteObject.wrappedCallback):
+ Update new PropertyDescriptor call site.
+
+ * UserInterface/Views/ObjectTreeBaseTreeElement.js:
+ (WebInspector.ObjectTreeBaseTreeElement._logSymbolProperty):
+ Provide a context menu for rows with Symbol properties to log
+ the Symbol property, and therefore get a reference to it.
+
+ * UserInterface/Views/ObjectTreeView.js:
+ (WebInspector.ObjectTreeView.comparePropertyDescriptors):
+ Better handle symbol properties in sorting.
+
+ * UserInterface/Views/TypePropertiesSection.js:
+ (WebInspector.TypePropertiesSection.PropertyComparator):
+ Return better value when values are equal.
+
</ins><span class="cx"> 2015-04-07 Timothy Hatcher <timothy@apple.com>
</span><span class="cx">
</span><span class="cx"> Web Inspector: HierarchicalPathNavigationItem's additionalClassNames should be _additionalClassNames
</span></span></pre></div>
<a id="trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (182492 => 182493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2015-04-07 21:17:36 UTC (rev 182492)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2015-04-07 21:28:57 UTC (rev 182493)
</span><span class="lines">@@ -290,6 +290,7 @@
</span><span class="cx"> localizedStrings["Located at %s"] = "Located at %s";
</span><span class="cx"> localizedStrings["Location"] = "Location";
</span><span class="cx"> localizedStrings["Log Message"] = "Log Message";
</span><ins>+localizedStrings["Log Symbol"] = "Log Symbol";
</ins><span class="cx"> localizedStrings["Log Value"] = "Log Value";
</span><span class="cx"> localizedStrings["Log: "] = "Log: ";
</span><span class="cx"> localizedStrings["Logs"] = "Logs";
</span><span class="lines">@@ -407,6 +408,7 @@
</span><span class="cx"> localizedStrings["Selected"] = "Selected";
</span><span class="cx"> localizedStrings["Selected Item"] = "Selected Item";
</span><span class="cx"> localizedStrings["Selected Items"] = "Selected Items";
</span><ins>+localizedStrings["Selected Symbol"] = "Selected Symbol";
</ins><span class="cx"> localizedStrings["Selected Value"] = "Selected Value";
</span><span class="cx"> localizedStrings["Self Time"] = "Self Time";
</span><span class="cx"> localizedStrings["Semantic Issue"] = "Semantic Issue";
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsPropertyDescriptorjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Models/PropertyDescriptor.js (182492 => 182493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/PropertyDescriptor.js        2015-04-07 21:17:36 UTC (rev 182492)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/PropertyDescriptor.js        2015-04-07 21:28:57 UTC (rev 182493)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx">
</span><span class="cx"> WebInspector.PropertyDescriptor = class PropertyDescriptor extends WebInspector.Object
</span><span class="cx"> {
</span><del>- constructor(descriptor, isOwnProperty, wasThrown, nativeGetter, isInternalProperty)
</del><ins>+ constructor(descriptor, symbol, isOwnProperty, wasThrown, nativeGetter, isInternalProperty)
</ins><span class="cx"> {
</span><span class="cx"> super();
</span><span class="cx">
</span><span class="lines">@@ -34,12 +34,14 @@
</span><span class="cx"> console.assert(!descriptor.value || descriptor.value instanceof WebInspector.RemoteObject);
</span><span class="cx"> console.assert(!descriptor.get || descriptor.get instanceof WebInspector.RemoteObject);
</span><span class="cx"> console.assert(!descriptor.set || descriptor.set instanceof WebInspector.RemoteObject);
</span><ins>+ console.assert(!symbol || symbol instanceof WebInspector.RemoteObject);
</ins><span class="cx">
</span><span class="cx"> this._name = descriptor.name;
</span><span class="cx"> this._value = descriptor.value;
</span><span class="cx"> this._hasValue = "value" in descriptor;
</span><span class="cx"> this._get = descriptor.get;
</span><span class="cx"> this._set = descriptor.set;
</span><ins>+ this._symbol = symbol;
</ins><span class="cx">
</span><span class="cx"> this._writable = descriptor.writable || false;
</span><span class="cx"> this._configurable = descriptor.configurable || false;
</span><span class="lines">@@ -63,13 +65,16 @@
</span><span class="cx"> if (payload.set)
</span><span class="cx"> payload.set = WebInspector.RemoteObject.fromPayload(payload.set);
</span><span class="cx">
</span><ins>+ if (payload.symbol)
+ payload.symbol = WebInspector.RemoteObject.fromPayload(payload.symbol);
+
</ins><span class="cx"> if (internal) {
</span><span class="cx"> console.assert(payload.value);
</span><span class="cx"> payload.writable = payload.configurable = payload.enumerable = false;
</span><span class="cx"> payload.isOwn = true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- return new WebInspector.PropertyDescriptor(payload, payload.isOwn, payload.wasThrown, payload.nativeGetter, internal);
</del><ins>+ return new WebInspector.PropertyDescriptor(payload, payload.symbol, payload.isOwn, payload.wasThrown, payload.nativeGetter, internal);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Public
</span><span class="lines">@@ -109,6 +114,11 @@
</span><span class="cx"> return this._enumerable;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ get symbol()
+ {
+ return this._symbol;
+ }
+
</ins><span class="cx"> get isOwnProperty()
</span><span class="cx"> {
</span><span class="cx"> return this._own;
</span><span class="lines">@@ -148,4 +158,9 @@
</span><span class="cx"> {
</span><span class="cx"> return !isNaN(Number(this._name));
</span><span class="cx"> }
</span><ins>+
+ isSymbolProperty()
+ {
+ return !!this._symbol;
+ }
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceProtocolRemoteObjectjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js (182492 => 182493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js        2015-04-07 21:17:36 UTC (rev 182492)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/RemoteObject.js        2015-04-07 21:28:57 UTC (rev 182493)
</span><span class="lines">@@ -436,7 +436,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> var fakeDescriptor = {name: propertyName, value: result, writable: true, configurable: true, enumerable: false};
</span><del>- var fakePropertyDescriptor = new WebInspector.PropertyDescriptor(fakeDescriptor, true, false, false, false);
</del><ins>+ var fakePropertyDescriptor = new WebInspector.PropertyDescriptor(fakeDescriptor, null, true, false, false, false);
</ins><span class="cx"> callback(fakePropertyDescriptor);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsObjectTreeBaseTreeElementjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js (182492 => 182493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js        2015-04-07 21:17:36 UTC (rev 182492)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeBaseTreeElement.js        2015-04-07 21:28:57 UTC (rev 182493)
</span><span class="lines">@@ -154,6 +154,16 @@
</span><span class="cx">
</span><span class="cx"> // Private
</span><span class="cx">
</span><ins>+ _logSymbolProperty()
+ {
+ var symbol = this._property.symbol;
+ if (!symbol)
+ return;
+
+ var text = WebInspector.UIString("Selected Symbol");
+ WebInspector.consoleLogViewController.appendImmediateExecutionWithResult(text, symbol);
+ }
+
</ins><span class="cx"> _logValue(value)
</span><span class="cx"> {
</span><span class="cx"> var resolvedValue = value || this.resolvedValue();
</span><span class="lines">@@ -177,6 +187,10 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> var contextMenu = new WebInspector.ContextMenu(event);
</span><ins>+
+ if (this._property && this._property.symbol)
+ contextMenu.appendItem(WebInspector.UIString("Log Symbol"), this._logSymbolProperty.bind(this));
+
</ins><span class="cx"> contextMenu.appendItem(WebInspector.UIString("Log Value"), this._logValue.bind(this));
</span><span class="cx">
</span><span class="cx"> var propertyPath = this.resolvedValuePropertyPath();
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsObjectTreeViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js (182492 => 182493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js        2015-04-07 21:17:36 UTC (rev 182492)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ObjectTreeView.js        2015-04-07 21:28:57 UTC (rev 182493)
</span><span class="lines">@@ -104,16 +104,22 @@
</span><span class="cx"> if (b === "__proto__")
</span><span class="cx"> return -1;
</span><span class="cx">
</span><del>- // Put internal properties at the top.
- if (a.isInternalProperty && !b.isInternalProperty)
</del><ins>+ // Put Internal properties at the top.
+ if (propertyA.isInternalProperty && !propertyB.isInternalProperty)
</ins><span class="cx"> return -1;
</span><del>- if (b.isInternalProperty && !a.isInternalProperty)
</del><ins>+ if (propertyB.isInternalProperty && !propertyA.isInternalProperty)
</ins><span class="cx"> return 1;
</span><span class="cx">
</span><del>- // if used elsewhere make sure to
- // - convert a and b to strings (not needed here, properties are all strings)
- // - check if a == b (not needed here, no two properties can be the same)
</del><ins>+ // Put Symbol properties at the bottom.
+ if (propertyA.symbol && !propertyB.symbol)
+ return 1;
+ if (propertyB.symbol && !propertyA.symbol)
+ return -1;
</ins><span class="cx">
</span><ins>+ // Symbol properties may have the same description string but be different objects.
+ if (a === b)
+ return 0;
+
</ins><span class="cx"> var diff = 0;
</span><span class="cx"> var chunk = /^\d+|^\D+/;
</span><span class="cx"> var chunka, chunkb, anum, bnum;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTypePropertiesSectionjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TypePropertiesSection.js (182492 => 182493)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TypePropertiesSection.js        2015-04-07 21:17:36 UTC (rev 182492)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TypePropertiesSection.js        2015-04-07 21:28:57 UTC (rev 182493)
</span><span class="lines">@@ -90,7 +90,7 @@
</span><span class="cx"> if (b.indexOf("__proto__") !== -1)
</span><span class="cx"> return -1;
</span><span class="cx"> if (a === b)
</span><del>- return 1;
</del><ins>+ return 0;
</ins><span class="cx">
</span><span class="cx"> var diff = 0;
</span><span class="cx"> var chunk = /^\d+|^\D+/;
</span></span></pre>
</div>
</div>
</body>
</html>