<!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>[207326] 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/207326">207326</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-10-13 23:31:40 -0700 (Thu, 13 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Exception message for expressions with multiple bracket accesses is inconsistent / incorrect
https://bugs.webkit.org/show_bug.cgi?id=163426

Patch by Joseph Pecoraro &lt;pecoraro@apple.com&gt; on 2016-10-13
Reviewed by Geoffrey Garen.

JSTests:

* ChakraCore/test/Error/CallNonFunction_3.baseline-jsc:
* ChakraCore/test/Object/null.baseline-jsc:
* stress/exception-in-to-property-key-should-be-handled-early.js:
Better exception messages.

LayoutTests/imported/w3c:

* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/endTime-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/id-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/pauseOnExit-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/startTime-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/track-expected.txt:
Better expection messages.

Source/JavaScriptCore:

* bytecompiler/NodesCodegen.cpp:
(JSC::BracketAccessorNode::emitBytecode):
It matters where emitExpressionInfo is called since it gathers
info about where we are in the instruction stream. We need to
emit it before the bytecode that we want to associate the data
with. In this case, before the getById / getByVal.

LayoutTests:

* js/exception-expression-offset-expected.txt:
* js/script-tests/exception-expression-offset.js:
(testException):
Correct existing tests and add new tests for multiple and intermixed
dot / bracket accesses.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkJSTestsChakraCoretestErrorCallNonFunction_3baselinejsc">trunk/JSTests/ChakraCore/test/Error/CallNonFunction_3.baseline-jsc</a></li>
<li><a href="#trunkJSTestsChakraCoretestObjectnullbaselinejsc">trunk/JSTests/ChakraCore/test/Object/null.baseline-jsc</a></li>
<li><a href="#trunkJSTestsChangeLog">trunk/JSTests/ChangeLog</a></li>
<li><a href="#trunkJSTestsstressexceptionintopropertykeyshouldbehandledearlyjs">trunk/JSTests/stress/exception-in-to-property-key-should-be-handled-early.js</a></li>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlsemanticsembeddedcontentmediaelementsinterfacesTextTrackCueendTimeexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/endTime-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlsemanticsembeddedcontentmediaelementsinterfacesTextTrackCueidexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/id-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlsemanticsembeddedcontentmediaelementsinterfacesTextTrackCuepauseOnExitexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/pauseOnExit-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlsemanticsembeddedcontentmediaelementsinterfacesTextTrackCuestartTimeexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/startTime-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestshtmlsemanticsembeddedcontentmediaelementsinterfacesTextTrackCuetrackexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/track-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsexceptionexpressionoffsetexpectedtxt">trunk/LayoutTests/js/exception-expression-offset-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsscripttestsexceptionexpressionoffsetjs">trunk/LayoutTests/js/script-tests/exception-expression-offset.js</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerNodesCodegencpp">trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkJSTestsChakraCoretestErrorCallNonFunction_3baselinejsc"></a>
<div class="modfile"><h4>Modified: trunk/JSTests/ChakraCore/test/Error/CallNonFunction_3.baseline-jsc (207325 => 207326)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JSTests/ChakraCore/test/Error/CallNonFunction_3.baseline-jsc        2016-10-14 06:29:36 UTC (rev 207325)
+++ trunk/JSTests/ChakraCore/test/Error/CallNonFunction_3.baseline-jsc        2016-10-14 06:31:40 UTC (rev 207326)
</span><span class="lines">@@ -12,7 +12,7 @@
</span><span class="cx"> TypeError (undefined): obj[1] is not a function. (In 'obj[1]()', 'obj[1]' is 1)
</span><span class="cx"> TypeError (undefined): 1 is not a constructor (evaluating 'new obj[1]()')
</span><span class="cx"> TypeError (undefined): null is not an object (evaluating 'n[1]')
</span><del>-TypeError (undefined): null is not an object (evaluating 'n')
</del><ins>+TypeError (undefined): null is not an object (evaluating 'new n[1]')
</ins><span class="cx"> TypeError (undefined): null is not an object (evaluating 'n.prop')
</span><span class="cx"> TypeError (undefined): null is not an object (evaluating 'new n.prop')
</span><span class="cx"> TypeError (undefined): n is not a function. (In 'n()', 'n' is null)
</span></span></pre></div>
<a id="trunkJSTestsChakraCoretestObjectnullbaselinejsc"></a>
<div class="modfile"><h4>Modified: trunk/JSTests/ChakraCore/test/Object/null.baseline-jsc (207325 => 207326)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JSTests/ChakraCore/test/Object/null.baseline-jsc        2016-10-14 06:29:36 UTC (rev 207325)
+++ trunk/JSTests/ChakraCore/test/Object/null.baseline-jsc        2016-10-14 06:31:40 UTC (rev 207326)
</span><span class="lines">@@ -1,37 +1,37 @@
</span><span class="cx"> 0 null is not an object (evaluating 'x.y')
</span><span class="cx"> 1 null is not an object (evaluating 'x.y = 5')
</span><span class="cx"> 2 null is not an object (evaluating 'delete x.y')
</span><del>-3 null is not an object (evaluating 'x')
</del><ins>+3 null is not an object (evaluating 'x[6]')
</ins><span class="cx"> 4 null is not an object (evaluating 'x[6] = 7')
</span><span class="cx"> 5 null is not an object (evaluating 'delete x[6]')
</span><span class="cx"> 6 undefined is not an object (evaluating 'x.y')
</span><span class="cx"> 7 undefined is not an object (evaluating 'x.y = 5')
</span><span class="cx"> 8 undefined is not an object (evaluating 'delete x.y')
</span><del>-9 undefined is not an object (evaluating 'x')
</del><ins>+9 undefined is not an object (evaluating 'x[6]')
</ins><span class="cx"> 10 undefined is not an object (evaluating 'x[6] = 7')
</span><span class="cx"> 11 undefined is not an object (evaluating 'delete x[6]')
</span><span class="cx"> 12 null is not an object (evaluating 'a[0].y')
</span><span class="cx"> 13 null is not an object (evaluating 'a[0].y = 5')
</span><span class="cx"> 14 null is not an object (evaluating 'delete a[0].y')
</span><del>-15 null is not an object (evaluating 'a[0]')
</del><ins>+15 null is not an object (evaluating 'a[0][6]')
</ins><span class="cx"> 16 null is not an object (evaluating 'a[0][6] = 7')
</span><span class="cx"> 17 null is not an object (evaluating 'delete a[0][6]')
</span><span class="cx"> 18 undefined is not an object (evaluating 'a[0].y')
</span><span class="cx"> 19 undefined is not an object (evaluating 'a[0].y = 5')
</span><span class="cx"> 20 undefined is not an object (evaluating 'delete a[0].y')
</span><del>-21 undefined is not an object (evaluating 'a[0]')
</del><ins>+21 undefined is not an object (evaluating 'a[0][6]')
</ins><span class="cx"> 22 undefined is not an object (evaluating 'a[0][6] = 7')
</span><span class="cx"> 23 undefined is not an object (evaluating 'delete a[0][6]')
</span><span class="cx"> 24 null is not an object (evaluating 'o.z.y')
</span><span class="cx"> 25 null is not an object (evaluating 'o.z.y = 5')
</span><span class="cx"> 26 null is not an object (evaluating 'delete o.z.y')
</span><del>-27 null is not an object (evaluating 'o.z')
</del><ins>+27 null is not an object (evaluating 'o.z[6]')
</ins><span class="cx"> 28 null is not an object (evaluating 'o.z[6] = 7')
</span><span class="cx"> 29 null is not an object (evaluating 'delete o.z[6]')
</span><span class="cx"> 30 undefined is not an object (evaluating 'o.z.y')
</span><span class="cx"> 31 undefined is not an object (evaluating 'o.z.y = 5')
</span><span class="cx"> 32 undefined is not an object (evaluating 'delete o.z.y')
</span><del>-33 undefined is not an object (evaluating 'o.z')
</del><ins>+33 undefined is not an object (evaluating 'o.z[6]')
</ins><span class="cx"> 34 undefined is not an object (evaluating 'o.z[6] = 7')
</span><span class="cx"> 35 undefined is not an object (evaluating 'delete o.z[6]')
</span><span class="cx"> count: 36 total: 36
</span></span></pre></div>
<a id="trunkJSTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/JSTests/ChangeLog (207325 => 207326)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JSTests/ChangeLog        2016-10-14 06:29:36 UTC (rev 207325)
+++ trunk/JSTests/ChangeLog        2016-10-14 06:31:40 UTC (rev 207326)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-10-13  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Exception message for expressions with multiple bracket accesses is inconsistent / incorrect
+        https://bugs.webkit.org/show_bug.cgi?id=163426
+
+        Reviewed by Geoffrey Garen.
+
+        * ChakraCore/test/Error/CallNonFunction_3.baseline-jsc:
+        * ChakraCore/test/Object/null.baseline-jsc:
+        * stress/exception-in-to-property-key-should-be-handled-early.js:
+        Better exception messages.
+
</ins><span class="cx"> 2016-10-13  Mark Lam  &lt;mark.lam@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix Array.prototype.splice ES6 compliance.
</span></span></pre></div>
<a id="trunkJSTestsstressexceptionintopropertykeyshouldbehandledearlyjs"></a>
<div class="modfile"><h4>Modified: trunk/JSTests/stress/exception-in-to-property-key-should-be-handled-early.js (207325 => 207326)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JSTests/stress/exception-in-to-property-key-should-be-handled-early.js        2016-10-14 06:29:36 UTC (rev 207325)
+++ trunk/JSTests/stress/exception-in-to-property-key-should-be-handled-early.js        2016-10-14 06:31:40 UTC (rev 207326)
</span><span class="lines">@@ -133,7 +133,7 @@
</span><span class="cx">     if (called)
</span><span class="cx">         throw new Error(called);
</span><span class="cx">     toStringCalled = false;
</span><del>-    shouldThrow(function () { test(null, 20, propertyKey); }, &quot;TypeError: null is not an object (near '...for (var i = 0; i &lt; length; ++i)...')&quot;);
</del><ins>+    shouldThrow(function () { test(null, 20, propertyKey); }, &quot;TypeError: null is not an object (evaluating 'array[property]')&quot;);
</ins><span class="cx">     if (toStringCalled)
</span><span class="cx">         throw new Error(&quot;toString is called.&quot;);
</span><span class="cx"> }());
</span></span></pre></div>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (207325 => 207326)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-10-14 06:29:36 UTC (rev 207325)
+++ trunk/LayoutTests/ChangeLog        2016-10-14 06:31:40 UTC (rev 207326)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2016-10-13  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Exception message for expressions with multiple bracket accesses is inconsistent / incorrect
+        https://bugs.webkit.org/show_bug.cgi?id=163426
+
+        Reviewed by Geoffrey Garen.
+
+        * js/exception-expression-offset-expected.txt:
+        * js/script-tests/exception-expression-offset.js:
+        (testException):
+        Correct existing tests and add new tests for multiple and intermixed
+        dot / bracket accesses.
+
</ins><span class="cx"> 2016-10-13  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Hosts of URLs with non-special schemes should be case-sensitive, and non-ASCII characters in such hosts should be punycode-encoded
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (207325 => 207326)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-10-14 06:29:36 UTC (rev 207325)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-10-14 06:31:40 UTC (rev 207326)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-10-13  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Exception message for expressions with multiple bracket accesses is inconsistent / incorrect
+        https://bugs.webkit.org/show_bug.cgi?id=163426
+
+        Reviewed by Geoffrey Garen.
+
+        * web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/endTime-expected.txt:
+        * web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/id-expected.txt:
+        * web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/pauseOnExit-expected.txt:
+        * web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/startTime-expected.txt:
+        * web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/track-expected.txt:
+        Better expection messages.
+
</ins><span class="cx"> 2016-10-13  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Hosts of URLs with non-special schemes should be case-sensitive, and non-ASCII characters in such hosts should be punycode-encoded
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlsemanticsembeddedcontentmediaelementsinterfacesTextTrackCueendTimeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/endTime-expected.txt (207325 => 207326)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/endTime-expected.txt        2016-10-14 06:29:36 UTC (rev 207325)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/endTime-expected.txt        2016-10-14 06:31:40 UTC (rev 207326)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><span class="cx"> 
</span><span class="cx"> PASS TextTrackCue.endTime, script-created cue 
</span><del>-FAIL TextTrackCue.endTime, parsed cue null is not an object (evaluating 'assert_equals')
</del><ins>+FAIL TextTrackCue.endTime, parsed cue null is not an object (evaluating 'c[0]')
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlsemanticsembeddedcontentmediaelementsinterfacesTextTrackCueidexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/id-expected.txt (207325 => 207326)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/id-expected.txt        2016-10-14 06:29:36 UTC (rev 207325)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/id-expected.txt        2016-10-14 06:31:40 UTC (rev 207326)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><span class="cx"> 
</span><span class="cx"> PASS TextTrackCue.id, script-created cue 
</span><del>-FAIL TextTrackCue.id, parsed cue null is not an object (evaluating 'assert_equals')
</del><ins>+FAIL TextTrackCue.id, parsed cue null is not an object (evaluating 'c[0]')
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlsemanticsembeddedcontentmediaelementsinterfacesTextTrackCuepauseOnExitexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/pauseOnExit-expected.txt (207325 => 207326)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/pauseOnExit-expected.txt        2016-10-14 06:29:36 UTC (rev 207325)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/pauseOnExit-expected.txt        2016-10-14 06:31:40 UTC (rev 207326)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><span class="cx"> 
</span><span class="cx"> PASS TextTrackCue.pauseOnExit, script-created cue 
</span><del>-FAIL TextTrackCue.pauseOnExit, parsed cue null is not an object (evaluating 't.track.cues')
</del><ins>+FAIL TextTrackCue.pauseOnExit, parsed cue null is not an object (evaluating 't.track.cues[0]')
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlsemanticsembeddedcontentmediaelementsinterfacesTextTrackCuestartTimeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/startTime-expected.txt (207325 => 207326)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/startTime-expected.txt        2016-10-14 06:29:36 UTC (rev 207325)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/startTime-expected.txt        2016-10-14 06:31:40 UTC (rev 207326)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><span class="cx"> 
</span><span class="cx"> PASS TextTrackCue.startTime, script-created cue 
</span><del>-FAIL TextTrackCue.startTime, parsed cue null is not an object (evaluating 'assert_equals')
</del><ins>+FAIL TextTrackCue.startTime, parsed cue null is not an object (evaluating 'c[0]')
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlsemanticsembeddedcontentmediaelementsinterfacesTextTrackCuetrackexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/track-expected.txt (207325 => 207326)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/track-expected.txt        2016-10-14 06:29:36 UTC (rev 207325)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/track-expected.txt        2016-10-14 06:31:40 UTC (rev 207326)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><span class="cx"> 
</span><span class="cx"> PASS TextTrackCue.track, script-created cue 
</span><del>-FAIL TextTrackCue.track, parsed cue null is not an object (evaluating 't.track.cues')
</del><ins>+FAIL TextTrackCue.track, parsed cue null is not an object (evaluating 't.track.cues[0]')
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsjsexceptionexpressionoffsetexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/exception-expression-offset-expected.txt (207325 => 207326)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/exception-expression-offset-expected.txt        2016-10-14 06:29:36 UTC (rev 207325)
+++ trunk/LayoutTests/js/exception-expression-offset-expected.txt        2016-10-14 06:31:40 UTC (rev 207326)
</span><span class="lines">@@ -5,85 +5,109 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> Testing 'undefined.a++'
</span><del>-FAIL ex.message == &quot;'undefined' is not an object (evaluating 'undefined.a')&quot; should be true. Was false.
</del><ins>+PASS ex.message is &quot;undefined is not an object (evaluating 'undefined.a')&quot;
</ins><span class="cx"> 
</span><span class="cx"> Testing '++undefined.a'
</span><del>-FAIL ex.message == &quot;'undefined' is not an object (evaluating 'undefined.a')&quot; should be true. Was false.
</del><ins>+PASS ex.message is &quot;undefined is not an object (evaluating 'undefined.a')&quot;
</ins><span class="cx"> 
</span><span class="cx"> Testing 'undefined[0]++'
</span><del>-FAIL ex.message == &quot;'undefined' is not an object (evaluating 'undefined[0]')&quot; should be true. Was false.
</del><ins>+PASS ex.message is &quot;undefined is not an object (evaluating 'undefined[0]')&quot;
</ins><span class="cx"> 
</span><span class="cx"> Testing '++undefined[1]'
</span><del>-FAIL ex.message == &quot;'undefined' is not an object (evaluating 'undefined[1]')&quot; should be true. Was false.
</del><ins>+PASS ex.message is &quot;undefined is not an object (evaluating 'undefined[1]')&quot;
</ins><span class="cx"> 
</span><span class="cx"> Testing 'undefined.b'
</span><del>-FAIL ex.message == &quot;'undefined' is not an object (evaluating 'undefined.b')&quot; should be true. Was false.
</del><ins>+PASS ex.message is &quot;undefined is not an object (evaluating 'undefined.b')&quot;
</ins><span class="cx"> 
</span><span class="cx"> Testing 'undefined[0]'
</span><del>-FAIL ex.message == &quot;'undefined' is not an object (evaluating 'undefined[0]')&quot; should be true. Was false.
</del><ins>+PASS ex.message is &quot;undefined is not an object (evaluating 'undefined[0]')&quot;
</ins><span class="cx"> 
</span><span class="cx"> Testing 'undefined.b += 1'
</span><del>-FAIL ex.message == &quot;'undefined' is not an object (evaluating 'undefined.b')&quot; should be true. Was false.
</del><ins>+PASS ex.message is &quot;undefined is not an object (evaluating 'undefined.b')&quot;
</ins><span class="cx"> 
</span><span class="cx"> Testing 'undefined[0] += 1'
</span><del>-FAIL ex.message == &quot;'undefined' is not an object (evaluating 'undefined[0]')&quot; should be true. Was false.
</del><ins>+PASS ex.message is &quot;undefined is not an object (evaluating 'undefined[0]')&quot;
</ins><span class="cx"> 
</span><span class="cx"> Testing 'undefined()'
</span><del>-FAIL ex.message == &quot;'undefined' is not a function (evaluating 'undefined()')&quot; should be true. Was false.
</del><ins>+PASS ex.message is &quot;undefined is not a function. (In 'undefined()', 'undefined' is undefined)&quot;
</ins><span class="cx"> 
</span><span class="cx"> Testing 'new undefined()'
</span><del>-FAIL ex.message == &quot;'undefined' is not a constructor (evaluating 'new undefined()')&quot; should be true. Was false.
</del><ins>+PASS ex.message is &quot;undefined is not a constructor (evaluating 'new undefined()')&quot;
</ins><span class="cx"> 
</span><span class="cx"> Testing '({}).b()'
</span><del>-FAIL ex.message == &quot;'undefined' is not a function (evaluating '({}).b()')&quot; should be true. Was false.
</del><ins>+PASS ex.message is &quot;({}).b is not a function. (In '({}).b()', '({}).b' is undefined)&quot;
</ins><span class="cx"> 
</span><span class="cx"> Testing 'new {}.b()'
</span><del>-FAIL ex.message == &quot;'undefined' is not a constructor (evaluating 'new {}.b()')&quot; should be true. Was false.
</del><ins>+PASS ex.message is &quot;undefined is not a constructor (evaluating 'new {}.b()')&quot;
</ins><span class="cx"> 
</span><span class="cx"> Testing '1()'
</span><del>-FAIL ex.message == &quot;'1' is not a function (evaluating '1()')&quot; should be true. Was false.
</del><ins>+PASS ex.message is &quot;1 is not a function. (In '1()', '1' is 1)&quot;
</ins><span class="cx"> 
</span><span class="cx"> Testing 'new 1()'
</span><del>-FAIL ex.message == &quot;'1' is not a constructor (evaluating 'new 1()')&quot; should be true. Was false.
</del><ins>+PASS ex.message is &quot;1 is not a constructor (evaluating 'new 1()')&quot;
</ins><span class="cx"> 
</span><span class="cx"> Testing 'throw { message : 'thrown object' }'
</span><del>-PASS ex.message == &quot;thrown object&quot; is true
</del><ins>+PASS ex.message is &quot;thrown object&quot;
</ins><span class="cx"> 
</span><span class="cx"> Testing '1 in undefined'
</span><del>-FAIL ex.message == &quot;'undefined' is not a valid argument for 'in' (evaluating '1 in undefined')&quot; should be true. Was false.
</del><ins>+PASS ex.message is &quot;undefined is not an Object. (evaluating '1 in undefined')&quot;
</ins><span class="cx"> 
</span><span class="cx"> Testing '1 instanceof undefined'
</span><del>-FAIL ex.message == &quot;'undefined' is not a valid argument for 'instanceof' (evaluating '1 instanceof undefined')&quot; should be true. Was false.
</del><ins>+PASS ex.message is &quot;Right hand side of instanceof is not an object&quot;
</ins><span class="cx"> 
</span><span class="cx"> Testing 'for (undefined.b in [1]) {}'
</span><del>-FAIL ex.message == &quot;'undefined' is not an object (evaluating 'undefined.b')&quot; should be true. Was false.
</del><ins>+PASS ex.message is &quot;undefined is not an object (evaluating 'undefined.b')&quot;
</ins><span class="cx"> 
</span><span class="cx"> Testing 'for (undefined[0] in [1]) {}'
</span><del>-FAIL ex.message == &quot;'undefined' is not an object (evaluating 'undefined[0]')&quot; should be true. Was false.
</del><ins>+PASS ex.message is &quot;undefined is not an object (evaluating 'undefined[0]')&quot;
</ins><span class="cx"> 
</span><span class="cx"> Testing 'undefined.a = 5'
</span><del>-FAIL ex.message == &quot;'undefined' is not an object (evaluating 'undefined.a = 5')&quot; should be true. Was false.
</del><ins>+PASS ex.message is &quot;undefined is not an object (evaluating 'undefined.a = 5')&quot;
</ins><span class="cx"> 
</span><span class="cx"> Testing 'undefined[0] = 5'
</span><del>-FAIL ex.message == &quot;'undefined' is not an object (evaluating 'undefined[0] = 5')&quot; should be true. Was false.
</del><ins>+PASS ex.message is &quot;undefined is not an object (evaluating 'undefined[0] = 5')&quot;
</ins><span class="cx"> 
</span><span class="cx"> Testing '({b:undefined}).b.a = 5'
</span><del>-FAIL ex.message == &quot;'undefined' is not an object (evaluating '({b:undefined}).b.a = 5')&quot; should be true. Was false.
</del><ins>+PASS ex.message is &quot;undefined is not an object (evaluating '({b:undefined}).b.a = 5')&quot;
</ins><span class="cx"> 
</span><span class="cx"> Testing '({b:undefined}).b[0] = 5'
</span><del>-FAIL ex.message == &quot;'undefined' is not an object (evaluating '({b:undefined}).b[0] = 5')&quot; should be true. Was false.
</del><ins>+PASS ex.message is &quot;undefined is not an object (evaluating '({b:undefined}).b[0] = 5')&quot;
</ins><span class="cx"> 
</span><span class="cx"> Testing 'undefined.a += 5'
</span><del>-FAIL ex.message == &quot;'undefined' is not an object (evaluating 'undefined.a')&quot; should be true. Was false.
</del><ins>+PASS ex.message is &quot;undefined is not an object (evaluating 'undefined.a')&quot;
</ins><span class="cx"> 
</span><span class="cx"> Testing 'undefined[0] += 5'
</span><del>-FAIL ex.message == &quot;'undefined' is not an object (evaluating 'undefined[0]')&quot; should be true. Was false.
</del><ins>+PASS ex.message is &quot;undefined is not an object (evaluating 'undefined[0]')&quot;
</ins><span class="cx"> 
</span><span class="cx"> Testing '({b:undefined}).b.a += 5'
</span><del>-FAIL ex.message == &quot;'undefined' is not an object (evaluating '({b:undefined}).b.a')&quot; should be true. Was false.
</del><ins>+PASS ex.message is &quot;undefined is not an object (evaluating '({b:undefined}).b.a')&quot;
</ins><span class="cx"> 
</span><span class="cx"> Testing '({b:undefined}).b[0] += 5'
</span><del>-FAIL ex.message == &quot;'undefined' is not an object (evaluating '({b:undefined}).b[0]')&quot; should be true. Was false.
</del><ins>+PASS ex.message is &quot;undefined is not an object (evaluating '({b:undefined}).b[0]')&quot;
+
+Testing '[].a.b.x'
+PASS ex.message is &quot;undefined is not an object (evaluating '[].a.b')&quot;
+
+Testing '[]['a']['b'].x'
+PASS ex.message is &quot;undefined is not an object (evaluating '[]['a']['b']')&quot;
+
+Testing '[].a['b'].x'
+PASS ex.message is &quot;undefined is not an object (evaluating '[].a['b']')&quot;
+
+Testing '[]['a'].b.x'
+PASS ex.message is &quot;undefined is not an object (evaluating '[]['a'].b')&quot;
+
+Testing 'func(undefined.x)'
+PASS ex.message is &quot;undefined is not an object (evaluating 'undefined.x')&quot;
+
+Testing 'func(null.x)'
+PASS ex.message is &quot;null is not an object (evaluating 'null.x')&quot;
+
+Testing 'func(undefined[0])'
+PASS ex.message is &quot;undefined is not an object (evaluating 'undefined[0]')&quot;
+
+Testing 'func(null[0])'
+PASS ex.message is &quot;null is not an object (evaluating 'null[0]')&quot;
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsjsscripttestsexceptionexpressionoffsetjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/script-tests/exception-expression-offset.js (207325 => 207326)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/script-tests/exception-expression-offset.js        2016-10-14 06:29:36 UTC (rev 207325)
+++ trunk/LayoutTests/js/script-tests/exception-expression-offset.js        2016-10-14 06:31:40 UTC (rev 207326)
</span><span class="lines">@@ -9,34 +9,46 @@
</span><span class="cx">     } catch (e) {
</span><span class="cx">         ex = e;
</span><span class="cx">         // begin/caret/end are not presently exposed in a web facing interface, so cannot be directly checked.
</span><del>-        shouldBeTrue('ex.message == &quot;' + message +'&quot;');
</del><ins>+        shouldBeEqualToString(&quot;ex.message&quot;, message);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-testException(&quot;undefined.a++&quot;, 0, 9, 11, &quot;'undefined' is not an object (evaluating 'undefined.a')&quot;);
-testException(&quot;++undefined.a&quot;, 2, 11, 13, &quot;'undefined' is not an object (evaluating 'undefined.a')&quot;);
-testException(&quot;undefined[0]++&quot;, 0, 9, 12, &quot;'undefined' is not an object (evaluating 'undefined[0]')&quot;);
-testException(&quot;++undefined[1]&quot;, 2, 11, 14, &quot;'undefined' is not an object (evaluating 'undefined[1]')&quot;);
-testException(&quot;undefined.b&quot;, 0, 9, 11, &quot;'undefined' is not an object (evaluating 'undefined.b')&quot;);
-testException(&quot;undefined[0]&quot;, 0, 9, 12, &quot;'undefined' is not an object (evaluating 'undefined[0]')&quot;);
-testException(&quot;undefined.b += 1&quot;, 0, 9, 11, &quot;'undefined' is not an object (evaluating 'undefined.b')&quot;);
-testException(&quot;undefined[0] += 1&quot;, 0, 9, 12, &quot;'undefined' is not an object (evaluating 'undefined[0]')&quot;);
-testException(&quot;undefined()&quot;, 0, 9, 11, &quot;'undefined' is not a function (evaluating 'undefined()')&quot;);
-testException(&quot;new undefined()&quot;, 0, 13, 15, &quot;'undefined' is not a constructor (evaluating 'new undefined()')&quot;);
-testException(&quot;({}).b()&quot;, 0, 6, 8, &quot;'undefined' is not a function (evaluating '({}).b()')&quot;);
-testException(&quot;new {}.b()&quot;, 0, 8, 10, &quot;'undefined' is not a constructor (evaluating 'new {}.b()')&quot;);
-testException(&quot;1()&quot;, 0, 1, 3, &quot;'1' is not a function (evaluating '1()')&quot;);
-testException(&quot;new 1()&quot;, 0, 5, 7, &quot;'1' is not a constructor (evaluating 'new 1()')&quot;);
</del><ins>+function func() {}
+
+testException(&quot;undefined.a++&quot;, 0, 9, 11, &quot;undefined is not an object (evaluating 'undefined.a')&quot;);
+testException(&quot;++undefined.a&quot;, 2, 11, 13, &quot;undefined is not an object (evaluating 'undefined.a')&quot;);
+testException(&quot;undefined[0]++&quot;, 0, 9, 12, &quot;undefined is not an object (evaluating 'undefined[0]')&quot;);
+testException(&quot;++undefined[1]&quot;, 2, 11, 14, &quot;undefined is not an object (evaluating 'undefined[1]')&quot;);
+testException(&quot;undefined.b&quot;, 0, 9, 11, &quot;undefined is not an object (evaluating 'undefined.b')&quot;);
+testException(&quot;undefined[0]&quot;, 0, 9, 12, &quot;undefined is not an object (evaluating 'undefined[0]')&quot;);
+testException(&quot;undefined.b += 1&quot;, 0, 9, 11, &quot;undefined is not an object (evaluating 'undefined.b')&quot;);
+testException(&quot;undefined[0] += 1&quot;, 0, 9, 12, &quot;undefined is not an object (evaluating 'undefined[0]')&quot;);
+testException(&quot;undefined()&quot;, 0, 9, 11, &quot;undefined is not a function. (In 'undefined()', 'undefined' is undefined)&quot;);
+testException(&quot;new undefined()&quot;, 0, 13, 15, &quot;undefined is not a constructor (evaluating 'new undefined()')&quot;);
+testException(&quot;({}).b()&quot;, 0, 6, 8, &quot;({}).b is not a function. (In '({}).b()', '({}).b' is undefined)&quot;);
+testException(&quot;new {}.b()&quot;, 0, 8, 10, &quot;undefined is not a constructor (evaluating 'new {}.b()')&quot;);
+testException(&quot;1()&quot;, 0, 1, 3, &quot;1 is not a function. (In '1()', '1' is 1)&quot;);
+testException(&quot;new 1()&quot;, 0, 5, 7, &quot;1 is not a constructor (evaluating 'new 1()')&quot;);
</ins><span class="cx"> testException(&quot;throw { message : 'thrown object' }&quot;, 0, undefined, 35, &quot;thrown object&quot;);
</span><del>-testException(&quot;1 in undefined&quot;, 0, 5, 14, &quot;'undefined' is not a valid argument for 'in' (evaluating '1 in undefined')&quot;);
-testException(&quot;1 instanceof undefined&quot;, 0, 13, 22, &quot;'undefined' is not a valid argument for 'instanceof' (evaluating '1 instanceof undefined')&quot;);
-testException(&quot;for (undefined.b in [1]) {}&quot;, 5, 14, 16, &quot;'undefined' is not an object (evaluating 'undefined.b')&quot;);
-testException(&quot;for (undefined[0] in [1]) {}&quot;, 5, 14, 17, &quot;'undefined' is not an object (evaluating 'undefined[0]')&quot;);
-testException(&quot;undefined.a = 5&quot;, 0, 9, 15, &quot;'undefined' is not an object (evaluating 'undefined.a = 5')&quot;);
-testException(&quot;undefined[0] = 5&quot;, 0, 9, 16, &quot;'undefined' is not an object (evaluating 'undefined[0] = 5')&quot;);
-testException(&quot;({b:undefined}).b.a = 5&quot;, 0, 17, 23, &quot;'undefined' is not an object (evaluating '({b:undefined}).b.a = 5')&quot;);
-testException(&quot;({b:undefined}).b[0] = 5&quot;, 0, 17, 24, &quot;'undefined' is not an object (evaluating '({b:undefined}).b[0] = 5')&quot;);
-testException(&quot;undefined.a += 5&quot;, 0, 9, 11, &quot;'undefined' is not an object (evaluating 'undefined.a')&quot;);
-testException(&quot;undefined[0] += 5&quot;, 0, 9, 12, &quot;'undefined' is not an object (evaluating 'undefined[0]')&quot;);
-testException(&quot;({b:undefined}).b.a += 5&quot;, 0, 17, 19, &quot;'undefined' is not an object (evaluating '({b:undefined}).b.a')&quot;);
-testException(&quot;({b:undefined}).b[0] += 5&quot;, 0, 17, 20, &quot;'undefined' is not an object (evaluating '({b:undefined}).b[0]')&quot;);
</del><ins>+testException(&quot;1 in undefined&quot;, 0, 5, 14, &quot;undefined is not an Object. (evaluating '1 in undefined')&quot;);
+testException(&quot;1 instanceof undefined&quot;, 0, 13, 22, &quot;Right hand side of instanceof is not an object&quot;);
+testException(&quot;for (undefined.b in [1]) {}&quot;, 5, 14, 16, &quot;undefined is not an object (evaluating 'undefined.b')&quot;);
+testException(&quot;for (undefined[0] in [1]) {}&quot;, 5, 14, 17, &quot;undefined is not an object (evaluating 'undefined[0]')&quot;);
+testException(&quot;undefined.a = 5&quot;, 0, 9, 15, &quot;undefined is not an object (evaluating 'undefined.a = 5')&quot;);
+testException(&quot;undefined[0] = 5&quot;, 0, 9, 16, &quot;undefined is not an object (evaluating 'undefined[0] = 5')&quot;);
+testException(&quot;({b:undefined}).b.a = 5&quot;, 0, 17, 23, &quot;undefined is not an object (evaluating '({b:undefined}).b.a = 5')&quot;);
+testException(&quot;({b:undefined}).b[0] = 5&quot;, 0, 17, 24, &quot;undefined is not an object (evaluating '({b:undefined}).b[0] = 5')&quot;);
+testException(&quot;undefined.a += 5&quot;, 0, 9, 11, &quot;undefined is not an object (evaluating 'undefined.a')&quot;);
+testException(&quot;undefined[0] += 5&quot;, 0, 9, 12, &quot;undefined is not an object (evaluating 'undefined[0]')&quot;);
+testException(&quot;({b:undefined}).b.a += 5&quot;, 0, 17, 19, &quot;undefined is not an object (evaluating '({b:undefined}).b.a')&quot;);
+testException(&quot;({b:undefined}).b[0] += 5&quot;, 0, 17, 20, &quot;undefined is not an object (evaluating '({b:undefined}).b[0]')&quot;);
+
+testException(&quot;[].a.b.x&quot;, 0, 4, 5, &quot;undefined is not an object (evaluating '[].a.b')&quot;);
+testException(&quot;[]['a']['b'].x&quot;, 0, 7, 11, &quot;undefined is not an object (evaluating '[]['a']['b']')&quot;);
+testException(&quot;[].a['b'].x&quot;, 0, 4, 8, &quot;undefined is not an object (evaluating '[].a['b']')&quot;);
+testException(&quot;[]['a'].b.x&quot;, 0, 7, 8, &quot;undefined is not an object (evaluating '[]['a'].b')&quot;);
+
+testException(&quot;func(undefined.x)&quot;, 5, 14, 15, &quot;undefined is not an object (evaluating 'undefined.x')&quot;);
+testException(&quot;func(null.x)&quot;, 5, 9, 10, &quot;null is not an object (evaluating 'null.x')&quot;);
+testException(&quot;func(undefined[0])&quot;, 5, 14, 16, &quot;undefined is not an object (evaluating 'undefined[0]')&quot;);
+testException(&quot;func(null[0])&quot;, 5, 9, 11, &quot;null is not an object (evaluating 'null[0]')&quot;);
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (207325 => 207326)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-10-14 06:29:36 UTC (rev 207325)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-10-14 06:31:40 UTC (rev 207326)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-10-13  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Exception message for expressions with multiple bracket accesses is inconsistent / incorrect
+        https://bugs.webkit.org/show_bug.cgi?id=163426
+
+        Reviewed by Geoffrey Garen.
+
+        * bytecompiler/NodesCodegen.cpp:
+        (JSC::BracketAccessorNode::emitBytecode):
+        It matters where emitExpressionInfo is called since it gathers
+        info about where we are in the instruction stream. We need to
+        emit it before the bytecode that we want to associate the data
+        with. In this case, before the getById / getByVal.
+
</ins><span class="cx"> 2016-10-13  Mark Lam  &lt;mark.lam@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix Array.prototype.splice ES6 compliance.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerNodesCodegencpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp (207325 => 207326)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp        2016-10-14 06:29:36 UTC (rev 207325)
+++ trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp        2016-10-14 06:31:40 UTC (rev 207326)
</span><span class="lines">@@ -633,15 +633,17 @@
</span><span class="cx">         RefPtr&lt;RegisterID&gt; finalDest = generator.finalDestination(dst);
</span><span class="cx">         RefPtr&lt;RegisterID&gt; thisValue = generator.ensureThis();
</span><span class="cx">         RefPtr&lt;RegisterID&gt; superBase = emitSuperBaseForCallee(generator);
</span><ins>+
</ins><span class="cx">         if (isNonIndexStringElement(*m_subscript)) {
</span><span class="cx">             const Identifier&amp; id = static_cast&lt;StringNode*&gt;(m_subscript)-&gt;value();
</span><ins>+            generator.emitExpressionInfo(divot(), divotStart(), divotEnd());
</ins><span class="cx">             generator.emitGetById(finalDest.get(), superBase.get(), thisValue.get(), id);
</span><span class="cx">         } else  {
</span><span class="cx">             RefPtr&lt;RegisterID&gt; subscript = generator.emitNode(m_subscript);
</span><ins>+            generator.emitExpressionInfo(divot(), divotStart(), divotEnd());
</ins><span class="cx">             generator.emitGetByVal(finalDest.get(), superBase.get(), thisValue.get(), subscript.get());
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        generator.emitExpressionInfo(divot(), divotStart(), divotEnd());
</del><span class="cx">         generator.emitProfileType(finalDest.get(), divotStart(), divotEnd());
</span><span class="cx">         return finalDest.get();
</span><span class="cx">     }
</span><span class="lines">@@ -651,15 +653,15 @@
</span><span class="cx"> 
</span><span class="cx">     if (isNonIndexStringElement(*m_subscript)) {
</span><span class="cx">         RefPtr&lt;RegisterID&gt; base = generator.emitNode(m_base);
</span><ins>+        generator.emitExpressionInfo(divot(), divotStart(), divotEnd());
</ins><span class="cx">         ret = generator.emitGetById(finalDest.get(), base.get(), static_cast&lt;StringNode*&gt;(m_subscript)-&gt;value());
</span><span class="cx">     } else {
</span><span class="cx">         RefPtr&lt;RegisterID&gt; base = generator.emitNodeForLeftHandSide(m_base, m_subscriptHasAssignments, m_subscript-&gt;isPure(generator));
</span><span class="cx">         RegisterID* property = generator.emitNode(m_subscript);
</span><ins>+        generator.emitExpressionInfo(divot(), divotStart(), divotEnd());
</ins><span class="cx">         ret = generator.emitGetByVal(finalDest.get(), base.get(), property);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    generator.emitExpressionInfo(divot(), divotStart(), divotEnd());
-
</del><span class="cx">     generator.emitProfileType(finalDest.get(), divotStart(), divotEnd());
</span><span class="cx">     return ret;
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>