<!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>[202667] 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/202667">202667</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-06-29 21:24:52 -0700 (Wed, 29 Jun 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[JSC] Minor TypedArray fixes
https://bugs.webkit.org/show_bug.cgi?id=159286

Patch by Benjamin Poulain &lt;bpoulain@apple.com&gt; on 2016-06-29
Reviewed by Keith Miller.

Source/JavaScriptCore:

* runtime/JSGenericTypedArrayViewConstructorInlines.h:
(JSC::JSGenericTypedArrayViewConstructor&lt;ViewClass&gt;::finishCreation):
See https://tc39.github.io/ecma262/#sec-%typedarray%

* runtime/JSTypedArrayViewPrototype.cpp:
(JSC::typedArrayViewPrivateFuncLength):
See https://tc39.github.io/ecma262/#sec-get-%typedarray%.prototype.length

(JSC::typedArrayViewProtoGetterFuncToStringTag):
Yep, that's odd.
See https://tc39.github.io/ecma262/#sec-get-%typedarray%.prototype-@@tostringtag

(JSC::JSTypedArrayViewPrototype::finishCreation):
See the last paragraph of https://tc39.github.io/ecma262/#sec-ecmascript-standard-built-in-objects

LayoutTests:

* js/script-tests/typedarray-constructors.js:
* js/script-tests/typedarray-prototype.js:
* js/typedarray-constructors-expected.txt:
* js/typedarray-prototype-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsjsscriptteststypedarrayconstructorsjs">trunk/LayoutTests/js/script-tests/typedarray-constructors.js</a></li>
<li><a href="#trunkLayoutTestsjsscriptteststypedarrayprototypejs">trunk/LayoutTests/js/script-tests/typedarray-prototype.js</a></li>
<li><a href="#trunkLayoutTestsjstypedarrayconstructorsexpectedtxt">trunk/LayoutTests/js/typedarray-constructors-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjstypedarrayprototypeexpectedtxt">trunk/LayoutTests/js/typedarray-prototype-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacjsdomconstructorlengthexpectedtxt">trunk/LayoutTests/platform/mac/js/dom/constructor-length-expected.txt</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSGenericTypedArrayViewConstructorInlinesh">trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSTypedArrayViewPrototypecpp">trunk/Source/JavaScriptCore/runtime/JSTypedArrayViewPrototype.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (202666 => 202667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-06-30 04:19:42 UTC (rev 202666)
+++ trunk/LayoutTests/ChangeLog        2016-06-30 04:24:52 UTC (rev 202667)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-06-29  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
+
+        [JSC] Minor TypedArray fixes
+        https://bugs.webkit.org/show_bug.cgi?id=159286
+
+        Reviewed by Keith Miller.
+
+        * js/script-tests/typedarray-constructors.js:
+        * js/script-tests/typedarray-prototype.js:
+        * js/typedarray-constructors-expected.txt:
+        * js/typedarray-prototype-expected.txt:
+
</ins><span class="cx"> 2016-06-29  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: API View of Native DOM APIs looks poor (TypeErrors for native getters)
</span></span></pre></div>
<a id="trunkLayoutTestsjsscriptteststypedarrayconstructorsjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/script-tests/typedarray-constructors.js (202666 => 202667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/script-tests/typedarray-constructors.js        2016-06-30 04:19:42 UTC (rev 202666)
+++ trunk/LayoutTests/js/script-tests/typedarray-constructors.js        2016-06-30 04:24:52 UTC (rev 202667)
</span><span class="lines">@@ -3,33 +3,25 @@
</span><span class="cx"> 'In particular, makes sure that you use the &quot;new&quot; keyword when using the constructors.'
</span><span class="cx"> );
</span><span class="cx"> 
</span><del>-shouldThrow(&quot;Int8Array()&quot;);
-shouldNotThrow(&quot;new Int8Array()&quot;);
</del><ins>+let arrayTypes = [
+    Int8Array,
+    Int16Array,
+    Int32Array,
+    Uint8Array,
+    Uint8ClampedArray,
+    Uint16Array,
+    Uint32Array,
+    Float32Array,
+    Float64Array,
+];
</ins><span class="cx"> 
</span><del>-shouldThrow(&quot;Int16Array()&quot;);
-shouldNotThrow(&quot;new Int16Array()&quot;);
</del><ins>+// The prototype should be the same for every type of view.
+for (let arrayType of arrayTypes) {
+    shouldThrow(&quot;&quot; + arrayType.name + &quot;()&quot;);
+    shouldNotThrow(&quot;new &quot; + arrayType.name + &quot;()&quot;);
+    shouldBe(&quot;&quot; + arrayType.name + &quot;.length&quot;, &quot;0&quot;);
+}
</ins><span class="cx"> 
</span><del>-shouldThrow(&quot;Int32Array()&quot;);
-shouldNotThrow(&quot;new Int32Array()&quot;);
-
-shouldThrow(&quot;Uint8Array()&quot;);
-shouldNotThrow(&quot;new Uint8Array()&quot;);
-
-shouldThrow(&quot;Uint16Array()&quot;);
-shouldNotThrow(&quot;new Uint16Array()&quot;);
-
-shouldThrow(&quot;Uint32Array()&quot;);
-shouldNotThrow(&quot;new Uint32Array()&quot;);
-
-shouldThrow(&quot;Uint8ClampedArray()&quot;);
-shouldNotThrow(&quot;new Uint8ClampedArray()&quot;);
-
-shouldThrow(&quot;Float32Array()&quot;);
-shouldNotThrow(&quot;new Float32Array()&quot;);
-
-shouldThrow(&quot;Float64Array()&quot;);
-shouldNotThrow(&quot;new Float64Array()&quot;);
-
</del><span class="cx"> shouldThrow(&quot;DataView(new ArrayBuffer())&quot;);
</span><span class="cx"> shouldNotThrow(&quot;new DataView(new ArrayBuffer())&quot;);
</span><del>-
</del><ins>+shouldBe(&quot;DataView.length&quot;, &quot;0&quot;);
</ins></span></pre></div>
<a id="trunkLayoutTestsjsscriptteststypedarrayprototypejs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/script-tests/typedarray-prototype.js (202666 => 202667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/script-tests/typedarray-prototype.js        2016-06-30 04:19:42 UTC (rev 202666)
+++ trunk/LayoutTests/js/script-tests/typedarray-prototype.js        2016-06-30 04:24:52 UTC (rev 202667)
</span><span class="lines">@@ -7,6 +7,7 @@
</span><span class="cx">     Int16Array,
</span><span class="cx">     Int32Array,
</span><span class="cx">     Uint8Array,
</span><ins>+    Uint8ClampedArray,
</ins><span class="cx">     Uint16Array,
</span><span class="cx">     Uint32Array,
</span><span class="cx">     Float32Array,
</span><span class="lines">@@ -22,15 +23,100 @@
</span><span class="cx"> 
</span><span class="cx"> let TypedArray = Object.getPrototypeOf(Int8Array);
</span><span class="cx"> 
</span><ins>+// buffer.
+shouldBeEqualToString('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).get.name', 'get buffer');
+shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).get.length', '0');
+shouldBeFalse('&quot;writable&quot; in Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;)');
+shouldBeFalse('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).enumerable');
+shouldBeTrue('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).configurable');
+shouldBeEqualToString('typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).get', 'function');
+shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).set', 'undefined');
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).get.call()', &quot;'TypeError: Receiver should be a typed array view but was not an object'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).get.call(undefined)', &quot;'TypeError: Receiver should be a typed array view but was not an object'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).get.call(null)', &quot;'TypeError: Receiver should be a typed array view but was not an object'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).get.call(5)', &quot;'TypeError: Receiver should be a typed array view but was not an object'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).get.call([])', &quot;'TypeError: Receiver should be a typed array view'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).get.call({ foo: &quot;bar&quot; })', &quot;'TypeError: Receiver should be a typed array view'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).get.call(new ArrayBuffer(42))', &quot;'TypeError: Receiver should be a typed array view'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).get.call(new DataView(new ArrayBuffer(8), 0, 1))', &quot;'TypeError: Receiver should be a typed array view'&quot;);
+
+// byteLength.
+shouldBeEqualToString('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).get.name', 'get byteLength');
+shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).get.length', '0');
+shouldBeFalse('&quot;writable&quot; in Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;)');
+shouldBeFalse('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).enumerable');
+shouldBeTrue('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).configurable');
+shouldBeEqualToString('typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).get', 'function');
+shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).set', 'undefined');
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).get.call()', &quot;'TypeError: Receiver should be a typed array view but was not an object'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).get.call(undefined)', &quot;'TypeError: Receiver should be a typed array view but was not an object'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).get.call(null)', &quot;'TypeError: Receiver should be a typed array view but was not an object'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).get.call(5)', &quot;'TypeError: Receiver should be a typed array view but was not an object'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).get.call([])', &quot;'TypeError: Receiver should be a typed array view'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).get.call({ foo: &quot;bar&quot; })', &quot;'TypeError: Receiver should be a typed array view'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).get.call(new ArrayBuffer(42))', &quot;'TypeError: Receiver should be a typed array view'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).get.call(new DataView(new ArrayBuffer(8), 0, 1))', &quot;'TypeError: Receiver should be a typed array view'&quot;);
+
+// byteOffset.
+shouldBeEqualToString('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).get.name', 'get byteOffset');
+shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).get.length', '0');
+shouldBeFalse('&quot;writable&quot; in Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;)');
+shouldBeFalse('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).enumerable');
+shouldBeTrue('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).configurable');
+shouldBeEqualToString('typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).get', 'function');
+shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).set', 'undefined');
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).get.call()', &quot;'TypeError: Receiver should be a typed array view but was not an object'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).get.call(undefined)', &quot;'TypeError: Receiver should be a typed array view but was not an object'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).get.call(null)', &quot;'TypeError: Receiver should be a typed array view but was not an object'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).get.call(5)', &quot;'TypeError: Receiver should be a typed array view but was not an object'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).get.call([])', &quot;'TypeError: Receiver should be a typed array view'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).get.call({ foo: &quot;bar&quot; })', &quot;'TypeError: Receiver should be a typed array view'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).get.call(new ArrayBuffer(42))', &quot;'TypeError: Receiver should be a typed array view'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).get.call(new DataView(new ArrayBuffer(8), 0, 1))', &quot;'TypeError: Receiver should be a typed array view'&quot;);
+
+// entries.
+shouldBeTrue('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;entries&quot;).writable');
+shouldBeFalse('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;entries&quot;).enumerable');
+shouldBeTrue('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;entries&quot;).configurable');
+shouldBeEqualToString('typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;entries&quot;).value', 'function');
+shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;entries&quot;).set', 'undefined');
+shouldThrow('TypedArray.prototype.entries.call()', &quot;'TypeError: Receiver should be a typed array view'&quot;);
+shouldThrow('TypedArray.prototype.entries.call(undefined)', &quot;'TypeError: Receiver should be a typed array view'&quot;);
+shouldThrow('TypedArray.prototype.entries.call(null)', &quot;'TypeError: Receiver should be a typed array view'&quot;);
+shouldThrow('TypedArray.prototype.entries.call(5)', &quot;'TypeError: Receiver should be a typed array view'&quot;);
+shouldThrow('TypedArray.prototype.entries.call([])', &quot;'TypeError: Receiver should be a typed array view'&quot;);
+shouldThrow('TypedArray.prototype.entries.call({ foo: &quot;bar&quot; })', &quot;'TypeError: Receiver should be a typed array view'&quot;);
+shouldThrow('TypedArray.prototype.entries.call(new ArrayBuffer(42))', &quot;'TypeError: Receiver should be a typed array view'&quot;);
+shouldThrow('TypedArray.prototype.entries.call(new DataView(new ArrayBuffer(8), 0, 1))', &quot;'TypeError: Receiver should be a typed array view'&quot;);
+
</ins><span class="cx"> // length.
</span><ins>+shouldBeEqualToString('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).get.name', 'get length');
+shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).get.length', '0');
</ins><span class="cx"> shouldBeFalse('&quot;writable&quot; in Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;)');
</span><span class="cx"> shouldBeFalse('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).enumerable');
</span><span class="cx"> shouldBeTrue('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).configurable');
</span><del>-shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).get.length', '0');
</del><span class="cx"> shouldBeEqualToString('typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).get', 'function');
</span><span class="cx"> shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).set', 'undefined');
</span><ins>+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).get.call()', &quot;'TypeError: Receiver should be a typed array view but was not an object'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).get.call(undefined)', &quot;'TypeError: Receiver should be a typed array view but was not an object'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).get.call(null)', &quot;'TypeError: Receiver should be a typed array view but was not an object'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).get.call(5)', &quot;'TypeError: Receiver should be a typed array view but was not an object'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).get.call([])', &quot;'TypeError: Receiver should be a typed array view'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).get.call({ foo: &quot;bar&quot; })', &quot;'TypeError: Receiver should be a typed array view'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).get.call(new ArrayBuffer(42))', &quot;'TypeError: Receiver should be a typed array view'&quot;);
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).get.call(new DataView(new ArrayBuffer(8), 0, 1))', &quot;'TypeError: Receiver should be a typed array view'&quot;);
</ins><span class="cx"> 
</span><ins>+// toLocaleString.
+shouldBeEqualToString('TypedArray.prototype.toLocaleString.name', 'toLocaleString');
+shouldBe('TypedArray.prototype.toLocaleString.length', '0');
+shouldBeTrue('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;toLocaleString&quot;).writable');
+shouldBeFalse('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;toLocaleString&quot;).enumerable');
+shouldBeTrue('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;toLocaleString&quot;).configurable');
+shouldBeEqualToString('typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;toString&quot;).value', 'function');
+
</ins><span class="cx"> // toString.
</span><ins>+shouldBeEqualToString('TypedArray.prototype.toString.name', 'toString');
+shouldBe('TypedArray.prototype.toString.length', '0');
</ins><span class="cx"> shouldBe('TypedArray.prototype.toString', 'Array.prototype.toString');
</span><span class="cx"> shouldBeTrue('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;toString&quot;).writable');
</span><span class="cx"> shouldBeFalse('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;toString&quot;).enumerable');
</span><span class="lines">@@ -37,8 +123,20 @@
</span><span class="cx"> shouldBeTrue('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;toString&quot;).configurable');
</span><span class="cx"> shouldBeEqualToString('typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;toString&quot;).value', 'function');
</span><span class="cx"> 
</span><del>-// toLocaleString.
-shouldBeTrue('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;toLocaleString&quot;).writable');
-shouldBeFalse('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;toLocaleString&quot;).enumerable');
-shouldBeTrue('Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;toLocaleString&quot;).configurable');
-shouldBeEqualToString('typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;toString&quot;).value', 'function');
</del><ins>+// toStringTag
+shouldBeEqualToString('Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).get.name', 'get [Symbol.toStringTag]');
+shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).get.length', '0');
+shouldBeFalse('&quot;writable&quot; in Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag)');
+shouldBeFalse('Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).enumerable');
+shouldBeTrue('Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).configurable');
+shouldBeEqualToString('typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).get', 'function');
+shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).set', 'undefined');
+shouldBe('TypedArray.prototype[Symbol.toStringTag]', 'undefined');
+shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).get.call()', 'undefined');
+shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).get.call(undefined)', 'undefined');
+shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).get.call(null)', 'undefined');
+shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).get.call(5)', 'undefined');
+shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).get.call([])', 'undefined');
+shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).get.call({ foo: &quot;bar&quot; })', 'undefined');
+shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).get.call(new ArrayBuffer(42))', 'undefined');
+shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).get.call(new DataView(new ArrayBuffer(8), 0, 1))', 'undefined');
</ins></span></pre></div>
<a id="trunkLayoutTestsjstypedarrayconstructorsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/typedarray-constructors-expected.txt (202666 => 202667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/typedarray-constructors-expected.txt        2016-06-30 04:19:42 UTC (rev 202666)
+++ trunk/LayoutTests/js/typedarray-constructors-expected.txt        2016-06-30 04:24:52 UTC (rev 202667)
</span><span class="lines">@@ -5,24 +5,34 @@
</span><span class="cx"> 
</span><span class="cx"> PASS Int8Array() threw exception TypeError: calling Int8Array constructor without new is invalid.
</span><span class="cx"> PASS new Int8Array() did not throw exception.
</span><ins>+PASS Int8Array.length is 0
</ins><span class="cx"> PASS Int16Array() threw exception TypeError: calling Int16Array constructor without new is invalid.
</span><span class="cx"> PASS new Int16Array() did not throw exception.
</span><ins>+PASS Int16Array.length is 0
</ins><span class="cx"> PASS Int32Array() threw exception TypeError: calling Int32Array constructor without new is invalid.
</span><span class="cx"> PASS new Int32Array() did not throw exception.
</span><ins>+PASS Int32Array.length is 0
</ins><span class="cx"> PASS Uint8Array() threw exception TypeError: calling Uint8Array constructor without new is invalid.
</span><span class="cx"> PASS new Uint8Array() did not throw exception.
</span><ins>+PASS Uint8Array.length is 0
+PASS Uint8ClampedArray() threw exception TypeError: calling Uint8ClampedArray constructor without new is invalid.
+PASS new Uint8ClampedArray() did not throw exception.
+PASS Uint8ClampedArray.length is 0
</ins><span class="cx"> PASS Uint16Array() threw exception TypeError: calling Uint16Array constructor without new is invalid.
</span><span class="cx"> PASS new Uint16Array() did not throw exception.
</span><ins>+PASS Uint16Array.length is 0
</ins><span class="cx"> PASS Uint32Array() threw exception TypeError: calling Uint32Array constructor without new is invalid.
</span><span class="cx"> PASS new Uint32Array() did not throw exception.
</span><del>-PASS Uint8ClampedArray() threw exception TypeError: calling Uint8ClampedArray constructor without new is invalid.
-PASS new Uint8ClampedArray() did not throw exception.
</del><ins>+PASS Uint32Array.length is 0
</ins><span class="cx"> PASS Float32Array() threw exception TypeError: calling Float32Array constructor without new is invalid.
</span><span class="cx"> PASS new Float32Array() did not throw exception.
</span><ins>+PASS Float32Array.length is 0
</ins><span class="cx"> PASS Float64Array() threw exception TypeError: calling Float64Array constructor without new is invalid.
</span><span class="cx"> PASS new Float64Array() did not throw exception.
</span><ins>+PASS Float64Array.length is 0
</ins><span class="cx"> PASS DataView(new ArrayBuffer()) threw exception TypeError: calling DataView constructor without new is invalid.
</span><span class="cx"> PASS new DataView(new ArrayBuffer()) did not throw exception.
</span><ins>+PASS DataView.length is 0
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsjstypedarrayprototypeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/typedarray-prototype-expected.txt (202666 => 202667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/typedarray-prototype-expected.txt        2016-06-30 04:19:42 UTC (rev 202666)
+++ trunk/LayoutTests/js/typedarray-prototype-expected.txt        2016-06-30 04:24:52 UTC (rev 202667)
</span><span class="lines">@@ -7,6 +7,7 @@
</span><span class="cx"> PASS Object.getPrototypeOf(Int8Array) === Object.getPrototypeOf(Int16Array) is true
</span><span class="cx"> PASS Object.getPrototypeOf(Int8Array) === Object.getPrototypeOf(Int32Array) is true
</span><span class="cx"> PASS Object.getPrototypeOf(Int8Array) === Object.getPrototypeOf(Uint8Array) is true
</span><ins>+PASS Object.getPrototypeOf(Int8Array) === Object.getPrototypeOf(Uint8ClampedArray) is true
</ins><span class="cx"> PASS Object.getPrototypeOf(Int8Array) === Object.getPrototypeOf(Uint16Array) is true
</span><span class="cx"> PASS Object.getPrototypeOf(Int8Array) === Object.getPrototypeOf(Uint32Array) is true
</span><span class="cx"> PASS Object.getPrototypeOf(Int8Array) === Object.getPrototypeOf(Float32Array) is true
</span><span class="lines">@@ -14,6 +15,7 @@
</span><span class="cx"> PASS Object.getPrototypeOf(Int16Array) === Object.getPrototypeOf(Int16Array) is true
</span><span class="cx"> PASS Object.getPrototypeOf(Int16Array) === Object.getPrototypeOf(Int32Array) is true
</span><span class="cx"> PASS Object.getPrototypeOf(Int16Array) === Object.getPrototypeOf(Uint8Array) is true
</span><ins>+PASS Object.getPrototypeOf(Int16Array) === Object.getPrototypeOf(Uint8ClampedArray) is true
</ins><span class="cx"> PASS Object.getPrototypeOf(Int16Array) === Object.getPrototypeOf(Uint16Array) is true
</span><span class="cx"> PASS Object.getPrototypeOf(Int16Array) === Object.getPrototypeOf(Uint32Array) is true
</span><span class="cx"> PASS Object.getPrototypeOf(Int16Array) === Object.getPrototypeOf(Float32Array) is true
</span><span class="lines">@@ -20,15 +22,22 @@
</span><span class="cx"> PASS Object.getPrototypeOf(Int16Array) === Object.getPrototypeOf(Float64Array) is true
</span><span class="cx"> PASS Object.getPrototypeOf(Int32Array) === Object.getPrototypeOf(Int32Array) is true
</span><span class="cx"> PASS Object.getPrototypeOf(Int32Array) === Object.getPrototypeOf(Uint8Array) is true
</span><ins>+PASS Object.getPrototypeOf(Int32Array) === Object.getPrototypeOf(Uint8ClampedArray) is true
</ins><span class="cx"> PASS Object.getPrototypeOf(Int32Array) === Object.getPrototypeOf(Uint16Array) is true
</span><span class="cx"> PASS Object.getPrototypeOf(Int32Array) === Object.getPrototypeOf(Uint32Array) is true
</span><span class="cx"> PASS Object.getPrototypeOf(Int32Array) === Object.getPrototypeOf(Float32Array) is true
</span><span class="cx"> PASS Object.getPrototypeOf(Int32Array) === Object.getPrototypeOf(Float64Array) is true
</span><span class="cx"> PASS Object.getPrototypeOf(Uint8Array) === Object.getPrototypeOf(Uint8Array) is true
</span><ins>+PASS Object.getPrototypeOf(Uint8Array) === Object.getPrototypeOf(Uint8ClampedArray) is true
</ins><span class="cx"> PASS Object.getPrototypeOf(Uint8Array) === Object.getPrototypeOf(Uint16Array) is true
</span><span class="cx"> PASS Object.getPrototypeOf(Uint8Array) === Object.getPrototypeOf(Uint32Array) is true
</span><span class="cx"> PASS Object.getPrototypeOf(Uint8Array) === Object.getPrototypeOf(Float32Array) is true
</span><span class="cx"> PASS Object.getPrototypeOf(Uint8Array) === Object.getPrototypeOf(Float64Array) is true
</span><ins>+PASS Object.getPrototypeOf(Uint8ClampedArray) === Object.getPrototypeOf(Uint8ClampedArray) is true
+PASS Object.getPrototypeOf(Uint8ClampedArray) === Object.getPrototypeOf(Uint16Array) is true
+PASS Object.getPrototypeOf(Uint8ClampedArray) === Object.getPrototypeOf(Uint32Array) is true
+PASS Object.getPrototypeOf(Uint8ClampedArray) === Object.getPrototypeOf(Float32Array) is true
+PASS Object.getPrototypeOf(Uint8ClampedArray) === Object.getPrototypeOf(Float64Array) is true
</ins><span class="cx"> PASS Object.getPrototypeOf(Uint16Array) === Object.getPrototypeOf(Uint16Array) is true
</span><span class="cx"> PASS Object.getPrototypeOf(Uint16Array) === Object.getPrototypeOf(Uint32Array) is true
</span><span class="cx"> PASS Object.getPrototypeOf(Uint16Array) === Object.getPrototypeOf(Float32Array) is true
</span><span class="lines">@@ -39,21 +48,108 @@
</span><span class="cx"> PASS Object.getPrototypeOf(Float32Array) === Object.getPrototypeOf(Float32Array) is true
</span><span class="cx"> PASS Object.getPrototypeOf(Float32Array) === Object.getPrototypeOf(Float64Array) is true
</span><span class="cx"> PASS Object.getPrototypeOf(Float64Array) === Object.getPrototypeOf(Float64Array) is true
</span><ins>+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).get.name is &quot;get buffer&quot;
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).get.length is 0
+PASS &quot;writable&quot; in Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;) is false
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).enumerable is false
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).configurable is true
+PASS typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).get is &quot;function&quot;
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).set is undefined
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).get.call() threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).get.call(undefined) threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).get.call(null) threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).get.call(5) threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).get.call([]) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).get.call({ foo: &quot;bar&quot; }) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).get.call(new ArrayBuffer(42)) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;buffer&quot;).get.call(new DataView(new ArrayBuffer(8), 0, 1)) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).get.name is &quot;get byteLength&quot;
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).get.length is 0
+PASS &quot;writable&quot; in Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;) is false
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).enumerable is false
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).configurable is true
+PASS typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).get is &quot;function&quot;
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).set is undefined
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).get.call() threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).get.call(undefined) threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).get.call(null) threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).get.call(5) threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).get.call([]) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).get.call({ foo: &quot;bar&quot; }) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).get.call(new ArrayBuffer(42)) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteLength&quot;).get.call(new DataView(new ArrayBuffer(8), 0, 1)) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).get.name is &quot;get byteOffset&quot;
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).get.length is 0
+PASS &quot;writable&quot; in Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;) is false
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).enumerable is false
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).configurable is true
+PASS typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).get is &quot;function&quot;
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).set is undefined
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).get.call() threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).get.call(undefined) threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).get.call(null) threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).get.call(5) threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).get.call([]) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).get.call({ foo: &quot;bar&quot; }) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).get.call(new ArrayBuffer(42)) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;byteOffset&quot;).get.call(new DataView(new ArrayBuffer(8), 0, 1)) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;entries&quot;).writable is true
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;entries&quot;).enumerable is false
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;entries&quot;).configurable is true
+PASS typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;entries&quot;).value is &quot;function&quot;
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;entries&quot;).set is undefined
+PASS TypedArray.prototype.entries.call() threw exception TypeError: Receiver should be a typed array view.
+PASS TypedArray.prototype.entries.call(undefined) threw exception TypeError: Receiver should be a typed array view.
+PASS TypedArray.prototype.entries.call(null) threw exception TypeError: Receiver should be a typed array view.
+PASS TypedArray.prototype.entries.call(5) threw exception TypeError: Receiver should be a typed array view.
+PASS TypedArray.prototype.entries.call([]) threw exception TypeError: Receiver should be a typed array view.
+PASS TypedArray.prototype.entries.call({ foo: &quot;bar&quot; }) threw exception TypeError: Receiver should be a typed array view.
+PASS TypedArray.prototype.entries.call(new ArrayBuffer(42)) threw exception TypeError: Receiver should be a typed array view.
+PASS TypedArray.prototype.entries.call(new DataView(new ArrayBuffer(8), 0, 1)) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).get.name is &quot;get length&quot;
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).get.length is 0
</ins><span class="cx"> PASS &quot;writable&quot; in Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;) is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).configurable is true
</span><del>-PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).get.length is 0
</del><span class="cx"> PASS typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).get is &quot;function&quot;
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).set is undefined
</span><ins>+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).get.call() threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).get.call(undefined) threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).get.call(null) threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).get.call(5) threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).get.call([]) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).get.call({ foo: &quot;bar&quot; }) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).get.call(new ArrayBuffer(42)) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;length&quot;).get.call(new DataView(new ArrayBuffer(8), 0, 1)) threw exception TypeError: Receiver should be a typed array view.
+PASS TypedArray.prototype.toLocaleString.name is &quot;toLocaleString&quot;
+PASS TypedArray.prototype.toLocaleString.length is 0
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;toLocaleString&quot;).writable is true
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;toLocaleString&quot;).enumerable is false
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;toLocaleString&quot;).configurable is true
+PASS typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;toString&quot;).value is &quot;function&quot;
+PASS TypedArray.prototype.toString.name is &quot;toString&quot;
+PASS TypedArray.prototype.toString.length is 0
</ins><span class="cx"> PASS TypedArray.prototype.toString is Array.prototype.toString
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;toString&quot;).writable is true
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;toString&quot;).enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;toString&quot;).configurable is true
</span><span class="cx"> PASS typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;toString&quot;).value is &quot;function&quot;
</span><del>-PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;toLocaleString&quot;).writable is true
-PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;toLocaleString&quot;).enumerable is false
-PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;toLocaleString&quot;).configurable is true
-PASS typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, &quot;toString&quot;).value is &quot;function&quot;
</del><ins>+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).get.name is &quot;get [Symbol.toStringTag]&quot;
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).get.length is 0
+PASS &quot;writable&quot; in Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag) is false
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).enumerable is false
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).configurable is true
+PASS typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).get is &quot;function&quot;
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).set is undefined
+PASS TypedArray.prototype[Symbol.toStringTag] is undefined
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).get.call() is undefined
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).get.call(undefined) is undefined
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).get.call(null) is undefined
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).get.call(5) is undefined
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).get.call([]) is undefined
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).get.call({ foo: &quot;bar&quot; }) is undefined
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).get.call(new ArrayBuffer(42)) is undefined
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).get.call(new DataView(new ArrayBuffer(8), 0, 1)) is undefined
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacjsdomconstructorlengthexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/js/dom/constructor-length-expected.txt (202666 => 202667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/js/dom/constructor-length-expected.txt        2016-06-30 04:19:42 UTC (rev 202666)
+++ trunk/LayoutTests/platform/mac/js/dom/constructor-length-expected.txt        2016-06-30 04:24:52 UTC (rev 202667)
</span><span class="lines">@@ -13,18 +13,18 @@
</span><span class="cx"> PASS CustomEvent.length is 1
</span><span class="cx"> FAIL DOMFormData.length should be 0. Threw exception ReferenceError: Can't find variable: DOMFormData
</span><span class="cx"> PASS DOMParser.length is 0
</span><del>-PASS DataView.length is 3
</del><ins>+FAIL DataView.length should be 3. Was 0.
</ins><span class="cx"> PASS ErrorEvent.length is 1
</span><span class="cx"> PASS Event.length is 1
</span><span class="cx"> PASS EventSource.length is 1
</span><del>-PASS Float32Array.length is 3
-PASS Float64Array.length is 3
</del><ins>+FAIL Float32Array.length should be 3. Was 0.
+FAIL Float64Array.length should be 3. Was 0.
</ins><span class="cx"> PASS FileReader.length is 0
</span><span class="cx"> FAIL FileReaderSync.length should be 0. Threw exception ReferenceError: Can't find variable: FileReaderSync
</span><span class="cx"> PASS HashChangeEvent.length is 1
</span><del>-PASS Int16Array.length is 3
-PASS Int32Array.length is 3
-PASS Int8Array.length is 3
</del><ins>+FAIL Int16Array.length should be 3. Was 0.
+FAIL Int32Array.length should be 3. Was 0.
+FAIL Int8Array.length should be 3. Was 0.
</ins><span class="cx"> FAIL Intent.length should be 3. Threw exception ReferenceError: Can't find variable: Intent
</span><span class="cx"> PASS MediaController.length is 0
</span><span class="cx"> PASS MediaStream.length is 0
</span><span class="lines">@@ -39,10 +39,10 @@
</span><span class="cx"> PASS StorageEvent.length is 1
</span><span class="cx"> PASS TextTrackCue.length is 3
</span><span class="cx"> PASS TrackEvent.length is 1
</span><del>-PASS Uint16Array.length is 3
-PASS Uint32Array.length is 3
-PASS Uint8Array.length is 3
-PASS Uint8ClampedArray.length is 3
</del><ins>+FAIL Uint16Array.length should be 3. Was 0.
+FAIL Uint32Array.length should be 3. Was 0.
+FAIL Uint8Array.length should be 3. Was 0.
+FAIL Uint8ClampedArray.length should be 3. Was 0.
</ins><span class="cx"> PASS VTTCue.length is 3
</span><span class="cx"> PASS WebGLContextEvent.length is 1
</span><span class="cx"> PASS WebKitAnimationEvent.length is 1
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (202666 => 202667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-06-30 04:19:42 UTC (rev 202666)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-06-30 04:24:52 UTC (rev 202667)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2016-06-29  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
+
+        [JSC] Minor TypedArray fixes
+        https://bugs.webkit.org/show_bug.cgi?id=159286
+
+        Reviewed by Keith Miller.
+
+        * runtime/JSGenericTypedArrayViewConstructorInlines.h:
+        (JSC::JSGenericTypedArrayViewConstructor&lt;ViewClass&gt;::finishCreation):
+        See https://tc39.github.io/ecma262/#sec-%typedarray%
+
+        * runtime/JSTypedArrayViewPrototype.cpp:
+        (JSC::typedArrayViewPrivateFuncLength):
+        See https://tc39.github.io/ecma262/#sec-get-%typedarray%.prototype.length
+
+        (JSC::typedArrayViewProtoGetterFuncToStringTag):
+        Yep, that's odd.
+        See https://tc39.github.io/ecma262/#sec-get-%typedarray%.prototype-@@tostringtag
+
+        (JSC::JSTypedArrayViewPrototype::finishCreation):
+        See the last paragraph of https://tc39.github.io/ecma262/#sec-ecmascript-standard-built-in-objects
+
</ins><span class="cx"> 2016-06-29  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: API View of Native DOM APIs looks poor (TypeErrors for native getters)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGenericTypedArrayViewConstructorInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h (202666 => 202667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h        2016-06-30 04:19:42 UTC (rev 202666)
+++ trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h        2016-06-30 04:24:52 UTC (rev 202667)
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx"> {
</span><span class="cx">     Base::finishCreation(vm, name);
</span><span class="cx">     putDirectWithoutTransition(vm, vm.propertyNames-&gt;prototype, prototype, DontEnum | DontDelete | ReadOnly);
</span><del>-    putDirectWithoutTransition(vm, vm.propertyNames-&gt;length, jsNumber(3), DontEnum | DontDelete | ReadOnly);
</del><ins>+    putDirectWithoutTransition(vm, vm.propertyNames-&gt;length, jsNumber(0), DontEnum | DontDelete | ReadOnly);
</ins><span class="cx">     putDirectWithoutTransition(vm, vm.propertyNames-&gt;BYTES_PER_ELEMENT, jsNumber(ViewClass::elementSize), DontEnum | ReadOnly | DontDelete);
</span><span class="cx"> 
</span><span class="cx">     if (privateAllocator)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSTypedArrayViewPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSTypedArrayViewPrototype.cpp (202666 => 202667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSTypedArrayViewPrototype.cpp        2016-06-30 04:19:42 UTC (rev 202666)
+++ trunk/Source/JavaScriptCore/runtime/JSTypedArrayViewPrototype.cpp        2016-06-30 04:24:52 UTC (rev 202667)
</span><span class="lines">@@ -72,8 +72,12 @@
</span><span class="cx"> 
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL typedArrayViewPrivateFuncLength(ExecState* exec)
</span><span class="cx"> {
</span><del>-    JSArrayBufferView* thisObject = jsDynamicCast&lt;JSArrayBufferView*&gt;(exec-&gt;argument(0));
-    if (!thisObject)
</del><ins>+    JSValue argument = exec-&gt;argument(0);
+    if (!argument.isCell() || !isTypedView(argument.asCell()-&gt;classInfo()-&gt;typedArrayStorageType))
+        return throwVMTypeError(exec, &quot;Receiver should be a typed array view&quot;);
+
+    JSArrayBufferView* thisObject = jsCast&lt;JSArrayBufferView*&gt;(argument);
+    if (!thisObject || thisObject-&gt;mode() == DataViewMode)
</ins><span class="cx">         return throwVMError(exec, createTypeError(exec, &quot;Receiver should be a typed array view&quot;));
</span><span class="cx">     if (thisObject-&gt;isNeutered())
</span><span class="cx">         return throwVMTypeError(exec, &quot;Underlying ArrayBuffer has been detached from the view&quot;);
</span><span class="lines">@@ -203,7 +207,7 @@
</span><span class="cx"> {
</span><span class="cx">     JSValue thisValue = exec-&gt;thisValue();
</span><span class="cx">     if (!thisValue.isObject())
</span><del>-        return throwVMError(exec, createTypeError(exec, &quot;Receiver should be a typed array view but was not an object&quot;));
</del><ins>+        return JSValue::encode(jsUndefined());
</ins><span class="cx"> 
</span><span class="cx">     VM&amp; vm = exec-&gt;vm();
</span><span class="cx">     switch (thisValue.getObject()-&gt;classInfo()-&gt;typedArrayStorageType) {
</span><span class="lines">@@ -227,7 +231,7 @@
</span><span class="cx">         return JSValue::encode(jsString(&amp;vm, &quot;Uint16Array&quot;));
</span><span class="cx">     case NotTypedArray:
</span><span class="cx">     case TypeDataView:
</span><del>-        return throwVMError(exec, createTypeError(exec, &quot;Receiver should be a typed array view&quot;));
</del><ins>+        return JSValue::encode(jsUndefined());
</ins><span class="cx">     }
</span><span class="cx">     RELEASE_ASSERT_NOT_REACHED();
</span><span class="cx"> }
</span><span class="lines">@@ -248,9 +252,9 @@
</span><span class="cx"> 
</span><span class="cx">     putDirectWithoutTransition(vm, vm.propertyNames-&gt;toString, globalObject-&gt;arrayProtoToStringFunction(), DontEnum);
</span><span class="cx"> 
</span><del>-    JSC_NATIVE_GETTER(vm.propertyNames-&gt;buffer, typedArrayViewProtoGetterFuncBuffer, DontEnum | ReadOnly | DontDelete);
-    JSC_NATIVE_INTRINSIC_GETTER(vm.propertyNames-&gt;byteLength, typedArrayViewProtoGetterFuncByteLength, DontEnum | ReadOnly | DontDelete, TypedArrayByteLengthIntrinsic);
-    JSC_NATIVE_INTRINSIC_GETTER(vm.propertyNames-&gt;byteOffset, typedArrayViewProtoGetterFuncByteOffset, DontEnum | ReadOnly | DontDelete, TypedArrayByteOffsetIntrinsic);
</del><ins>+    JSC_NATIVE_GETTER(vm.propertyNames-&gt;buffer, typedArrayViewProtoGetterFuncBuffer, DontEnum | ReadOnly);
+    JSC_NATIVE_INTRINSIC_GETTER(vm.propertyNames-&gt;byteLength, typedArrayViewProtoGetterFuncByteLength, DontEnum | ReadOnly, TypedArrayByteLengthIntrinsic);
+    JSC_NATIVE_INTRINSIC_GETTER(vm.propertyNames-&gt;byteOffset, typedArrayViewProtoGetterFuncByteOffset, DontEnum | ReadOnly, TypedArrayByteOffsetIntrinsic);
</ins><span class="cx">     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(&quot;copyWithin&quot;, typedArrayViewProtoFuncCopyWithin, DontEnum, 2);
</span><span class="cx">     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(&quot;every&quot;, typedArrayPrototypeEveryCodeGenerator, DontEnum);
</span><span class="cx">     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(&quot;filter&quot;, typedArrayPrototypeFilterCodeGenerator, DontEnum);
</span><span class="lines">@@ -274,8 +278,12 @@
</span><span class="cx">     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(&quot;some&quot;, typedArrayPrototypeSomeCodeGenerator, DontEnum);
</span><span class="cx">     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames-&gt;subarray, typedArrayViewProtoFuncSubarray, DontEnum, 2);
</span><span class="cx">     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames-&gt;toLocaleString, typedArrayPrototypeToLocaleStringCodeGenerator, DontEnum);
</span><del>-    JSC_NATIVE_GETTER(vm.propertyNames-&gt;toStringTagSymbol, typedArrayViewProtoGetterFuncToStringTag, DontEnum | ReadOnly);
</del><span class="cx"> 
</span><ins>+    JSFunction* toStringTagFunction = JSFunction::create(vm, globalObject, 0, ASCIILiteral(&quot;get [Symbol.toStringTag]&quot;), typedArrayViewProtoGetterFuncToStringTag, NoIntrinsic);
+    GetterSetter* toStringTagAccessor = GetterSetter::create(vm, globalObject);
+    toStringTagAccessor-&gt;setGetter(vm, globalObject, toStringTagFunction);
+    putDirectNonIndexAccessor(vm, vm.propertyNames-&gt;toStringTagSymbol, toStringTagAccessor, DontEnum | ReadOnly);
+
</ins><span class="cx">     JSFunction* valuesFunction = JSFunction::createBuiltinFunction(vm, typedArrayPrototypeValuesCodeGenerator(vm), globalObject);
</span><span class="cx"> 
</span><span class="cx">     putDirectWithoutTransition(vm, vm.propertyNames-&gt;builtinNames().valuesPublicName(), valuesFunction, DontEnum);
</span></span></pre>
</div>
</div>

</body>
</html>