<!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 <bpoulain@apple.com> on 2016-06-29
Reviewed by Keith Miller.
Source/JavaScriptCore:
* runtime/JSGenericTypedArrayViewConstructorInlines.h:
(JSC::JSGenericTypedArrayViewConstructor<ViewClass>::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 <bpoulain@apple.com>
+
+ [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 <pecoraro@apple.com>
</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 "new" keyword when using the constructors.'
</span><span class="cx"> );
</span><span class="cx">
</span><del>-shouldThrow("Int8Array()");
-shouldNotThrow("new Int8Array()");
</del><ins>+let arrayTypes = [
+ Int8Array,
+ Int16Array,
+ Int32Array,
+ Uint8Array,
+ Uint8ClampedArray,
+ Uint16Array,
+ Uint32Array,
+ Float32Array,
+ Float64Array,
+];
</ins><span class="cx">
</span><del>-shouldThrow("Int16Array()");
-shouldNotThrow("new Int16Array()");
</del><ins>+// The prototype should be the same for every type of view.
+for (let arrayType of arrayTypes) {
+ shouldThrow("" + arrayType.name + "()");
+ shouldNotThrow("new " + arrayType.name + "()");
+ shouldBe("" + arrayType.name + ".length", "0");
+}
</ins><span class="cx">
</span><del>-shouldThrow("Int32Array()");
-shouldNotThrow("new Int32Array()");
-
-shouldThrow("Uint8Array()");
-shouldNotThrow("new Uint8Array()");
-
-shouldThrow("Uint16Array()");
-shouldNotThrow("new Uint16Array()");
-
-shouldThrow("Uint32Array()");
-shouldNotThrow("new Uint32Array()");
-
-shouldThrow("Uint8ClampedArray()");
-shouldNotThrow("new Uint8ClampedArray()");
-
-shouldThrow("Float32Array()");
-shouldNotThrow("new Float32Array()");
-
-shouldThrow("Float64Array()");
-shouldNotThrow("new Float64Array()");
-
</del><span class="cx"> shouldThrow("DataView(new ArrayBuffer())");
</span><span class="cx"> shouldNotThrow("new DataView(new ArrayBuffer())");
</span><del>-
</del><ins>+shouldBe("DataView.length", "0");
</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, "buffer").get.name', 'get buffer');
+shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer").get.length', '0');
+shouldBeFalse('"writable" in Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer")');
+shouldBeFalse('Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer").enumerable');
+shouldBeTrue('Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer").configurable');
+shouldBeEqualToString('typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer").get', 'function');
+shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer").set', 'undefined');
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer").get.call()', "'TypeError: Receiver should be a typed array view but was not an object'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer").get.call(undefined)', "'TypeError: Receiver should be a typed array view but was not an object'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer").get.call(null)', "'TypeError: Receiver should be a typed array view but was not an object'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer").get.call(5)', "'TypeError: Receiver should be a typed array view but was not an object'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer").get.call([])', "'TypeError: Receiver should be a typed array view'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer").get.call({ foo: "bar" })', "'TypeError: Receiver should be a typed array view'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer").get.call(new ArrayBuffer(42))', "'TypeError: Receiver should be a typed array view'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer").get.call(new DataView(new ArrayBuffer(8), 0, 1))', "'TypeError: Receiver should be a typed array view'");
+
+// byteLength.
+shouldBeEqualToString('Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").get.name', 'get byteLength');
+shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").get.length', '0');
+shouldBeFalse('"writable" in Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength")');
+shouldBeFalse('Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").enumerable');
+shouldBeTrue('Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").configurable');
+shouldBeEqualToString('typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").get', 'function');
+shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").set', 'undefined');
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").get.call()', "'TypeError: Receiver should be a typed array view but was not an object'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").get.call(undefined)', "'TypeError: Receiver should be a typed array view but was not an object'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").get.call(null)', "'TypeError: Receiver should be a typed array view but was not an object'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").get.call(5)', "'TypeError: Receiver should be a typed array view but was not an object'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").get.call([])', "'TypeError: Receiver should be a typed array view'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").get.call({ foo: "bar" })', "'TypeError: Receiver should be a typed array view'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").get.call(new ArrayBuffer(42))', "'TypeError: Receiver should be a typed array view'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").get.call(new DataView(new ArrayBuffer(8), 0, 1))', "'TypeError: Receiver should be a typed array view'");
+
+// byteOffset.
+shouldBeEqualToString('Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").get.name', 'get byteOffset');
+shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").get.length', '0');
+shouldBeFalse('"writable" in Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset")');
+shouldBeFalse('Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").enumerable');
+shouldBeTrue('Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").configurable');
+shouldBeEqualToString('typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").get', 'function');
+shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").set', 'undefined');
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").get.call()', "'TypeError: Receiver should be a typed array view but was not an object'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").get.call(undefined)', "'TypeError: Receiver should be a typed array view but was not an object'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").get.call(null)', "'TypeError: Receiver should be a typed array view but was not an object'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").get.call(5)', "'TypeError: Receiver should be a typed array view but was not an object'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").get.call([])', "'TypeError: Receiver should be a typed array view'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").get.call({ foo: "bar" })', "'TypeError: Receiver should be a typed array view'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").get.call(new ArrayBuffer(42))', "'TypeError: Receiver should be a typed array view'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").get.call(new DataView(new ArrayBuffer(8), 0, 1))', "'TypeError: Receiver should be a typed array view'");
+
+// entries.
+shouldBeTrue('Object.getOwnPropertyDescriptor(TypedArray.prototype, "entries").writable');
+shouldBeFalse('Object.getOwnPropertyDescriptor(TypedArray.prototype, "entries").enumerable');
+shouldBeTrue('Object.getOwnPropertyDescriptor(TypedArray.prototype, "entries").configurable');
+shouldBeEqualToString('typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, "entries").value', 'function');
+shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, "entries").set', 'undefined');
+shouldThrow('TypedArray.prototype.entries.call()', "'TypeError: Receiver should be a typed array view'");
+shouldThrow('TypedArray.prototype.entries.call(undefined)', "'TypeError: Receiver should be a typed array view'");
+shouldThrow('TypedArray.prototype.entries.call(null)', "'TypeError: Receiver should be a typed array view'");
+shouldThrow('TypedArray.prototype.entries.call(5)', "'TypeError: Receiver should be a typed array view'");
+shouldThrow('TypedArray.prototype.entries.call([])', "'TypeError: Receiver should be a typed array view'");
+shouldThrow('TypedArray.prototype.entries.call({ foo: "bar" })', "'TypeError: Receiver should be a typed array view'");
+shouldThrow('TypedArray.prototype.entries.call(new ArrayBuffer(42))', "'TypeError: Receiver should be a typed array view'");
+shouldThrow('TypedArray.prototype.entries.call(new DataView(new ArrayBuffer(8), 0, 1))', "'TypeError: Receiver should be a typed array view'");
+
</ins><span class="cx"> // length.
</span><ins>+shouldBeEqualToString('Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").get.name', 'get length');
+shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").get.length', '0');
</ins><span class="cx"> shouldBeFalse('"writable" in Object.getOwnPropertyDescriptor(TypedArray.prototype, "length")');
</span><span class="cx"> shouldBeFalse('Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").enumerable');
</span><span class="cx"> shouldBeTrue('Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").configurable');
</span><del>-shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").get.length', '0');
</del><span class="cx"> shouldBeEqualToString('typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").get', 'function');
</span><span class="cx"> shouldBe('Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").set', 'undefined');
</span><ins>+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").get.call()', "'TypeError: Receiver should be a typed array view but was not an object'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").get.call(undefined)', "'TypeError: Receiver should be a typed array view but was not an object'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").get.call(null)', "'TypeError: Receiver should be a typed array view but was not an object'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").get.call(5)', "'TypeError: Receiver should be a typed array view but was not an object'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").get.call([])', "'TypeError: Receiver should be a typed array view'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").get.call({ foo: "bar" })', "'TypeError: Receiver should be a typed array view'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").get.call(new ArrayBuffer(42))', "'TypeError: Receiver should be a typed array view'");
+shouldThrow('Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").get.call(new DataView(new ArrayBuffer(8), 0, 1))', "'TypeError: Receiver should be a typed array view'");
</ins><span class="cx">
</span><ins>+// toLocaleString.
+shouldBeEqualToString('TypedArray.prototype.toLocaleString.name', 'toLocaleString');
+shouldBe('TypedArray.prototype.toLocaleString.length', '0');
+shouldBeTrue('Object.getOwnPropertyDescriptor(TypedArray.prototype, "toLocaleString").writable');
+shouldBeFalse('Object.getOwnPropertyDescriptor(TypedArray.prototype, "toLocaleString").enumerable');
+shouldBeTrue('Object.getOwnPropertyDescriptor(TypedArray.prototype, "toLocaleString").configurable');
+shouldBeEqualToString('typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, "toString").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, "toString").writable');
</span><span class="cx"> shouldBeFalse('Object.getOwnPropertyDescriptor(TypedArray.prototype, "toString").enumerable');
</span><span class="lines">@@ -37,8 +123,20 @@
</span><span class="cx"> shouldBeTrue('Object.getOwnPropertyDescriptor(TypedArray.prototype, "toString").configurable');
</span><span class="cx"> shouldBeEqualToString('typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, "toString").value', 'function');
</span><span class="cx">
</span><del>-// toLocaleString.
-shouldBeTrue('Object.getOwnPropertyDescriptor(TypedArray.prototype, "toLocaleString").writable');
-shouldBeFalse('Object.getOwnPropertyDescriptor(TypedArray.prototype, "toLocaleString").enumerable');
-shouldBeTrue('Object.getOwnPropertyDescriptor(TypedArray.prototype, "toLocaleString").configurable');
-shouldBeEqualToString('typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, "toString").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('"writable" 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: "bar" })', '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, "buffer").get.name is "get buffer"
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer").get.length is 0
+PASS "writable" in Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer") is false
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer").enumerable is false
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer").configurable is true
+PASS typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer").get is "function"
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer").set is undefined
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer").get.call() threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer").get.call(undefined) threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer").get.call(null) threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer").get.call(5) threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer").get.call([]) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer").get.call({ foo: "bar" }) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer").get.call(new ArrayBuffer(42)) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "buffer").get.call(new DataView(new ArrayBuffer(8), 0, 1)) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").get.name is "get byteLength"
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").get.length is 0
+PASS "writable" in Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength") is false
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").enumerable is false
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").configurable is true
+PASS typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").get is "function"
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").set is undefined
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").get.call() threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").get.call(undefined) threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").get.call(null) threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").get.call(5) threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").get.call([]) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").get.call({ foo: "bar" }) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").get.call(new ArrayBuffer(42)) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteLength").get.call(new DataView(new ArrayBuffer(8), 0, 1)) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").get.name is "get byteOffset"
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").get.length is 0
+PASS "writable" in Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset") is false
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").enumerable is false
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").configurable is true
+PASS typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").get is "function"
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").set is undefined
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").get.call() threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").get.call(undefined) threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").get.call(null) threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").get.call(5) threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").get.call([]) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").get.call({ foo: "bar" }) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").get.call(new ArrayBuffer(42)) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "byteOffset").get.call(new DataView(new ArrayBuffer(8), 0, 1)) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "entries").writable is true
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "entries").enumerable is false
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "entries").configurable is true
+PASS typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, "entries").value is "function"
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "entries").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: "bar" }) 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, "length").get.name is "get length"
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").get.length is 0
</ins><span class="cx"> PASS "writable" in Object.getOwnPropertyDescriptor(TypedArray.prototype, "length") is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").configurable is true
</span><del>-PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").get.length is 0
</del><span class="cx"> PASS typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").get is "function"
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").set is undefined
</span><ins>+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").get.call() threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").get.call(undefined) threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").get.call(null) threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").get.call(5) threw exception TypeError: Receiver should be a typed array view but was not an object.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").get.call([]) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").get.call({ foo: "bar" }) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").get.call(new ArrayBuffer(42)) threw exception TypeError: Receiver should be a typed array view.
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "length").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 "toLocaleString"
+PASS TypedArray.prototype.toLocaleString.length is 0
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "toLocaleString").writable is true
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "toLocaleString").enumerable is false
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "toLocaleString").configurable is true
+PASS typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, "toString").value is "function"
+PASS TypedArray.prototype.toString.name is "toString"
+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, "toString").writable is true
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "toString").enumerable is false
</span><span class="cx"> PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "toString").configurable is true
</span><span class="cx"> PASS typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, "toString").value is "function"
</span><del>-PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "toLocaleString").writable is true
-PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "toLocaleString").enumerable is false
-PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, "toLocaleString").configurable is true
-PASS typeof Object.getOwnPropertyDescriptor(TypedArray.prototype, "toString").value is "function"
</del><ins>+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).get.name is "get [Symbol.toStringTag]"
+PASS Object.getOwnPropertyDescriptor(TypedArray.prototype, Symbol.toStringTag).get.length is 0
+PASS "writable" 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 "function"
+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: "bar" }) 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 <bpoulain@apple.com>
+
+ [JSC] Minor TypedArray fixes
+ https://bugs.webkit.org/show_bug.cgi?id=159286
+
+ Reviewed by Keith Miller.
+
+ * runtime/JSGenericTypedArrayViewConstructorInlines.h:
+ (JSC::JSGenericTypedArrayViewConstructor<ViewClass>::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 <pecoraro@apple.com>
</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->prototype, prototype, DontEnum | DontDelete | ReadOnly);
</span><del>- putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(3), DontEnum | DontDelete | ReadOnly);
</del><ins>+ putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), DontEnum | DontDelete | ReadOnly);
</ins><span class="cx"> putDirectWithoutTransition(vm, vm.propertyNames->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<JSArrayBufferView*>(exec->argument(0));
- if (!thisObject)
</del><ins>+ JSValue argument = exec->argument(0);
+ if (!argument.isCell() || !isTypedView(argument.asCell()->classInfo()->typedArrayStorageType))
+ return throwVMTypeError(exec, "Receiver should be a typed array view");
+
+ JSArrayBufferView* thisObject = jsCast<JSArrayBufferView*>(argument);
+ if (!thisObject || thisObject->mode() == DataViewMode)
</ins><span class="cx"> return throwVMError(exec, createTypeError(exec, "Receiver should be a typed array view"));
</span><span class="cx"> if (thisObject->isNeutered())
</span><span class="cx"> return throwVMTypeError(exec, "Underlying ArrayBuffer has been detached from the view");
</span><span class="lines">@@ -203,7 +207,7 @@
</span><span class="cx"> {
</span><span class="cx"> JSValue thisValue = exec->thisValue();
</span><span class="cx"> if (!thisValue.isObject())
</span><del>- return throwVMError(exec, createTypeError(exec, "Receiver should be a typed array view but was not an object"));
</del><ins>+ return JSValue::encode(jsUndefined());
</ins><span class="cx">
</span><span class="cx"> VM& vm = exec->vm();
</span><span class="cx"> switch (thisValue.getObject()->classInfo()->typedArrayStorageType) {
</span><span class="lines">@@ -227,7 +231,7 @@
</span><span class="cx"> return JSValue::encode(jsString(&vm, "Uint16Array"));
</span><span class="cx"> case NotTypedArray:
</span><span class="cx"> case TypeDataView:
</span><del>- return throwVMError(exec, createTypeError(exec, "Receiver should be a typed array view"));
</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->toString, globalObject->arrayProtoToStringFunction(), DontEnum);
</span><span class="cx">
</span><del>- JSC_NATIVE_GETTER(vm.propertyNames->buffer, typedArrayViewProtoGetterFuncBuffer, DontEnum | ReadOnly | DontDelete);
- JSC_NATIVE_INTRINSIC_GETTER(vm.propertyNames->byteLength, typedArrayViewProtoGetterFuncByteLength, DontEnum | ReadOnly | DontDelete, TypedArrayByteLengthIntrinsic);
- JSC_NATIVE_INTRINSIC_GETTER(vm.propertyNames->byteOffset, typedArrayViewProtoGetterFuncByteOffset, DontEnum | ReadOnly | DontDelete, TypedArrayByteOffsetIntrinsic);
</del><ins>+ JSC_NATIVE_GETTER(vm.propertyNames->buffer, typedArrayViewProtoGetterFuncBuffer, DontEnum | ReadOnly);
+ JSC_NATIVE_INTRINSIC_GETTER(vm.propertyNames->byteLength, typedArrayViewProtoGetterFuncByteLength, DontEnum | ReadOnly, TypedArrayByteLengthIntrinsic);
+ JSC_NATIVE_INTRINSIC_GETTER(vm.propertyNames->byteOffset, typedArrayViewProtoGetterFuncByteOffset, DontEnum | ReadOnly, TypedArrayByteOffsetIntrinsic);
</ins><span class="cx"> JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("copyWithin", typedArrayViewProtoFuncCopyWithin, DontEnum, 2);
</span><span class="cx"> JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("every", typedArrayPrototypeEveryCodeGenerator, DontEnum);
</span><span class="cx"> JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("filter", typedArrayPrototypeFilterCodeGenerator, DontEnum);
</span><span class="lines">@@ -274,8 +278,12 @@
</span><span class="cx"> JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("some", typedArrayPrototypeSomeCodeGenerator, DontEnum);
</span><span class="cx"> JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->subarray, typedArrayViewProtoFuncSubarray, DontEnum, 2);
</span><span class="cx"> JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->toLocaleString, typedArrayPrototypeToLocaleStringCodeGenerator, DontEnum);
</span><del>- JSC_NATIVE_GETTER(vm.propertyNames->toStringTagSymbol, typedArrayViewProtoGetterFuncToStringTag, DontEnum | ReadOnly);
</del><span class="cx">
</span><ins>+ JSFunction* toStringTagFunction = JSFunction::create(vm, globalObject, 0, ASCIILiteral("get [Symbol.toStringTag]"), typedArrayViewProtoGetterFuncToStringTag, NoIntrinsic);
+ GetterSetter* toStringTagAccessor = GetterSetter::create(vm, globalObject);
+ toStringTagAccessor->setGetter(vm, globalObject, toStringTagFunction);
+ putDirectNonIndexAccessor(vm, vm.propertyNames->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->builtinNames().valuesPublicName(), valuesFunction, DontEnum);
</span></span></pre>
</div>
</div>
</body>
</html>