<!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>[210052] 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/210052">210052</a></dd>
<dt>Author</dt> <dd>keith_miller@apple.com</dd>
<dt>Date</dt> <dd>2016-12-20 20:04:50 -0800 (Tue, 20 Dec 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Add support for global
https://bugs.webkit.org/show_bug.cgi?id=165171
Reviewed by Filip Pizlo.
JSTests:
* stress/global.js: Added.
Source/JavaScriptCore:
This patch adds spport for the global property on the global object.
The global property spec is in stage three and is quite simple.
For reference: http://tc39.github.io/proposal-global/
* runtime/JSGlobalObject.cpp:
LayoutTests:
Fix getOwnPropertyDescriptor test.
* js/resources/getOwnPropertyDescriptor.js:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkJSTestsChangeLog">trunk/JSTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsjsdomgetOwnPropertyDescriptorexpectedtxt">trunk/LayoutTests/js/dom/getOwnPropertyDescriptor-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsresourcesgetOwnPropertyDescriptorjs">trunk/LayoutTests/js/resources/getOwnPropertyDescriptor.js</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSGlobalObjectcpp">trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkJSTestsstressglobaljs">trunk/JSTests/stress/global.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkJSTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/JSTests/ChangeLog (210051 => 210052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JSTests/ChangeLog        2016-12-21 02:29:21 UTC (rev 210051)
+++ trunk/JSTests/ChangeLog        2016-12-21 04:04:50 UTC (rev 210052)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2016-12-20 Keith Miller <keith_miller@apple.com>
+
+ Add support for global
+ https://bugs.webkit.org/show_bug.cgi?id=165171
+
+ Reviewed by Filip Pizlo.
+
+ * stress/global.js: Added.
+
</ins><span class="cx"> 2016-12-20 JF Bastien <jfbastien@apple.com>
</span><span class="cx">
</span><span class="cx"> WebAssembly API: implement WebAssembly.LinkError
</span></span></pre></div>
<a id="trunkJSTestsstressglobaljs"></a>
<div class="addfile"><h4>Added: trunk/JSTests/stress/global.js (0 => 210052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JSTests/stress/global.js         (rev 0)
+++ trunk/JSTests/stress/global.js        2016-12-21 04:04:50 UTC (rev 210052)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+// This file tests the global property on the global object.
+
+let g = new Function("return this")();
+
+if (g !== global)
+ throw new Error("global returned the wrong value");
+
+for (name in g) {
+ if (name === "global")
+ throw new Error("global should not be enumerable")
+}
+
+
+global = 5;
+if (global !== 5)
+ throw new Error("global should be assignable");
+
+delete global;
+if ("global" in g)
+ throw new Error("global should be configurable");
</ins></span></pre></div>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (210051 => 210052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-12-21 02:29:21 UTC (rev 210051)
+++ trunk/LayoutTests/ChangeLog        2016-12-21 04:04:50 UTC (rev 210052)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2016-12-20 Keith Miller <keith_miller@apple.com>
+
+ Add support for global
+ https://bugs.webkit.org/show_bug.cgi?id=165171
+
+ Reviewed by Filip Pizlo.
+
+ Fix getOwnPropertyDescriptor test.
+
+ * js/resources/getOwnPropertyDescriptor.js:
+
</ins><span class="cx"> 2016-12-20 Ryan Haddad <ryanhaddad@apple.com>
</span><span class="cx">
</span><span class="cx"> Rebaseline js/dom/global-constructors-attributes.html for mac-wk1.
</span></span></pre></div>
<a id="trunkLayoutTestsjsdomgetOwnPropertyDescriptorexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/getOwnPropertyDescriptor-expected.txt (210051 => 210052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/getOwnPropertyDescriptor-expected.txt        2016-12-21 02:29:21 UTC (rev 210051)
+++ trunk/LayoutTests/js/dom/getOwnPropertyDescriptor-expected.txt        2016-12-21 04:04:50 UTC (rev 210052)
</span><span class="lines">@@ -94,42 +94,42 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(Math.sin, 'name').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(Math.sin, 'name').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(Math.sin, 'name').configurable is true
</span><del>-PASS Object.getOwnPropertyDescriptor(global, 'global').value is global
-PASS Object.getOwnPropertyDescriptor(global, 'global').hasOwnProperty('get') is false
-PASS Object.getOwnPropertyDescriptor(global, 'global').hasOwnProperty('set') is false
-PASS Object.getOwnPropertyDescriptor(global, 'global').enumerable is true
-PASS Object.getOwnPropertyDescriptor(global, 'global').configurable is false
-PASS Object.getOwnPropertyDescriptor(global, 'undefined').value is undefined
-PASS Object.getOwnPropertyDescriptor(global, 'undefined').hasOwnProperty('get') is false
-PASS Object.getOwnPropertyDescriptor(global, 'undefined').hasOwnProperty('set') is false
-PASS Object.getOwnPropertyDescriptor(global, 'undefined').enumerable is false
-PASS Object.getOwnPropertyDescriptor(global, 'undefined').configurable is false
-PASS Object.getOwnPropertyDescriptor(global, 'NaN').value is NaN
-PASS Object.getOwnPropertyDescriptor(global, 'NaN').hasOwnProperty('get') is false
-PASS Object.getOwnPropertyDescriptor(global, 'NaN').hasOwnProperty('set') is false
-PASS Object.getOwnPropertyDescriptor(global, 'NaN').enumerable is false
-PASS Object.getOwnPropertyDescriptor(global, 'NaN').configurable is false
-PASS Object.getOwnPropertyDescriptor(global, 'Infinity').value is Infinity
-PASS Object.getOwnPropertyDescriptor(global, 'Infinity').hasOwnProperty('get') is false
-PASS Object.getOwnPropertyDescriptor(global, 'Infinity').hasOwnProperty('set') is false
-PASS Object.getOwnPropertyDescriptor(global, 'Infinity').enumerable is false
-PASS Object.getOwnPropertyDescriptor(global, 'Infinity').configurable is false
-PASS Object.getOwnPropertyDescriptor(global, 'window').get is globalWindowGetter
-PASS Object.getOwnPropertyDescriptor(global, 'window').set is undefined
-PASS Object.getOwnPropertyDescriptor(global, 'window').hasOwnProperty('value') is false
-PASS Object.getOwnPropertyDescriptor(global, 'window').hasOwnProperty('writable') is false
-PASS Object.getOwnPropertyDescriptor(global, 'window').enumerable is true
-PASS Object.getOwnPropertyDescriptor(global, 'window').configurable is false
-PASS Object.getOwnPropertyDescriptor(global, 'XMLHttpRequest').value is XMLHttpRequest
-PASS Object.getOwnPropertyDescriptor(global, 'XMLHttpRequest').hasOwnProperty('get') is false
-PASS Object.getOwnPropertyDescriptor(global, 'XMLHttpRequest').hasOwnProperty('set') is false
-PASS Object.getOwnPropertyDescriptor(global, 'XMLHttpRequest').enumerable is false
-PASS Object.getOwnPropertyDescriptor(global, 'XMLHttpRequest').configurable is true
-PASS Object.getOwnPropertyDescriptor(global, 0).value is global[0]
-PASS Object.getOwnPropertyDescriptor(global, 0).hasOwnProperty('get') is false
-PASS Object.getOwnPropertyDescriptor(global, 0).hasOwnProperty('set') is false
-PASS Object.getOwnPropertyDescriptor(global, 0).enumerable is false
-PASS Object.getOwnPropertyDescriptor(global, 0).configurable is false
</del><ins>+PASS Object.getOwnPropertyDescriptor(globalObject, 'globalObject').value is globalObject
+PASS Object.getOwnPropertyDescriptor(globalObject, 'globalObject').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(globalObject, 'globalObject').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(globalObject, 'globalObject').enumerable is true
+PASS Object.getOwnPropertyDescriptor(globalObject, 'globalObject').configurable is false
+PASS Object.getOwnPropertyDescriptor(globalObject, 'undefined').value is undefined
+PASS Object.getOwnPropertyDescriptor(globalObject, 'undefined').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(globalObject, 'undefined').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(globalObject, 'undefined').enumerable is false
+PASS Object.getOwnPropertyDescriptor(globalObject, 'undefined').configurable is false
+PASS Object.getOwnPropertyDescriptor(globalObject, 'NaN').value is NaN
+PASS Object.getOwnPropertyDescriptor(globalObject, 'NaN').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(globalObject, 'NaN').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(globalObject, 'NaN').enumerable is false
+PASS Object.getOwnPropertyDescriptor(globalObject, 'NaN').configurable is false
+PASS Object.getOwnPropertyDescriptor(globalObject, 'Infinity').value is Infinity
+PASS Object.getOwnPropertyDescriptor(globalObject, 'Infinity').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(globalObject, 'Infinity').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(globalObject, 'Infinity').enumerable is false
+PASS Object.getOwnPropertyDescriptor(globalObject, 'Infinity').configurable is false
+PASS Object.getOwnPropertyDescriptor(globalObject, 'window').get is globalWindowGetter
+PASS Object.getOwnPropertyDescriptor(globalObject, 'window').set is undefined
+PASS Object.getOwnPropertyDescriptor(globalObject, 'window').hasOwnProperty('value') is false
+PASS Object.getOwnPropertyDescriptor(globalObject, 'window').hasOwnProperty('writable') is false
+PASS Object.getOwnPropertyDescriptor(globalObject, 'window').enumerable is true
+PASS Object.getOwnPropertyDescriptor(globalObject, 'window').configurable is false
+PASS Object.getOwnPropertyDescriptor(globalObject, 'XMLHttpRequest').value is XMLHttpRequest
+PASS Object.getOwnPropertyDescriptor(globalObject, 'XMLHttpRequest').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(globalObject, 'XMLHttpRequest').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(globalObject, 'XMLHttpRequest').enumerable is false
+PASS Object.getOwnPropertyDescriptor(globalObject, 'XMLHttpRequest').configurable is true
+PASS Object.getOwnPropertyDescriptor(globalObject, 0).value is globalObject[0]
+PASS Object.getOwnPropertyDescriptor(globalObject, 0).hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(globalObject, 0).hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(globalObject, 0).enumerable is false
+PASS Object.getOwnPropertyDescriptor(globalObject, 0).configurable is false
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(document.getElementsByTagName('div'), 0).value is document.getElementsByTagName('div')[0]
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(document.getElementsByTagName('div'), 0).hasOwnProperty('get') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(document.getElementsByTagName('div'), 0).hasOwnProperty('set') is false
</span></span></pre></div>
<a id="trunkLayoutTestsjsresourcesgetOwnPropertyDescriptorjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/resources/getOwnPropertyDescriptor.js (210051 => 210052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/resources/getOwnPropertyDescriptor.js        2016-12-21 02:29:21 UTC (rev 210051)
+++ trunk/LayoutTests/js/resources/getOwnPropertyDescriptor.js        2016-12-21 04:04:50 UTC (rev 210052)
</span><span class="lines">@@ -36,15 +36,15 @@
</span><span class="cx"> descriptorShouldBe("function(){}", "'length'", {writable: false, enumerable: false, configurable: true, value:0});
</span><span class="cx"> descriptorShouldBe("Math.sin", "'length'", {writable: false, enumerable: false, configurable: true, value:1});
</span><span class="cx"> descriptorShouldBe("Math.sin", "'name'", {writable: false, enumerable: false, configurable: true, value:"'sin'"});
</span><del>-var global = this;
-descriptorShouldBe("global", "'global'", {writable: true, enumerable: true, configurable: false, value:"global"});
-descriptorShouldBe("global", "'undefined'", {writable: false, enumerable: false, configurable: false, value:"undefined"});
-descriptorShouldBe("global", "'NaN'", {writable: false, enumerable: false, configurable: false, value:"NaN"});
-descriptorShouldBe("global", "'Infinity'", {writable: false, enumerable: false, configurable: false, value:"Infinity"});
-var globalWindowGetter = Object.getOwnPropertyDescriptor(global, 'window').get;
-descriptorShouldBe("global", "'window'", {get: 'globalWindowGetter', set: undefined, enumerable: true, configurable: false});
-descriptorShouldBe("global", "'XMLHttpRequest'", {writable: true, enumerable: false, configurable: true, value:"XMLHttpRequest"});
-descriptorShouldBe("global", "0", {writable: true, enumerable: false, configurable: false, value:"global[0]"});
</del><ins>+var globalObject = this;
+descriptorShouldBe("globalObject", "'globalObject'", {writable: true, enumerable: true, configurable: false, value:"globalObject"});
+descriptorShouldBe("globalObject", "'undefined'", {writable: false, enumerable: false, configurable: false, value:"undefined"});
+descriptorShouldBe("globalObject", "'NaN'", {writable: false, enumerable: false, configurable: false, value:"NaN"});
+descriptorShouldBe("globalObject", "'Infinity'", {writable: false, enumerable: false, configurable: false, value:"Infinity"});
+var globalWindowGetter = Object.getOwnPropertyDescriptor(globalObject, 'window').get;
+descriptorShouldBe("globalObject", "'window'", {get: 'globalWindowGetter', set: undefined, enumerable: true, configurable: false});
+descriptorShouldBe("globalObject", "'XMLHttpRequest'", {writable: true, enumerable: false, configurable: true, value:"XMLHttpRequest"});
+descriptorShouldBe("globalObject", "0", {writable: true, enumerable: false, configurable: false, value:"globalObject[0]"});
</ins><span class="cx"> descriptorShouldBe("document.getElementsByTagName('div')", "0", {writable: false, enumerable: true, configurable: true, value:"document.getElementsByTagName('div')[0]"});
</span><span class="cx"> descriptorShouldBe("document.getElementsByClassName('pass')", "0", {writable: false, enumerable: true, configurable: true, value:"document.getElementsByClassName('pass')[0]"});
</span><span class="cx"> var canvas = document.createElement("canvas");
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (210051 => 210052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-12-21 02:29:21 UTC (rev 210051)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-12-21 04:04:50 UTC (rev 210052)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2016-12-20 Keith Miller <keith_miller@apple.com>
+
+ Add support for global
+ https://bugs.webkit.org/show_bug.cgi?id=165171
+
+ Reviewed by Filip Pizlo.
+
+ This patch adds spport for the global property on the global object.
+ The global property spec is in stage three and is quite simple.
+ For reference: http://tc39.github.io/proposal-global/
+
+ * runtime/JSGlobalObject.cpp:
+
</ins><span class="cx"> 2016-12-20 Saam Barati <sbarati@apple.com>
</span><span class="cx">
</span><span class="cx"> WebAssembly: We should compile wasm functions in parallel
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGlobalObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp (210051 => 210052)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp        2016-12-21 02:29:21 UTC (rev 210051)
+++ trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp        2016-12-21 04:04:50 UTC (rev 210052)
</span><span class="lines">@@ -271,6 +271,7 @@
</span><span class="cx"> encodeURI globalFuncEncodeURI DontEnum|Function 1
</span><span class="cx"> encodeURIComponent globalFuncEncodeURIComponent DontEnum|Function 1
</span><span class="cx"> EvalError JSGlobalObject::m_evalErrorConstructor DontEnum|CellProperty
</span><ins>+ global JSGlobalObject::m_globalThis DontEnum|CellProperty
</ins><span class="cx"> ReferenceError JSGlobalObject::m_referenceErrorConstructor DontEnum|CellProperty
</span><span class="cx"> SyntaxError JSGlobalObject::m_syntaxErrorConstructor DontEnum|CellProperty
</span><span class="cx"> URIError JSGlobalObject::m_URIErrorConstructor DontEnum|CellProperty
</span></span></pre>
</div>
</div>
</body>
</html>