<!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>[189729] releases/WebKitGTK/webkit-2.10</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/189729">189729</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2015-09-14 06:55:15 -0700 (Mon, 14 Sep 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/189184">r189184</a> - NodeFilter.SHOW_ALL has wrong value on 32-bit
https://bugs.webkit.org/show_bug.cgi?id=148602

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

NodeFilter.SHOW_ALL has wrong value on 32-bit. This is because
NodeFilter.SHOW_ALL is an unsigned long whose value is 0xFFFFFFFF but
our bindings code is casting it to an intptr_t type which is not wide
enough on 32-bit.

* create_hash_table:
Add extra curly brackets to initialize the union.

* runtime/Lookup.h:
Use a union type to store either a struct containing 2 intptr_t members
(value1 / value2) or a large constant of type unsigned long long. When
storing a constant, we only need one of the values so this allows us to
support larger constants without increasing the actual HashTableValue
size.

Source/WebCore:

NodeFilter.SHOW_ALL has wrong value on 32-bit. This is because
NodeFilter.SHOW_ALL is an unsigned long whose value is 0xFFFFFFFF but
our bindings code is casting it to an intptr_t type which is not wide
enough on 32-bit.

No new tests, already covered by fast/dom/node-filter-interface.html
which is now unskipped on Windows / 32bit.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHashTableValueArray):
Generate extra curly brackets to initialize the new union member.
Also cast to long long the constant instead of intptr_t.

* dom/NodeFilter.h:
Explicitly mark the enum underlying type to be an unsigned long
to make sure it can hold the value for SHOW_ALL on all platforms.
On Windows, it seems the default underlying type is an int for
e.g.

LayoutTests:

Unskip tests that are now passing on Windows / 32bit.

* platform/win/TestExpectations:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit210LayoutTestsChangeLog">releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceJavaScriptCoreChangeLog">releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceJavaScriptCorecreate_hash_table">releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/create_hash_table</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceJavaScriptCoreruntimeLookuph">releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/runtime/Lookup.h</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCoreChangeLog">releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCorebindingsscriptsCodeGeneratorJSpm">releases/WebKitGTK/webkit-2.10/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#releasesWebKitGTKwebkit210SourceWebCoredomNodeFilterh">releases/WebKitGTK/webkit-2.10/Source/WebCore/dom/NodeFilter.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit210LayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog (189728 => 189729)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog        2015-09-14 13:55:10 UTC (rev 189728)
+++ releases/WebKitGTK/webkit-2.10/LayoutTests/ChangeLog        2015-09-14 13:55:15 UTC (rev 189729)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2015-08-31  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        NodeFilter.SHOW_ALL has wrong value on 32-bit
+        https://bugs.webkit.org/show_bug.cgi?id=148602
+
+        Reviewed by Geoffrey Garen.
+
+        Unskip tests that are now passing on Windows / 32bit.
+
+        * platform/win/TestExpectations:
+
</ins><span class="cx"> 2015-08-31  Antti Koivisto  &lt;antti@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Network Cache: Stale content after back navigation
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/ChangeLog (189728 => 189729)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/ChangeLog        2015-09-14 13:55:10 UTC (rev 189728)
+++ releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/ChangeLog        2015-09-14 13:55:15 UTC (rev 189729)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2015-08-31  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        NodeFilter.SHOW_ALL has wrong value on 32-bit
+        https://bugs.webkit.org/show_bug.cgi?id=148602
+
+        Reviewed by Geoffrey Garen.
+
+        NodeFilter.SHOW_ALL has wrong value on 32-bit. This is because
+        NodeFilter.SHOW_ALL is an unsigned long whose value is 0xFFFFFFFF but
+        our bindings code is casting it to an intptr_t type which is not wide
+        enough on 32-bit.
+
+        * create_hash_table:
+        Add extra curly brackets to initialize the union.
+
+        * runtime/Lookup.h:
+        Use a union type to store either a struct containing 2 intptr_t members
+        (value1 / value2) or a large constant of type unsigned long long. When
+        storing a constant, we only need one of the values so this allows us to
+        support larger constants without increasing the actual HashTableValue
+        size.
+
</ins><span class="cx"> 2015-08-31  Mark Lam  &lt;mark.lam@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Watchdog timer callback should release the lock before deref'ing the watchdog.
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceJavaScriptCorecreate_hash_table"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/create_hash_table (189728 => 189729)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/create_hash_table        2015-09-14 13:55:10 UTC (rev 189728)
+++ releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/create_hash_table        2015-09-14 13:55:15 UTC (rev 189729)
</span><span class="lines">@@ -320,10 +320,10 @@
</span><span class="cx">             my $tableHead = $name;
</span><span class="cx">             $tableHead =~ s/Table$//;
</span><span class="cx">             print &quot; #if JSC_BUILTIN_EXISTS(&quot; . uc($tableHead . $key) .&quot;)\n&quot;;
</span><del>-            print &quot;   { \&quot;$key\&quot;, (($attrs[$i]) &amp; ~Function) | Builtin, $intrinsic, (intptr_t)static_cast&lt;BuiltinGenerator&gt;(&quot; . $tableHead . ucfirst($key) . &quot;CodeGenerator), (intptr_t)$secondValue },\n&quot;;
</del><ins>+            print &quot;   { \&quot;$key\&quot;, (($attrs[$i]) &amp; ~Function) | Builtin, $intrinsic, { (intptr_t)static_cast&lt;BuiltinGenerator&gt;(&quot; . $tableHead . ucfirst($key) . &quot;CodeGenerator), (intptr_t)$secondValue } },\n&quot;;
</ins><span class="cx">             print &quot; #else\n&quot;
</span><span class="cx">         }
</span><del>-        print &quot;   { \&quot;$key\&quot;, $attrs[$i], $intrinsic, (intptr_t)&quot; . $firstCastStr . &quot;($firstValue), (intptr_t)&quot; . $secondCastStr . &quot;($secondValue) },\n&quot;;
</del><ins>+        print &quot;   { \&quot;$key\&quot;, $attrs[$i], $intrinsic, { (intptr_t)&quot; . $firstCastStr . &quot;($firstValue), (intptr_t)&quot; . $secondCastStr . &quot;($secondValue) } },\n&quot;;
</ins><span class="cx">         if ($values[$i]{&quot;type&quot;} eq &quot;Function&quot;)  {
</span><span class="cx">             print &quot; #endif\n&quot;
</span><span class="cx">         }
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceJavaScriptCoreruntimeLookuph"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/runtime/Lookup.h (189728 => 189729)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/runtime/Lookup.h        2015-09-14 13:55:10 UTC (rev 189728)
+++ releases/WebKitGTK/webkit-2.10/Source/JavaScriptCore/runtime/Lookup.h        2015-09-14 13:55:15 UTC (rev 189729)
</span><span class="lines">@@ -50,25 +50,38 @@
</span><span class="cx">     const char* m_key; // property name
</span><span class="cx">     unsigned m_attributes; // JSObject attributes
</span><span class="cx">     Intrinsic m_intrinsic;
</span><del>-    intptr_t m_value1;
-    intptr_t m_value2;
</del><ins>+    union ValueStorage {
+        constexpr ValueStorage(intptr_t value1, intptr_t value2)
+            : value1(value1)
+            , value2(value2)
+        { }
+        constexpr ValueStorage(long long constant)
+            : constant(constant)
+        { }
</ins><span class="cx"> 
</span><ins>+        struct {
+            intptr_t value1;
+            intptr_t value2;
+        };
+        long long constant;
+    } m_values;
+
</ins><span class="cx">     unsigned attributes() const { return m_attributes; }
</span><span class="cx"> 
</span><span class="cx">     Intrinsic intrinsic() const { ASSERT(m_attributes &amp; Function); return m_intrinsic; }
</span><del>-    BuiltinGenerator builtinGenerator() const { ASSERT(m_attributes &amp; Builtin); return reinterpret_cast&lt;BuiltinGenerator&gt;(m_value1); }
-    NativeFunction function() const { ASSERT(m_attributes &amp; Function); return reinterpret_cast&lt;NativeFunction&gt;(m_value1); }
-    unsigned char functionLength() const { ASSERT(m_attributes &amp; Function); return static_cast&lt;unsigned char&gt;(m_value2); }
</del><ins>+    BuiltinGenerator builtinGenerator() const { ASSERT(m_attributes &amp; Builtin); return reinterpret_cast&lt;BuiltinGenerator&gt;(m_values.value1); }
+    NativeFunction function() const { ASSERT(m_attributes &amp; Function); return reinterpret_cast&lt;NativeFunction&gt;(m_values.value1); }
+    unsigned char functionLength() const { ASSERT(m_attributes &amp; Function); return static_cast&lt;unsigned char&gt;(m_values.value2); }
</ins><span class="cx"> 
</span><del>-    GetFunction propertyGetter() const { ASSERT(!(m_attributes &amp; BuiltinOrFunctionOrAccessorOrConstant)); return reinterpret_cast&lt;GetFunction&gt;(m_value1); }
-    PutFunction propertyPutter() const { ASSERT(!(m_attributes &amp; BuiltinOrFunctionOrAccessorOrConstant)); return reinterpret_cast&lt;PutFunction&gt;(m_value2); }
</del><ins>+    GetFunction propertyGetter() const { ASSERT(!(m_attributes &amp; BuiltinOrFunctionOrAccessorOrConstant)); return reinterpret_cast&lt;GetFunction&gt;(m_values.value1); }
+    PutFunction propertyPutter() const { ASSERT(!(m_attributes &amp; BuiltinOrFunctionOrAccessorOrConstant)); return reinterpret_cast&lt;PutFunction&gt;(m_values.value2); }
</ins><span class="cx"> 
</span><del>-    NativeFunction accessorGetter() const { ASSERT(m_attributes &amp; Accessor); return reinterpret_cast&lt;NativeFunction&gt;(m_value1); }
-    NativeFunction accessorSetter() const { ASSERT(m_attributes &amp; Accessor); return reinterpret_cast&lt;NativeFunction&gt;(m_value2); }
</del><ins>+    NativeFunction accessorGetter() const { ASSERT(m_attributes &amp; Accessor); return reinterpret_cast&lt;NativeFunction&gt;(m_values.value1); }
+    NativeFunction accessorSetter() const { ASSERT(m_attributes &amp; Accessor); return reinterpret_cast&lt;NativeFunction&gt;(m_values.value2); }
</ins><span class="cx"> 
</span><del>-    intptr_t constantInteger() const { ASSERT(m_attributes &amp; ConstantInteger); return m_value1; }
</del><ins>+    long long constantInteger() const { ASSERT(m_attributes &amp; ConstantInteger); return m_values.constant; }
</ins><span class="cx"> 
</span><del>-    intptr_t lexerValue() const { ASSERT(!m_attributes); return m_value1; }
</del><ins>+    intptr_t lexerValue() const { ASSERT(!m_attributes); return m_values.value1; }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> struct HashTable {
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog (189728 => 189729)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog        2015-09-14 13:55:10 UTC (rev 189728)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog        2015-09-14 13:55:15 UTC (rev 189729)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2015-08-31  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        NodeFilter.SHOW_ALL has wrong value on 32-bit
+        https://bugs.webkit.org/show_bug.cgi?id=148602
+
+        Reviewed by Geoffrey Garen.
+
+        NodeFilter.SHOW_ALL has wrong value on 32-bit. This is because
+        NodeFilter.SHOW_ALL is an unsigned long whose value is 0xFFFFFFFF but
+        our bindings code is casting it to an intptr_t type which is not wide
+        enough on 32-bit.
+
+        No new tests, already covered by fast/dom/node-filter-interface.html
+        which is now unskipped on Windows / 32bit.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateHashTableValueArray):
+        Generate extra curly brackets to initialize the new union member.
+        Also cast to long long the constant instead of intptr_t.
+
+        * dom/NodeFilter.h:
+        Explicitly mark the enum underlying type to be an unsigned long
+        to make sure it can hold the value for SHOW_ALL on all platforms.
+        On Windows, it seems the default underlying type is an int for
+        e.g.
+
</ins><span class="cx"> 2015-08-31  Michael Catanzaro  &lt;mcatanzaro@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Freetype] FontCache::strengthOfFirstAlias leaks an FcPattern
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (189728 => 189729)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2015-09-14 13:55:10 UTC (rev 189728)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2015-09-14 13:55:15 UTC (rev 189729)
</span><span class="lines">@@ -4132,16 +4132,20 @@
</span><span class="cx">             $secondTargetType = &quot;static_cast&lt;PutPropertySlot::PutValueFunc&gt;&quot;;
</span><span class="cx">             $hasSetter = &quot;true&quot;;
</span><span class="cx">         }
</span><del>-        push(@implContent, &quot;    { \&quot;$key\&quot;, @$specials[$i], NoIntrinsic, (intptr_t)&quot; . $firstTargetType . &quot;(@$value1[$i]), (intptr_t) &quot; . $secondTargetType . &quot;(@$value2[$i]) },\n&quot;);
</del><ins>+        if (&quot;@$specials[$i]&quot; =~ m/ConstantInteger/) {
+            push(@implContent, &quot;    { \&quot;$key\&quot;, @$specials[$i], NoIntrinsic, { (long long)&quot; . $firstTargetType . &quot;(@$value1[$i]) } },\n&quot;);
+        } else {
+            push(@implContent, &quot;    { \&quot;$key\&quot;, @$specials[$i], NoIntrinsic, { (intptr_t)&quot; . $firstTargetType . &quot;(@$value1[$i]), (intptr_t) &quot; . $secondTargetType . &quot;(@$value2[$i]) } },\n&quot;);
+        }
</ins><span class="cx">         if ($conditional) {
</span><span class="cx">             push(@implContent, &quot;#else\n&quot;) ;
</span><del>-            push(@implContent, &quot;    { 0, 0, NoIntrinsic, 0, 0 },\n&quot;);
</del><ins>+            push(@implContent, &quot;    { 0, 0, NoIntrinsic, { 0, 0 } },\n&quot;);
</ins><span class="cx">             push(@implContent, &quot;#endif\n&quot;) ;
</span><span class="cx">         }
</span><span class="cx">         ++$i;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    push(@implContent, &quot;    { 0, 0, NoIntrinsic, 0, 0 }\n&quot;) if (!$packedSize);
</del><ins>+    push(@implContent, &quot;    { 0, 0, NoIntrinsic, { 0, 0 } }\n&quot;) if (!$packedSize);
</ins><span class="cx">     push(@implContent, &quot;};\n\n&quot;);
</span><span class="cx"> 
</span><span class="cx">     return $hasSetter;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit210SourceWebCoredomNodeFilterh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/dom/NodeFilter.h (189728 => 189729)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.10/Source/WebCore/dom/NodeFilter.h        2015-09-14 13:55:10 UTC (rev 189728)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/dom/NodeFilter.h        2015-09-14 13:55:15 UTC (rev 189729)
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx">          * their values are derived by using a bit position corresponding
</span><span class="cx">          * to the value of NodeType for the equivalent node type.
</span><span class="cx">          */
</span><del>-        enum {
</del><ins>+        enum : unsigned long {
</ins><span class="cx">             SHOW_ALL                       = 0xFFFFFFFF,
</span><span class="cx">             SHOW_ELEMENT                   = 0x00000001,
</span><span class="cx">             SHOW_ATTRIBUTE                 = 0x00000002,
</span></span></pre>
</div>
</div>

</body>
</html>