<!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>[201702] 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/201702">201702</a></dd>
<dt>Author</dt> <dd>barraclough@apple.com</dd>
<dt>Date</dt> <dd>2016-06-05 17:59:33 -0700 (Sun, 05 Jun 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Deprecate remaining uses of Lookup getStatic*, use HasStaticPropertyTable instead.
https://bugs.webkit.org/show_bug.cgi?id=158178

Reviewed by Darin Adler.

As of bug #158059 most JSC static table property access no longer requires getOwnPropertySlot to be
overridden. Port remaining calls to the getStatic* functions in Lookup.h over to the new mechanism.

Source/JavaScriptCore:

Part 1: Switch JSGlobalObject &amp; JSDOMWindow to use HasStaticPropertyTable.

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::getOwnPropertySlot):
    - Override is still required for symbol table,
      but regular property access is now via Base::getOwnPropertySlot.
* runtime/JSGlobalObject.h:
    - add HasStaticPropertyTable to structureFlags.

Source/WebCore:

Part 1: Switch JSGlobalObject &amp; JSDOMWindow to use HasStaticPropertyTable.

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::getOwnPropertySlot):
    - getStaticPropertySlot -&gt; Base::getOwnPropertySlot.
* bindings/js/JSPluginElementFunctions.h:
(WebCore::pluginElementCustomGetOwnPropertySlot):
    - Switch call from getStaticValueSlot to Type::getOwnPropertySlot.
      For any element where Type::hasStaticPropertyTable is true the HasStaticPropertyTable
      structure flag will also be set, so Type::getOwnPropertySlot will do the same thing.
* bindings/scripts/CodeGeneratorJS.pm:
(PrototypeHasStaticPropertyTable):
    - Was PrototypeOverridesGetOwnPropertySlot; prototypes now never need override getOwnPropertySlot so renaming accordingly.
(GenerateImplementation):
    - Removed generation of getOwnPropertySlot body for DOMGlobalObjects.
(GeneratePrototypeDeclaration):
    - For DOMGlobalObjects, set HasStaticPropertyTable instead of OverridesGetOwnPropertySlot &amp; removed getOwnPropertySlot declaration.
(PrototypeOverridesGetOwnPropertySlot): Deleted.
    Renamed to PrototypeHasStaticPropertyTable.
* bindings/scripts/test/JS/JSTestGlobalObject.cpp:
* bindings/scripts/test/JS/JSTestGlobalObject.h:
    - Updating bindings test results.

LayoutTests:

Switch JSGlobalObject &amp; WebCore DOM instance bindings to use HasStaticPropertyTable.

* fast/dom/unforgeable-attributes-expected.txt:
    - Progression, similar to the getOwnPropertyDescriptor test below. Previously we
      were reporting an error with a message appropriate to a disallowed value-&gt;value
      redefinition. This is actually a disallowed accessor-&gt;value reconfiguration, now
      reporting the correct error message for this.
* http/tests/security/cross-origin-window-property-access-expected.txt:
    - Newly reporting previously missing CORS error.
* js/dom/getOwnPropertyDescriptor-expected.txt:
* js/resources/getOwnPropertyDescriptor.js:
    - This test was previously incorrect - was expecting window.window property to
      reflect as a value decriptor. This now reflect as an accesor descriptor. New
      behaviour is correct per spec &amp; matches Firefox.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastdomunforgeableattributesexpectedtxt">trunk/LayoutTests/fast/dom/unforgeable-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritycrossoriginwindowpropertyaccessexpectedtxt">trunk/LayoutTests/http/tests/security/cross-origin-window-property-access-expected.txt</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>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSGlobalObjecth">trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMWindowCustomcpp">trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestGlobalObjectcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestGlobalObjecth">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (201701 => 201702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-06-05 19:48:26 UTC (rev 201701)
+++ trunk/LayoutTests/ChangeLog        2016-06-06 00:59:33 UTC (rev 201702)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2016-06-05  Gavin &amp; Ellie Barraclough  &lt;barraclough@apple.com&gt;
+
+        Deprecate remaining uses of Lookup getStatic*, use HasStaticPropertyTable instead.
+        https://bugs.webkit.org/show_bug.cgi?id=158178
+
+        Reviewed by Darin Adler.
+
+        As of bug #158059 most JSC static table property access no longer requires getOwnPropertySlot to be
+        overridden. Port remaining calls to the getStatic* functions in Lookup.h over to the new mechanism.
+
+        Switch JSGlobalObject &amp; WebCore DOM instance bindings to use HasStaticPropertyTable.
+
+        * fast/dom/unforgeable-attributes-expected.txt:
+            - Progression, similar to the getOwnPropertyDescriptor test below. Previously we
+              were reporting an error with a message appropriate to a disallowed value-&gt;value
+              redefinition. This is actually a disallowed accessor-&gt;value reconfiguration, now
+              reporting the correct error message for this.
+        * http/tests/security/cross-origin-window-property-access-expected.txt:
+            - Newly reporting previously missing CORS error.
+        * js/dom/getOwnPropertyDescriptor-expected.txt:
+        * js/resources/getOwnPropertyDescriptor.js:
+            - This test was previously incorrect - was expecting window.window property to
+              reflect as a value decriptor. This now reflect as an accesor descriptor. New
+              behaviour is correct per spec &amp; matches Firefox.
+
</ins><span class="cx"> 2016-06-05  Antti Koivisto  &lt;antti@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         TextIterator should ignore non-visible frames in findPlainText
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomunforgeableattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/unforgeable-attributes-expected.txt (201701 => 201702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/unforgeable-attributes-expected.txt        2016-06-05 19:48:26 UTC (rev 201701)
+++ trunk/LayoutTests/fast/dom/unforgeable-attributes-expected.txt        2016-06-06 00:59:33 UTC (rev 201702)
</span><span class="lines">@@ -18,13 +18,13 @@
</span><span class="cx"> Window.window
</span><span class="cx"> PASS testObject.hasOwnProperty(testPropertyName) is true
</span><span class="cx"> PASS testObject.__proto__.hasOwnProperty(testPropertyName) is false
</span><del>-PASS Object.defineProperty(testObject, testPropertyName, { value: 'test' }) threw exception TypeError: Attempting to change value of a readonly property..
</del><ins>+PASS Object.defineProperty(testObject, testPropertyName, { value: 'test' }) threw exception TypeError: Attempting to change access mechanism for an unconfigurable property..
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(testObject, testPropertyName).configurable is false
</span><span class="cx"> 
</span><span class="cx"> Window.document
</span><span class="cx"> PASS testObject.hasOwnProperty(testPropertyName) is true
</span><span class="cx"> PASS testObject.__proto__.hasOwnProperty(testPropertyName) is false
</span><del>-PASS Object.defineProperty(testObject, testPropertyName, { value: 'test' }) threw exception TypeError: Attempting to change value of a readonly property..
</del><ins>+PASS Object.defineProperty(testObject, testPropertyName, { value: 'test' }) threw exception TypeError: Attempting to change access mechanism for an unconfigurable property..
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(testObject, testPropertyName).configurable is false
</span><span class="cx"> 
</span><span class="cx"> Window.location
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritycrossoriginwindowpropertyaccessexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/security/cross-origin-window-property-access-expected.txt (201701 => 201702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/cross-origin-window-property-access-expected.txt        2016-06-05 19:48:26 UTC (rev 201701)
+++ trunk/LayoutTests/http/tests/security/cross-origin-window-property-access-expected.txt        2016-06-06 00:59:33 UTC (rev 201702)
</span><span class="lines">@@ -3,6 +3,7 @@
</span><span class="cx"> CONSOLE MESSAGE: line 1: Blocked a frame with origin &quot;http://127.0.0.1:8000&quot; from accessing a frame with origin &quot;http://localhost:8000&quot;. Protocols, domains, and ports must match.
</span><span class="cx"> CONSOLE MESSAGE: line 1: Blocked a frame with origin &quot;http://127.0.0.1:8000&quot; from accessing a frame with origin &quot;http://localhost:8000&quot;. Protocols, domains, and ports must match.
</span><span class="cx"> CONSOLE MESSAGE: line 1: Blocked a frame with origin &quot;http://127.0.0.1:8000&quot; from accessing a frame with origin &quot;http://localhost:8000&quot;. Protocols, domains, and ports must match.
</span><ins>+CONSOLE MESSAGE: line 1: Blocked a frame with origin &quot;http://127.0.0.1:8000&quot; from accessing a frame with origin &quot;http://localhost:8000&quot;. Protocols, domains, and ports must match.
</ins><span class="cx"> CONSOLE MESSAGE: line 15: Blocked a frame with origin &quot;http://127.0.0.1:8000&quot; from accessing a frame with origin &quot;http://localhost:8000&quot;. Protocols, domains, and ports must match.
</span><span class="cx"> CONSOLE MESSAGE: line 15: Blocked a frame with origin &quot;http://127.0.0.1:8000&quot; from accessing a frame with origin &quot;http://localhost:8000&quot;. Protocols, domains, and ports must match.
</span><span class="cx"> Tests that using another window's property getter does not bypass cross-origin checks.
</span><span class="lines">@@ -10,7 +11,7 @@
</span><span class="cx"> On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-PASS Object.getOwnPropertyDescriptor(window, &quot;document&quot;).get.call(crossOriginWindow) threw exception TypeError: undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(window, &quot;document&quot;).get.call').
</del><ins>+PASS Object.getOwnPropertyDescriptor(window, &quot;document&quot;).get.call(crossOriginWindow) returned undefined.
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(window, &quot;name&quot;).get.call(crossOriginWindow) returned undefined.
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(window, &quot;menubar&quot;).get.call(crossOriginWindow) returned undefined.
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(window, &quot;scrollbars&quot;).get.call(crossOriginWindow) returned undefined.
</span></span></pre></div>
<a id="trunkLayoutTestsjsdomgetOwnPropertyDescriptorexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/getOwnPropertyDescriptor-expected.txt (201701 => 201702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/getOwnPropertyDescriptor-expected.txt        2016-06-05 19:48:26 UTC (rev 201701)
+++ trunk/LayoutTests/js/dom/getOwnPropertyDescriptor-expected.txt        2016-06-06 00:59:33 UTC (rev 201702)
</span><span class="lines">@@ -114,9 +114,10 @@
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'Infinity').hasOwnProperty('set') is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'Infinity').enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'Infinity').configurable is false
</span><del>-PASS Object.getOwnPropertyDescriptor(global, 'window').value is global
-PASS Object.getOwnPropertyDescriptor(global, 'window').hasOwnProperty('get') is false
-PASS Object.getOwnPropertyDescriptor(global, 'window').hasOwnProperty('set') is false
</del><ins>+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
</ins><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'window').enumerable is true
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'window').configurable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(global, 'XMLHttpRequest').value is XMLHttpRequest
</span></span></pre></div>
<a id="trunkLayoutTestsjsresourcesgetOwnPropertyDescriptorjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/resources/getOwnPropertyDescriptor.js (201701 => 201702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/resources/getOwnPropertyDescriptor.js        2016-06-05 19:48:26 UTC (rev 201701)
+++ trunk/LayoutTests/js/resources/getOwnPropertyDescriptor.js        2016-06-06 00:59:33 UTC (rev 201702)
</span><span class="lines">@@ -41,7 +41,8 @@
</span><span class="cx"> descriptorShouldBe(&quot;global&quot;, &quot;'undefined'&quot;, {writable: false, enumerable: false, configurable: false, value:&quot;undefined&quot;});
</span><span class="cx"> descriptorShouldBe(&quot;global&quot;, &quot;'NaN'&quot;, {writable: false, enumerable: false, configurable: false, value:&quot;NaN&quot;});
</span><span class="cx"> descriptorShouldBe(&quot;global&quot;, &quot;'Infinity'&quot;, {writable: false, enumerable: false, configurable: false, value:&quot;Infinity&quot;});
</span><del>-descriptorShouldBe(&quot;global&quot;, &quot;'window'&quot;, {writable: false, enumerable: true, configurable: false, value:&quot;global&quot;});
</del><ins>+var globalWindowGetter = Object.getOwnPropertyDescriptor(global, 'window').get;
+descriptorShouldBe(&quot;global&quot;, &quot;'window'&quot;, {get: 'globalWindowGetter', set: undefined, enumerable: true, configurable: false});
</ins><span class="cx"> descriptorShouldBe(&quot;global&quot;, &quot;'XMLHttpRequest'&quot;, {writable: true, enumerable: false, configurable: true, value:&quot;XMLHttpRequest&quot;});
</span><span class="cx"> descriptorShouldBe(&quot;global&quot;, &quot;0&quot;, {writable: true, enumerable: false, configurable: false, value:&quot;global[0]&quot;});
</span><span class="cx"> descriptorShouldBe(&quot;document.getElementsByTagName('div')&quot;, &quot;0&quot;, {writable: false, enumerable: true, configurable: false, value:&quot;document.getElementsByTagName('div')[0]&quot;});
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (201701 => 201702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-06-05 19:48:26 UTC (rev 201701)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-06-06 00:59:33 UTC (rev 201702)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2016-06-03  Gavin &amp; Ellie Barraclough  &lt;barraclough@apple.com&gt;
+
+        Deprecate remaining uses of Lookup getStatic*, use HasStaticPropertyTable instead.
+        https://bugs.webkit.org/show_bug.cgi?id=158178
+
+        Reviewed by Darin Adler.
+
+        As of bug #158059 most JSC static table property access no longer requires getOwnPropertySlot to be
+        overridden. Port remaining calls to the getStatic* functions in Lookup.h over to the new mechanism.
+
+        Part 1: Switch JSGlobalObject &amp; JSDOMWindow to use HasStaticPropertyTable.
+
+        * runtime/JSGlobalObject.cpp:
+        (JSC::JSGlobalObject::getOwnPropertySlot):
+            - Override is still required for symbol table,
+              but regular property access is now via Base::getOwnPropertySlot.
+        * runtime/JSGlobalObject.h:
+            - add HasStaticPropertyTable to structureFlags.
+
</ins><span class="cx"> 2016-06-03  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Eager FTL failure for strict comparison of NaN with number check
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGlobalObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp (201701 => 201702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp        2016-06-05 19:48:26 UTC (rev 201701)
+++ trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp        2016-06-06 00:59:33 UTC (rev 201702)
</span><span class="lines">@@ -1178,10 +1178,9 @@
</span><span class="cx"> 
</span><span class="cx"> bool JSGlobalObject::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot&amp; slot)
</span><span class="cx"> {
</span><del>-    JSGlobalObject* thisObject = jsCast&lt;JSGlobalObject*&gt;(object);
-    if (getStaticPropertySlot&lt;JSGlobalObject, Base&gt;(exec, globalObjectTable, thisObject, propertyName, slot))
</del><ins>+    if (Base::getOwnPropertySlot(object, exec, propertyName, slot))
</ins><span class="cx">         return true;
</span><del>-    return symbolTableGet(thisObject, propertyName, slot);
</del><ins>+    return symbolTableGet(jsCast&lt;JSGlobalObject*&gt;(object), propertyName, slot);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void JSGlobalObject::clearRareData(JSCell* cell)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGlobalObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h (201701 => 201702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h        2016-06-05 19:48:26 UTC (rev 201701)
+++ trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h        2016-06-06 00:59:33 UTC (rev 201702)
</span><span class="lines">@@ -387,7 +387,7 @@
</span><span class="cx">         
</span><span class="cx"> public:
</span><span class="cx">     typedef JSSegmentedVariableObject Base;
</span><del>-    static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetPropertyNames | OverridesToThis;
</del><ins>+    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable | OverridesGetOwnPropertySlot | OverridesGetPropertyNames | OverridesToThis;
</ins><span class="cx"> 
</span><span class="cx">     static JSGlobalObject* create(VM&amp; vm, Structure* structure)
</span><span class="cx">     {
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (201701 => 201702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-06-05 19:48:26 UTC (rev 201701)
+++ trunk/Source/WebCore/ChangeLog        2016-06-06 00:59:33 UTC (rev 201702)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2016-06-03  Gavin &amp; Ellie Barraclough  &lt;barraclough@apple.com&gt;
+
+        Deprecate remaining uses of Lookup getStatic*, use HasStaticPropertyTable instead.
+        https://bugs.webkit.org/show_bug.cgi?id=158178
+
+        Reviewed by Darin Adler.
+
+        As of bug #158059 most JSC static table property access no longer requires getOwnPropertySlot to be
+        overridden. Port remaining calls to the getStatic* functions in Lookup.h over to the new mechanism.
+
+        Part 1: Switch JSGlobalObject &amp; JSDOMWindow to use HasStaticPropertyTable.
+
+        * bindings/js/JSDOMWindowCustom.cpp:
+        (WebCore::JSDOMWindow::getOwnPropertySlot):
+            - getStaticPropertySlot -&gt; Base::getOwnPropertySlot.
+        * bindings/js/JSPluginElementFunctions.h:
+        (WebCore::pluginElementCustomGetOwnPropertySlot):
+            - Switch call from getStaticValueSlot to Type::getOwnPropertySlot.
+              For any element where Type::hasStaticPropertyTable is true the HasStaticPropertyTable
+              structure flag will also be set, so Type::getOwnPropertySlot will do the same thing.
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (PrototypeHasStaticPropertyTable):
+            - Was PrototypeOverridesGetOwnPropertySlot; prototypes now never need override getOwnPropertySlot so renaming accordingly.
+        (GenerateImplementation):
+            - Removed generation of getOwnPropertySlot body for DOMGlobalObjects.
+        (GeneratePrototypeDeclaration):
+            - For DOMGlobalObjects, set HasStaticPropertyTable instead of OverridesGetOwnPropertySlot &amp; removed getOwnPropertySlot declaration.
+        (PrototypeOverridesGetOwnPropertySlot): Deleted.
+            Renamed to PrototypeHasStaticPropertyTable.
+        * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
+        * bindings/scripts/test/JS/JSTestGlobalObject.h:
+            - Updating bindings test results.
+
</ins><span class="cx"> 2016-06-05  Antti Koivisto  &lt;antti@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Find on page finds too many matches
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMWindowCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp (201701 => 201702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp        2016-06-05 19:48:26 UTC (rev 201701)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp        2016-06-06 00:59:33 UTC (rev 201702)
</span><span class="lines">@@ -236,7 +236,7 @@
</span><span class="cx"> 
</span><span class="cx">     // (2) Regular own properties.
</span><span class="cx">     PropertySlot slotCopy = slot;
</span><del>-    if (getStaticPropertySlot&lt;JSDOMWindow, Base&gt;(exec, *JSDOMWindow::info()-&gt;staticPropHashTable, thisObject, propertyName, slot)) {
</del><ins>+    if (Base::getOwnPropertySlot(thisObject, exec, propertyName, slot)) {
</ins><span class="cx">         // Detect when we're getting the property 'showModalDialog', this is disabled, and has its original value.
</span><span class="cx">         bool isShowModalDialogAndShouldHide = propertyName == exec-&gt;propertyNames().showModalDialog
</span><span class="cx">             &amp;&amp; !DOMWindow::canShowModalDialog(frame)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (201701 => 201702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-06-05 19:48:26 UTC (rev 201701)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-06-06 00:59:33 UTC (rev 201702)
</span><span class="lines">@@ -702,7 +702,7 @@
</span><span class="cx">     return $numInstanceProperties &gt; 0 || $hasComplexGetter;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub PrototypeOverridesGetOwnPropertySlot
</del><ins>+sub PrototypeHasStaticPropertyTable
</ins><span class="cx"> {
</span><span class="cx">     my $interface = shift;
</span><span class="cx">     my $numPrototypeProperties = PrototypePropertyCount($interface);
</span><span class="lines">@@ -2267,70 +2267,43 @@
</span><span class="cx">         push(@implContent, &quot;const ClassInfo ${className}Prototype::s_info = { \&quot;${visibleInterfaceName}Prototype\&quot;, &amp;Base::s_info, &amp;${className}PrototypeTable, CREATE_METHOD_TABLE(${className}Prototype) };\n\n&quot;);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (PrototypeOverridesGetOwnPropertySlot($interface)) {
-        my $prototypePropertyCount = PrototypePropertyCount($interface);
-        my $prototypeFunctionCount = PrototypeFunctionCount($interface);
-        my $prototypeAttributeCount = $prototypePropertyCount - $prototypeFunctionCount;
-        if (IsDOMGlobalObject($interface)) {
-            push(@implContent, &quot;bool ${className}Prototype::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot&amp; slot)\n&quot;);
-            push(@implContent, &quot;{\n&quot;);
-            push(@implContent, &quot;    VM&amp; vm = state-&gt;vm();\n&quot;);
-            push(@implContent, &quot;    UNUSED_PARAM(vm);\n&quot;);
-            push(@implContent, &quot;    auto* thisObject = jsCast&lt;${className}Prototype*&gt;(object);\n&quot;);
</del><ins>+    if (PrototypeHasStaticPropertyTable($interface) &amp;&amp; !IsDOMGlobalObject($interface)) {
+        push(@implContent, &quot;void ${className}Prototype::finishCreation(VM&amp; vm)\n&quot;);
+        push(@implContent, &quot;{\n&quot;);
+        push(@implContent, &quot;    Base::finishCreation(vm);\n&quot;);
+        push(@implContent, &quot;    reifyStaticProperties(vm, ${className}PrototypeTableValues, *this);\n&quot;);
</ins><span class="cx"> 
</span><del>-            if ($numConstants eq 0 &amp;&amp; $prototypePropertyCount eq 0) {
-                push(@implContent, &quot;    return Base::getOwnPropertySlot(thisObject, state, propertyName, slot);\n&quot;);        
-            } elsif ($numConstants eq 0 &amp;&amp; $prototypeAttributeCount eq 0) {
-                push(@implContent, &quot;    return getStaticFunctionSlot&lt;JSObject&gt;(state, ${className}PrototypeTable, thisObject, propertyName, slot);\n&quot;);
-            } elsif ($prototypePropertyCount eq 0) {
-                push(@implContent, &quot;    return getStaticValueSlot&lt;${className}Prototype, JSObject&gt;(state, ${className}PrototypeTable, thisObject, propertyName, slot);\n&quot;);
-            } else {
-                push(@implContent, &quot;    return getStaticPropertySlot&lt;${className}Prototype, JSObject&gt;(state, ${className}PrototypeTable, thisObject, propertyName, slot);\n&quot;);
-            }
-            push(@implContent, &quot;}\n\n&quot;);
-        } elsif ($numConstants &gt; 0 || $numPrototypeProperties &gt; 0) {
-            push(@implContent, &quot;void ${className}Prototype::finishCreation(VM&amp; vm)\n&quot;);
-            push(@implContent, &quot;{\n&quot;);
-            push(@implContent, &quot;    Base::finishCreation(vm);\n&quot;);
-            push(@implContent, &quot;    reifyStaticProperties(vm, ${className}PrototypeTableValues, *this);\n&quot;);
</del><ins>+        my @runtimeEnabledProperties = @runtimeEnabledFunctions;
+        push(@runtimeEnabledProperties, @runtimeEnabledAttributes);
+        foreach my $functionOrAttribute (@runtimeEnabledProperties) {
+            my $signature = $functionOrAttribute-&gt;signature;
+            my $conditionalString = $codeGenerator-&gt;GenerateConditionalString($signature);
+            push(@implContent, &quot;#if ${conditionalString}\n&quot;) if $conditionalString;
+            AddToImplIncludes(&quot;RuntimeEnabledFeatures.h&quot;);
+            my $enable_function = GetRuntimeEnableFunctionName($signature);
+            my $name = $signature-&gt;name;
+            push(@implContent, &quot;    if (!${enable_function}()) {\n&quot;);
+            push(@implContent, &quot;        Identifier propertyName = Identifier::fromString(&amp;vm, reinterpret_cast&lt;const LChar*&gt;(\&quot;$name\&quot;), strlen(\&quot;$name\&quot;));\n&quot;);
+            push(@implContent, &quot;        removeDirect(vm, propertyName);\n&quot;);
+            push(@implContent, &quot;    }\n&quot;);
+            push(@implContent, &quot;#endif\n&quot;) if $conditionalString;
+        }
</ins><span class="cx"> 
</span><del>-            my @runtimeEnabledProperties = @runtimeEnabledFunctions;
-            push(@runtimeEnabledProperties, @runtimeEnabledAttributes);
-            foreach my $functionOrAttribute (@runtimeEnabledProperties) {
-                my $signature = $functionOrAttribute-&gt;signature;
-                my $conditionalString = $codeGenerator-&gt;GenerateConditionalString($signature);
-                push(@implContent, &quot;#if ${conditionalString}\n&quot;) if $conditionalString;
-                AddToImplIncludes(&quot;RuntimeEnabledFeatures.h&quot;);
-                my $enable_function = GetRuntimeEnableFunctionName($signature);
-                my $name = $signature-&gt;name;
-                push(@implContent, &quot;    if (!${enable_function}()) {\n&quot;);
-                push(@implContent, &quot;        Identifier propertyName = Identifier::fromString(&amp;vm, reinterpret_cast&lt;const LChar*&gt;(\&quot;$name\&quot;), strlen(\&quot;$name\&quot;));\n&quot;);
-                push(@implContent, &quot;        removeDirect(vm, propertyName);\n&quot;);
-                push(@implContent, &quot;    }\n&quot;);
-                push(@implContent, &quot;#endif\n&quot;) if $conditionalString;
-            }
</del><ins>+        my $firstPrivateFunction = 1;
+        foreach my $function (@{$interface-&gt;functions}) {
+            next unless ($function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;Private&quot;});
+            AddToImplIncludes(&quot;WebCoreJSClientData.h&quot;);
+            push(@implContent, &quot;    JSVMClientData&amp; clientData = *static_cast&lt;JSVMClientData*&gt;(vm.clientData);\n&quot;) if $firstPrivateFunction;
+            $firstPrivateFunction = 0;
+            push(@implContent, &quot;    putDirect(vm, clientData.builtinNames().&quot; . $function-&gt;signature-&gt;name . &quot;PrivateName(), JSFunction::create(vm, globalObject(), 0, String(), &quot; . GetFunctionName($interface, $className, $function) . &quot;), ReadOnly | DontEnum);\n&quot;);
+        }
</ins><span class="cx"> 
</span><del>-            my $firstPrivateFunction = 1;
-            foreach my $function (@{$interface-&gt;functions}) {
-                next unless ($function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;Private&quot;});
-                AddToImplIncludes(&quot;WebCoreJSClientData.h&quot;);
-                push(@implContent, &quot;    JSVMClientData&amp; clientData = *static_cast&lt;JSVMClientData*&gt;(vm.clientData);\n&quot;) if $firstPrivateFunction;
-                $firstPrivateFunction = 0;
-                push(@implContent, &quot;    putDirect(vm, clientData.builtinNames().&quot; . $function-&gt;signature-&gt;name . &quot;PrivateName(), JSFunction::create(vm, globalObject(), 0, String(), &quot; . GetFunctionName($interface, $className, $function) . &quot;), ReadOnly | DontEnum);\n&quot;);
-            }
-
-            if ($interface-&gt;iterable) {
-                my $functionName = GetFunctionName($interface, $className, @{$interface-&gt;iterable-&gt;functions}[0]);
-                push(@implContent, &quot;    putDirect(vm, vm.propertyNames-&gt;iteratorSymbol, JSFunction::create(vm, globalObject(), 0, ASCIILiteral(\&quot;[Symbol.Iterator]\&quot;), $functionName), ReadOnly | DontEnum);\n&quot;);
-            }
-
-            push(@implContent, &quot;}\n\n&quot;);
-        } else {
-            push(@implContent, &quot;void ${className}Prototype::finishCreation(VM&amp; vm)\n&quot;);
-            push(@implContent, &quot;{\n&quot;);
-            push(@implContent, &quot;    Base::finishCreation(vm);\n&quot;);
-            push(@implContent, &quot;}\n\n&quot;);
</del><ins>+        if ($interface-&gt;iterable) {
+            my $functionName = GetFunctionName($interface, $className, @{$interface-&gt;iterable-&gt;functions}[0]);
+            push(@implContent, &quot;    putDirect(vm, vm.propertyNames-&gt;iteratorSymbol, JSFunction::create(vm, globalObject(), 0, ASCIILiteral(\&quot;[Symbol.Iterator]\&quot;), $functionName), ReadOnly | DontEnum);\n&quot;);
</ins><span class="cx">         }
</span><ins>+
+        push(@implContent, &quot;}\n\n&quot;);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if ($interface-&gt;extendedAttributes-&gt;{&quot;JSCustomNamedGetterOnPrototype&quot;}) {
</span><span class="lines">@@ -4839,12 +4812,11 @@
</span><span class="cx">     push(@$outputArray, &quot;    {\n&quot;);
</span><span class="cx">     push(@$outputArray, &quot;    }\n&quot;);
</span><span class="cx"> 
</span><del>-    if (PrototypeOverridesGetOwnPropertySlot($interface)) {
-        push(@$outputArray, &quot;\n&quot;);
</del><ins>+    if (PrototypeHasStaticPropertyTable($interface)) {
</ins><span class="cx">         if (IsDOMGlobalObject($interface)) {
</span><del>-            push(@$outputArray, &quot;    static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&amp;);\n&quot;);
-            $structureFlags{&quot;JSC::OverridesGetOwnPropertySlot&quot;} = 1;
</del><ins>+            $structureFlags{&quot;JSC::HasStaticPropertyTable&quot;} = 1;
</ins><span class="cx">         } else {
</span><ins>+            push(@$outputArray, &quot;\n&quot;);
</ins><span class="cx">             push(@$outputArray, &quot;    void finishCreation(JSC::VM&amp;);\n&quot;);
</span><span class="cx">         }
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestGlobalObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp (201701 => 201702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp        2016-06-05 19:48:26 UTC (rev 201701)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp        2016-06-06 00:59:33 UTC (rev 201702)
</span><span class="lines">@@ -108,14 +108,6 @@
</span><span class="cx"> static const HashTable JSTestGlobalObjectPrototypeTable = { 1, 1, true, JSTestGlobalObjectPrototypeTableValues, JSTestGlobalObjectPrototypeTableIndex };
</span><span class="cx"> const ClassInfo JSTestGlobalObjectPrototype::s_info = { &quot;TestGlobalObjectPrototype&quot;, &amp;Base::s_info, &amp;JSTestGlobalObjectPrototypeTable, CREATE_METHOD_TABLE(JSTestGlobalObjectPrototype) };
</span><span class="cx"> 
</span><del>-bool JSTestGlobalObjectPrototype::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot&amp; slot)
-{
-    VM&amp; vm = state-&gt;vm();
-    UNUSED_PARAM(vm);
-    auto* thisObject = jsCast&lt;JSTestGlobalObjectPrototype*&gt;(object);
-    return getStaticPropertySlot&lt;JSTestGlobalObjectPrototype, JSObject&gt;(state, JSTestGlobalObjectPrototypeTable, thisObject, propertyName, slot);
-}
-
</del><span class="cx"> const ClassInfo JSTestGlobalObject::s_info = { &quot;TestGlobalObject&quot;, &amp;Base::s_info, &amp;JSTestGlobalObjectTable, CREATE_METHOD_TABLE(JSTestGlobalObject) };
</span><span class="cx"> 
</span><span class="cx"> JSTestGlobalObject::JSTestGlobalObject(Structure* structure, JSDOMGlobalObject&amp; globalObject, Ref&lt;TestGlobalObject&gt;&amp;&amp; impl)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestGlobalObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.h (201701 => 201702)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.h        2016-06-05 19:48:26 UTC (rev 201701)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.h        2016-06-06 00:59:33 UTC (rev 201702)
</span><span class="lines">@@ -111,10 +111,8 @@
</span><span class="cx">         : JSC::JSNonFinalObject(vm, structure)
</span><span class="cx">     {
</span><span class="cx">     }
</span><del>-
-    static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&amp;);
</del><span class="cx"> public:
</span><del>-    static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
</del><ins>+    static const unsigned StructureFlags = JSC::HasStaticPropertyTable | Base::StructureFlags;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>