<!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>[211473] 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/211473">211473</a></dd>
<dt>Author</dt> <dd>utatane.tea@gmail.com</dd>
<dt>Date</dt> <dd>2017-02-01 02:00:32 -0800 (Wed, 01 Feb 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Propagate networking errors correctly for import() operator
https://bugs.webkit.org/show_bug.cgi?id=167501

Reviewed by Ryosuke Niwa.

.:

* Source/ModuleFetchFailureKind.h: Added.

Source/WebCore:

We use the promise chain inside the module loader pipeline.
The problem is that,

1. The errors of loading module scripts are propagated through the promise's rejection.
2. Some module related errors like syntax error (when scanning module dependencies) are
   reported at loading time (evaluating time). These errors are propagated through the
   promise rejections and dumped to the console. LoadableModuleScript set catch handler
   for that and print these errors to the console for ScriptElement.
3. Some of errors are already reported to the console. For example, networking errors
   are reported by the CachedModuleLoader.
4. But there is no way to distinguish between (2) and (3) at the catch handler.

Previously, we propagate the special symbol for the already reported errors to distinguish
that. This was OK because these errors cannot be catched by the user code. However,
recent `import()` call needs to expose these errors to the user code. So now, accidentally,
the special purpose symbol is exposed.

Instead of propagating the special symbol, this patch just propagates the errors. But these
error objects are annotated with the private symbol. So these errors can be distinguished
from the other ones.

Currently, we do not have the way to expose the error details to the client of the
CachedScript. So we just report the error with the failed / canceled. This should be
more descriptive error messages in the separate patch[1].

[1]: https://bugs.webkit.org/show_bug.cgi?id=167553

Tests: http/tests/security/mixedContent/import-insecure-script-in-iframe.html
       js/dom/modules/import-not-found-error.html

* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMPromise.h:
(WebCore::DeferredPromise::resolveWithCallback):
(WebCore::DeferredPromise::rejectWithCallback):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::setupModuleScriptHandlers):
* bindings/js/ScriptController.h:
(WebCore::ScriptController::moduleLoaderAlreadyReportedErrorSymbol): Deleted.
(WebCore::ScriptController::moduleLoaderFetchingIsCanceledSymbol): Deleted.
* bindings/js/ScriptModuleLoader.cpp:
(WebCore::rejectToPropagateNetworkError):
(WebCore::ScriptModuleLoader::fetch):
(WebCore::ScriptModuleLoader::notifyFinished):
* bindings/js/WebCoreBuiltinNames.h:

LayoutTests:

* http/tests/security/mixedContent/import-insecure-script-in-iframe-expected.txt: Added.
* http/tests/security/mixedContent/import-insecure-script-in-iframe.html: Added.
* http/tests/security/mixedContent/resources/frame-with-insecure-import.html: Added.
* js/dom/modules/import-not-found-error-expected.txt: Added.
* js/dom/modules/import-not-found-error.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkChangeLog">trunk/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMPromiseh">trunk/Source/WebCore/bindings/js/JSDOMPromise.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsScriptControllercpp">trunk/Source/WebCore/bindings/js/ScriptController.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsScriptControllerh">trunk/Source/WebCore/bindings/js/ScriptController.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsScriptModuleLoadercpp">trunk/Source/WebCore/bindings/js/ScriptModuleLoader.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsWebCoreBuiltinNamesh">trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestshttptestssecuritymixedContentimportinsecurescriptiniframeexpectedtxt">trunk/LayoutTests/http/tests/security/mixedContent/import-insecure-script-in-iframe-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritymixedContentimportinsecurescriptiniframehtml">trunk/LayoutTests/http/tests/security/mixedContent/import-insecure-script-in-iframe.html</a></li>
<li><a href="#trunkLayoutTestshttptestssecuritymixedContentresourcesframewithinsecureimporthtml">trunk/LayoutTests/http/tests/security/mixedContent/resources/frame-with-insecure-import.html</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesimportnotfounderrorexpectedtxt">trunk/LayoutTests/js/dom/modules/import-not-found-error-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdommodulesimportnotfounderrorhtml">trunk/LayoutTests/js/dom/modules/import-not-found-error.html</a></li>
<li><a href="#trunkSourceModuleFetchFailureKindh">trunk/Source/ModuleFetchFailureKind.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/ChangeLog (211472 => 211473)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/ChangeLog        2017-02-01 07:55:44 UTC (rev 211472)
+++ trunk/ChangeLog        2017-02-01 10:00:32 UTC (rev 211473)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2017-02-01  Yusuke Suzuki  &lt;utatane.tea@gmail.com&gt;
+
+        Propagate networking errors correctly for import() operator
+        https://bugs.webkit.org/show_bug.cgi?id=167501
+
+        Reviewed by Ryosuke Niwa.
+
+        * Source/ModuleFetchFailureKind.h: Added.
+
</ins><span class="cx"> 2017-01-31  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.15.4 release.
</span></span></pre></div>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (211472 => 211473)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-02-01 07:55:44 UTC (rev 211472)
+++ trunk/LayoutTests/ChangeLog        2017-02-01 10:00:32 UTC (rev 211473)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2017-02-01  Yusuke Suzuki  &lt;utatane.tea@gmail.com&gt;
+
+        Propagate networking errors correctly for import() operator
+        https://bugs.webkit.org/show_bug.cgi?id=167501
+
+        Reviewed by Ryosuke Niwa.
+
+        * http/tests/security/mixedContent/import-insecure-script-in-iframe-expected.txt: Added.
+        * http/tests/security/mixedContent/import-insecure-script-in-iframe.html: Added.
+        * http/tests/security/mixedContent/resources/frame-with-insecure-import.html: Added.
+        * js/dom/modules/import-not-found-error-expected.txt: Added.
+        * js/dom/modules/import-not-found-error.html: Added.
+
</ins><span class="cx"> 2017-01-31  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Regression (Safari 10.1): Pressing Return in a contenteditable no longer inserts a line break under certain conditions
</span></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritymixedContentimportinsecurescriptiniframeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/mixedContent/import-insecure-script-in-iframe-expected.txt (0 => 211473)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/mixedContent/import-insecure-script-in-iframe-expected.txt                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/mixedContent/import-insecure-script-in-iframe-expected.txt        2017-02-01 10:00:32 UTC (rev 211473)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+CONSOLE MESSAGE: line 1: [blocked] The page at https://127.0.0.1:8443/security/mixedContent/resources/frame-with-insecure-import.html was not allowed to run insecure content from http://127.0.0.1:8080/security/mixedContent/resources/script.js.
+
+This test loads a secure iframe that attempt to import() a module script via HTTP. Since the iframe's content is of a secure origin, importing a module script via HTTP should result in a mixed content error.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS window.data is &quot;TypeError: Importing a module script failed.&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritymixedContentimportinsecurescriptiniframehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/mixedContent/import-insecure-script-in-iframe.html (0 => 211473)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/mixedContent/import-insecure-script-in-iframe.html                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/mixedContent/import-insecure-script-in-iframe.html        2017-02-01 10:00:32 UTC (rev 211473)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+description(`This test loads a secure iframe that attempt to import() a module script via HTTP.
+Since the iframe's content is of a secure origin, importing a module script via HTTP should result
+in a mixed content error.
+`);
+window.jsTestIsAsync = true;
+window.data = null;
+window.addEventListener(&quot;message&quot;, function (error) {
+    window.data = error.data;
+    shouldBe(`window.data`, `&quot;TypeError: Importing a module script failed.&quot;`);
+    finishJSTest();
+}, false);
+&lt;/script&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;p&gt;&lt;/p&gt;
+&lt;iframe src=&quot;https://127.0.0.1:8443/security/mixedContent/resources/frame-with-insecure-import.html&quot;&gt;&lt;/iframe&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestssecuritymixedContentresourcesframewithinsecureimporthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/security/mixedContent/resources/frame-with-insecure-import.html (0 => 211473)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/security/mixedContent/resources/frame-with-insecure-import.html                                (rev 0)
+++ trunk/LayoutTests/http/tests/security/mixedContent/resources/frame-with-insecure-import.html        2017-02-01 10:00:32 UTC (rev 211473)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+&lt;script&gt;
+window.onload = function() {
+    import(&quot;http://127.0.0.1:8080/security/mixedContent/resources/script.js&quot;).catch(function (error) {
+        if (window.parent)
+            window.parent.postMessage(String(error), '*');
+    });
+};
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesimportnotfounderrorexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/import-not-found-error-expected.txt (0 => 211473)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/import-not-found-error-expected.txt                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/import-not-found-error-expected.txt        2017-02-01 10:00:32 UTC (rev 211473)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+Test import with non existing module.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS String(error) is &quot;TypeError: Importing a module script failed.&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsdommodulesimportnotfounderrorhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/dom/modules/import-not-found-error.html (0 => 211473)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/modules/import-not-found-error.html                                (rev 0)
+++ trunk/LayoutTests/js/dom/modules/import-not-found-error.html        2017-02-01 10:00:32 UTC (rev 211473)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+description('Test import with non existing module.');
+
+window.jsTestIsAsync = true;
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+var error = null;
+(async function () {
+    try {
+        await import(`./resources/import-not-found.js`);
+    } catch (e) {
+        error = e;
+    }
+    shouldBeEqualToString(`String(error)`, `TypeError: Importing a module script failed.`);
+    finishJSTest();
+}());
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkSourceModuleFetchFailureKindh"></a>
<div class="addfile"><h4>Added: trunk/Source/ModuleFetchFailureKind.h (0 => 211473)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/ModuleFetchFailureKind.h                                (rev 0)
+++ trunk/Source/ModuleFetchFailureKind.h        2017-02-01 10:00:32 UTC (rev 211473)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+/*
+ * Copyright (C) 2017 Yusuke Suzuki &lt;utatane.tea@gmail.com&gt;
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+namespace WebCore {
+
+enum class ModuleFetchFailureKind {
+    WasErrored,
+    WasCanceled,
+};
+
+} // namespace WebCore
+
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (211472 => 211473)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-02-01 07:55:44 UTC (rev 211472)
+++ trunk/Source/WebCore/ChangeLog        2017-02-01 10:00:32 UTC (rev 211473)
</span><span class="lines">@@ -1,3 +1,55 @@
</span><ins>+2017-02-01  Yusuke Suzuki  &lt;utatane.tea@gmail.com&gt;
+
+        Propagate networking errors correctly for import() operator
+        https://bugs.webkit.org/show_bug.cgi?id=167501
+
+        Reviewed by Ryosuke Niwa.
+
+        We use the promise chain inside the module loader pipeline.
+        The problem is that,
+
+        1. The errors of loading module scripts are propagated through the promise's rejection.
+        2. Some module related errors like syntax error (when scanning module dependencies) are
+           reported at loading time (evaluating time). These errors are propagated through the
+           promise rejections and dumped to the console. LoadableModuleScript set catch handler
+           for that and print these errors to the console for ScriptElement.
+        3. Some of errors are already reported to the console. For example, networking errors
+           are reported by the CachedModuleLoader.
+        4. But there is no way to distinguish between (2) and (3) at the catch handler.
+
+        Previously, we propagate the special symbol for the already reported errors to distinguish
+        that. This was OK because these errors cannot be catched by the user code. However,
+        recent `import()` call needs to expose these errors to the user code. So now, accidentally,
+        the special purpose symbol is exposed.
+
+        Instead of propagating the special symbol, this patch just propagates the errors. But these
+        error objects are annotated with the private symbol. So these errors can be distinguished
+        from the other ones.
+
+        Currently, we do not have the way to expose the error details to the client of the
+        CachedScript. So we just report the error with the failed / canceled. This should be
+        more descriptive error messages in the separate patch[1].
+
+        [1]: https://bugs.webkit.org/show_bug.cgi?id=167553
+
+        Tests: http/tests/security/mixedContent/import-insecure-script-in-iframe.html
+               js/dom/modules/import-not-found-error.html
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/JSDOMPromise.h:
+        (WebCore::DeferredPromise::resolveWithCallback):
+        (WebCore::DeferredPromise::rejectWithCallback):
+        * bindings/js/ScriptController.cpp:
+        (WebCore::ScriptController::setupModuleScriptHandlers):
+        * bindings/js/ScriptController.h:
+        (WebCore::ScriptController::moduleLoaderAlreadyReportedErrorSymbol): Deleted.
+        (WebCore::ScriptController::moduleLoaderFetchingIsCanceledSymbol): Deleted.
+        * bindings/js/ScriptModuleLoader.cpp:
+        (WebCore::rejectToPropagateNetworkError):
+        (WebCore::ScriptModuleLoader::fetch):
+        (WebCore::ScriptModuleLoader::notifyFinished):
+        * bindings/js/WebCoreBuiltinNames.h:
+
</ins><span class="cx"> 2017-01-31  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Regression (Safari 10.1): Pressing Return in a contenteditable no longer inserts a line break under certain conditions
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (211472 => 211473)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-02-01 07:55:44 UTC (rev 211472)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-02-01 10:00:32 UTC (rev 211473)
</span><span class="lines">@@ -2675,6 +2675,7 @@
</span><span class="cx">                 6F995A391A70833700A735F4 /* JSWebGLVertexArrayObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6F995A2F1A70833700A735F4 /* JSWebGLVertexArrayObject.cpp */; };
</span><span class="cx">                 6F995A3A1A70833700A735F4 /* JSWebGLVertexArrayObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 6F995A301A70833700A735F4 /* JSWebGLVertexArrayObject.h */; };
</span><span class="cx">                 6FA4454E898F2FC168BC38C1 /* JSBeforeUnloadEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 29E04A27BED2F81F98E9022B /* JSBeforeUnloadEvent.h */; };
</span><ins>+                709A01FE1E3D0BDD006B0D4C /* ModuleFetchFailureKind.h in Headers */ = {isa = PBXBuildFile; fileRef = 709A01FD1E3D0BCC006B0D4C /* ModuleFetchFailureKind.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 70F546E8B8B5D7DC54EE144E /* JSBeforeUnloadEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8225432CA9D4B4CF4628EC7F /* JSBeforeUnloadEvent.cpp */; };
</span><span class="cx">                 7117445914BC34EC00EE5FC8 /* SVGTextMetricsBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 7117445714BC34E200EE5FC8 /* SVGTextMetricsBuilder.h */; };
</span><span class="cx">                 7118FED415685CC60030B79A /* JSSVGViewSpec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7118FED215685CC60030B79A /* JSSVGViewSpec.cpp */; };
</span><span class="lines">@@ -10045,6 +10046,7 @@
</span><span class="cx">                 6F995A2F1A70833700A735F4 /* JSWebGLVertexArrayObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGLVertexArrayObject.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 6F995A301A70833700A735F4 /* JSWebGLVertexArrayObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGLVertexArrayObject.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 6FAD4A561A9D0FAE009F7D3C /* OpenGLESSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OpenGLESSPI.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                709A01FD1E3D0BCC006B0D4C /* ModuleFetchFailureKind.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModuleFetchFailureKind.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 71004B9A1DC1109300A52A38 /* elapsed-time-support.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = &quot;elapsed-time-support.js&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 71004B9B1DC1109300A52A38 /* remaining-time-support.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = &quot;remaining-time-support.js&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 71004B9D1DC1398800A52A38 /* playback-support.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = &quot;playback-support.js&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -22198,6 +22200,7 @@
</span><span class="cx">                                 BC53DA2D1143121E000D817E /* DOMWrapperWorld.h */,
</span><span class="cx">                                 1432E8480C51493F00B1500F /* GCController.cpp */,
</span><span class="cx">                                 1432E8460C51493800B1500F /* GCController.h */,
</span><ins>+                                709A01FD1E3D0BCC006B0D4C /* ModuleFetchFailureKind.h */,
</ins><span class="cx">                                 C585A66011D4FAC5004C3E4B /* IDBBindingUtilities.cpp */,
</span><span class="cx">                                 C585A66111D4FAC5004C3E4B /* IDBBindingUtilities.h */,
</span><span class="cx">                                 E157A8EE18185425009F821D /* JSCryptoAlgorithmBuilder.cpp */,
</span><span class="lines">@@ -25990,6 +25993,7 @@
</span><span class="cx">                                 A81369D0097374F600D74463 /* HTMLFormElement.h in Headers */,
</span><span class="cx">                                 A871DE2B0A152AC800B12A68 /* HTMLFrameElement.h in Headers */,
</span><span class="cx">                                 14FFE31D0AE1963300136BF5 /* HTMLFrameElementBase.h in Headers */,
</span><ins>+                                709A01FE1E3D0BDD006B0D4C /* ModuleFetchFailureKind.h in Headers */,
</ins><span class="cx">                                 93E241FF0B2B4E4000C732A1 /* HTMLFrameOwnerElement.h in Headers */,
</span><span class="cx">                                 A871DE280A152AC800B12A68 /* HTMLFrameSetElement.h in Headers */,
</span><span class="cx">                                 A871DE2D0A152AC800B12A68 /* HTMLHeadElement.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMPromiseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMPromise.h (211472 => 211473)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMPromise.h        2017-02-01 07:55:44 UTC (rev 211472)
+++ trunk/Source/WebCore/bindings/js/JSDOMPromise.h        2017-02-01 10:00:32 UTC (rev 211473)
</span><span class="lines">@@ -94,8 +94,8 @@
</span><span class="cx">     void reject(ExceptionCode, const String&amp; = { });
</span><span class="cx">     void reject(const JSC::PrivateName&amp;);
</span><span class="cx"> 
</span><del>-    template&lt;typename Callback, typename Value&gt;
-    void resolveWithCallback(Callback callback, Value value)
</del><ins>+    template&lt;typename Callback&gt;
+    void resolveWithCallback(Callback callback)
</ins><span class="cx">     {
</span><span class="cx">         if (isSuspended())
</span><span class="cx">             return;
</span><span class="lines">@@ -103,9 +103,21 @@
</span><span class="cx">         ASSERT(m_globalObject);
</span><span class="cx">         JSC::ExecState* exec = m_globalObject-&gt;globalExec();
</span><span class="cx">         JSC::JSLockHolder locker(exec);
</span><del>-        resolve(*exec, callback(*exec, *m_globalObject.get(), std::forward&lt;Value&gt;(value)));
</del><ins>+        resolve(*exec, callback(*exec, *m_globalObject.get()));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    template&lt;typename Callback&gt;
+    void rejectWithCallback(Callback callback)
+    {
+        if (isSuspended())
+            return;
+        ASSERT(m_deferred);
+        ASSERT(m_globalObject);
+        JSC::ExecState* exec = m_globalObject-&gt;globalExec();
+        JSC::JSLockHolder locker(exec);
+        reject(*exec, callback(*exec, *m_globalObject.get()));
+    }
+
</ins><span class="cx">     JSC::JSValue promise() const;
</span><span class="cx"> 
</span><span class="cx">     bool isSuspended() { return !m_deferred || !canInvokeCallback(); } // The wrapper world has gone away or active DOM objects have been suspended.
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsScriptControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ScriptController.cpp (211472 => 211473)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ScriptController.cpp        2017-02-01 07:55:44 UTC (rev 211472)
+++ trunk/Source/WebCore/bindings/js/ScriptController.cpp        2017-02-01 10:00:32 UTC (rev 211473)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx"> #include &quot;LoadableModuleScript.h&quot;
</span><span class="cx"> #include &quot;MainFrame.h&quot;
</span><span class="cx"> #include &quot;MemoryPressureHandler.h&quot;
</span><ins>+#include &quot;ModuleFetchFailureKind.h&quot;
</ins><span class="cx"> #include &quot;NP_jsobject.h&quot;
</span><span class="cx"> #include &quot;Page.h&quot;
</span><span class="cx"> #include &quot;PageConsoleClient.h&quot;
</span><span class="lines">@@ -379,9 +380,6 @@
</span><span class="cx">     // For example, if the page load is canceled, the DeferredPromise used in the module loader pipeline will stop executing JS code.
</span><span class="cx">     // Thus the promise returned from this function could remain unresolved.
</span><span class="cx"> 
</span><del>-    JSC::PrivateName moduleLoaderAlreadyReportedErrorSymbol = m_moduleLoaderAlreadyReportedErrorSymbol;
-    JSC::PrivateName moduleLoaderFetchingIsCanceledSymbol = m_moduleLoaderFetchingIsCanceledSymbol;
-
</del><span class="cx">     RefPtr&lt;LoadableModuleScript&gt; moduleScript(&amp;moduleScriptRef);
</span><span class="cx"> 
</span><span class="cx">     auto&amp; fulfillHandler = *JSNativeStdFunction::create(state.vm(), shell.window(), 1, String(), [moduleScript](ExecState* exec) {
</span><span class="lines">@@ -390,22 +388,26 @@
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     });
</span><span class="cx"> 
</span><del>-    auto&amp; rejectHandler = *JSNativeStdFunction::create(state.vm(), shell.window(), 1, String(), [moduleScript, moduleLoaderAlreadyReportedErrorSymbol, moduleLoaderFetchingIsCanceledSymbol](ExecState* exec) {
-        JSValue error = exec-&gt;argument(0);
</del><ins>+    auto&amp; rejectHandler = *JSNativeStdFunction::create(state.vm(), shell.window(), 1, String(), [moduleScript](ExecState* exec) {
</ins><span class="cx">         VM&amp; vm = exec-&gt;vm();
</span><del>-        if (auto* symbol = jsDynamicCast&lt;Symbol*&gt;(vm, error)) {
-            if (symbol-&gt;privateName() == moduleLoaderAlreadyReportedErrorSymbol) {
-                moduleScript-&gt;notifyLoadFailed(LoadableScript::Error {
-                    LoadableScript::ErrorType::CachedScript,
-                    std::nullopt
-                });
</del><ins>+        JSValue errorValue = exec-&gt;argument(0);
+        if (errorValue.isObject()) {
+            auto* object = JSC::asObject(errorValue);
+            if (JSValue failureKindValue = object-&gt;getDirect(vm, static_cast&lt;JSVMClientData&amp;&gt;(*vm.clientData).builtinNames().failureKindPrivateName())) {
+                // This is host propagated error in the module loader pipeline.
+                switch (static_cast&lt;ModuleFetchFailureKind&gt;(failureKindValue.asInt32())) {
+                case ModuleFetchFailureKind::WasErrored:
+                    moduleScript-&gt;notifyLoadFailed(LoadableScript::Error {
+                        LoadableScript::ErrorType::CachedScript,
+                        std::nullopt
+                    });
+                    break;
+                case ModuleFetchFailureKind::WasCanceled:
+                    moduleScript-&gt;notifyLoadWasCanceled();
+                    break;
+                }
</ins><span class="cx">                 return JSValue::encode(jsUndefined());
</span><span class="cx">             }
</span><del>-
-            if (symbol-&gt;privateName() == moduleLoaderFetchingIsCanceledSymbol) {
-                moduleScript-&gt;notifyLoadWasCanceled();
-                return JSValue::encode(jsUndefined());
-            }
</del><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         auto scope = DECLARE_CATCH_SCOPE(vm);
</span><span class="lines">@@ -414,7 +416,7 @@
</span><span class="cx">             LoadableScript::ConsoleMessage {
</span><span class="cx">                 MessageSource::JS,
</span><span class="cx">                 MessageLevel::Error,
</span><del>-                retrieveErrorMessage(*exec, vm, error, scope),
</del><ins>+                retrieveErrorMessage(*exec, vm, errorValue, scope),
</ins><span class="cx">             }
</span><span class="cx">         });
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsScriptControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ScriptController.h (211472 => 211473)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ScriptController.h        2017-02-01 07:55:44 UTC (rev 211472)
+++ trunk/Source/WebCore/bindings/js/ScriptController.h        2017-02-01 10:00:32 UTC (rev 211473)
</span><span class="lines">@@ -147,9 +147,6 @@
</span><span class="cx"> 
</span><span class="cx">     const String* sourceURL() const { return m_sourceURL; } // 0 if we are not evaluating any script
</span><span class="cx"> 
</span><del>-    const JSC::PrivateName&amp; moduleLoaderAlreadyReportedErrorSymbol() const { return m_moduleLoaderAlreadyReportedErrorSymbol; }
-    const JSC::PrivateName&amp; moduleLoaderFetchingIsCanceledSymbol() const { return m_moduleLoaderFetchingIsCanceledSymbol; }
-
</del><span class="cx">     void clearWindowShellsNotMatchingDOMWindow(DOMWindow*, bool goingIntoPageCache);
</span><span class="cx">     void setDOMWindowForWindowShell(DOMWindow*);
</span><span class="cx">     void updateDocument();
</span><span class="lines">@@ -192,8 +189,6 @@
</span><span class="cx">     const String* m_sourceURL;
</span><span class="cx"> 
</span><span class="cx">     bool m_paused;
</span><del>-    JSC::PrivateName m_moduleLoaderAlreadyReportedErrorSymbol;
-    JSC::PrivateName m_moduleLoaderFetchingIsCanceledSymbol;
</del><span class="cx"> 
</span><span class="cx">     // The root object used for objects bound outside the context of a plugin, such
</span><span class="cx">     // as NPAPI plugins. The plugins using these objects prevent a page from being cached so they
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsScriptModuleLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/ScriptModuleLoader.cpp (211472 => 211473)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/ScriptModuleLoader.cpp        2017-02-01 07:55:44 UTC (rev 211472)
+++ trunk/Source/WebCore/bindings/js/ScriptModuleLoader.cpp        2017-02-01 10:00:32 UTC (rev 211473)
</span><span class="lines">@@ -34,8 +34,10 @@
</span><span class="cx"> #include &quot;JSDOMBinding.h&quot;
</span><span class="cx"> #include &quot;LoadableModuleScript.h&quot;
</span><span class="cx"> #include &quot;MIMETypeRegistry.h&quot;
</span><ins>+#include &quot;ModuleFetchFailureKind.h&quot;
</ins><span class="cx"> #include &quot;ScriptController.h&quot;
</span><span class="cx"> #include &quot;ScriptSourceCode.h&quot;
</span><ins>+#include &quot;WebCoreJSClientData.h&quot;
</ins><span class="cx"> #include &lt;runtime/Completion.h&gt;
</span><span class="cx"> #include &lt;runtime/JSInternalPromise.h&gt;
</span><span class="cx"> #include &lt;runtime/JSInternalPromiseDeferred.h&gt;
</span><span class="lines">@@ -123,6 +125,20 @@
</span><span class="cx">     return jsPromise.promise();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void rejectToPropagateNetworkError(DeferredPromise&amp; deferred, ModuleFetchFailureKind failureKind, ASCIILiteral message)
+{
+    deferred.rejectWithCallback([&amp;] (JSC::ExecState&amp; state, JSDOMGlobalObject&amp;) {
+        // We annotate exception with special private symbol. It allows us to distinguish these errors from the user thrown ones.
+        JSC::VM&amp; vm = state.vm();
+        // FIXME: Propagate more descriptive error.
+        // https://bugs.webkit.org/show_bug.cgi?id=167553
+        auto* error = JSC::createTypeError(&amp;state, message);
+        ASSERT(error);
+        error-&gt;putDirect(vm, static_cast&lt;JSVMClientData&amp;&gt;(*vm.clientData).builtinNames().failureKindPrivateName(), JSC::jsNumber(static_cast&lt;int32_t&gt;(failureKind)));
+        return error;
+    });
+}
+
</ins><span class="cx"> JSC::JSInternalPromise* ScriptModuleLoader::fetch(JSC::JSGlobalObject* jsGlobalObject, JSC::ExecState* exec, JSC::JSModuleLoader*, JSC::JSValue moduleKeyValue, JSC::JSValue scriptFetcher)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(JSC::jsDynamicCast&lt;JSC::JSScriptFetcher*&gt;(exec-&gt;vm(), scriptFetcher));
</span><span class="lines">@@ -148,15 +164,13 @@
</span><span class="cx">         return jsPromise.promise();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (auto* frame = m_document.frame()) {
-        auto loader = CachedModuleScriptLoader::create(*this, deferred.get(), *static_cast&lt;CachedScriptFetcher*&gt;(JSC::jsCast&lt;JSC::JSScriptFetcher*&gt;(scriptFetcher)-&gt;fetcher()));
-        m_loaders.add(loader.copyRef());
-        if (!loader-&gt;load(m_document, completedURL)) {
-            loader-&gt;clearClient();
-            m_loaders.remove(WTFMove(loader));
-            deferred-&gt;reject(frame-&gt;script().moduleLoaderAlreadyReportedErrorSymbol());
-            return jsPromise.promise();
-        }
</del><ins>+    auto loader = CachedModuleScriptLoader::create(*this, deferred.get(), *static_cast&lt;CachedScriptFetcher*&gt;(JSC::jsCast&lt;JSC::JSScriptFetcher*&gt;(scriptFetcher)-&gt;fetcher()));
+    m_loaders.add(loader.copyRef());
+    if (!loader-&gt;load(m_document, completedURL)) {
+        loader-&gt;clearClient();
+        m_loaders.remove(WTFMove(loader));
+        rejectToPropagateNetworkError(deferred.get(), ModuleFetchFailureKind::WasErrored, ASCIILiteral(&quot;Importing a module script failed.&quot;));
+        return jsPromise.promise();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return jsPromise.promise();
</span><span class="lines">@@ -232,43 +246,34 @@
</span><span class="cx"> 
</span><span class="cx">     auto&amp; cachedScript = *loader.cachedScript();
</span><span class="cx"> 
</span><del>-    bool failed = false;
-
</del><span class="cx">     if (cachedScript.resourceError().isAccessControl()) {
</span><span class="cx">         promise-&gt;reject(TypeError, ASCIILiteral(&quot;Cross-origin script load denied by Cross-Origin Resource Sharing policy.&quot;));
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (cachedScript.errorOccurred())
-        failed = true;
-    else if (!MIMETypeRegistry::isSupportedJavaScriptMIMEType(cachedScript.response().mimeType())) {
-        // https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-single-module-script
-        // The result of extracting a MIME type from response's header list (ignoring parameters) is not a JavaScript MIME type.
-        // For historical reasons, fetching a classic script does not include MIME type checking. In contrast, module scripts will fail to load if they are not of a correct MIME type.
-        promise-&gt;reject(TypeError, makeString(&quot;'&quot;, cachedScript.response().mimeType(), &quot;' is not a valid JavaScript MIME type.&quot;));
</del><ins>+    if (cachedScript.errorOccurred()) {
+        rejectToPropagateNetworkError(*promise, ModuleFetchFailureKind::WasErrored, ASCIILiteral(&quot;Importing a module script failed.&quot;));
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    auto* frame = m_document.frame();
-    if (!frame)
</del><ins>+    if (cachedScript.wasCanceled()) {
+        rejectToPropagateNetworkError(*promise, ModuleFetchFailureKind::WasCanceled, ASCIILiteral(&quot;Importing a module script is canceled.&quot;));
</ins><span class="cx">         return;
</span><del>-
-    if (failed) {
-        // Reject a promise to propagate the error back all the way through module promise chains to the script element.
-        promise-&gt;reject(frame-&gt;script().moduleLoaderAlreadyReportedErrorSymbol());
-        return;
</del><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (cachedScript.wasCanceled()) {
-        promise-&gt;reject(frame-&gt;script().moduleLoaderFetchingIsCanceledSymbol());
</del><ins>+    if (!MIMETypeRegistry::isSupportedJavaScriptMIMEType(cachedScript.response().mimeType())) {
+        // https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-single-module-script
+        // The result of extracting a MIME type from response's header list (ignoring parameters) is not a JavaScript MIME type.
+        // For historical reasons, fetching a classic script does not include MIME type checking. In contrast, module scripts will fail to load if they are not of a correct MIME type.
+        promise-&gt;reject(TypeError, makeString(&quot;'&quot;, cachedScript.response().mimeType(), &quot;' is not a valid JavaScript MIME type.&quot;));
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     m_requestURLToResponseURLMap.add(cachedScript.url(), cachedScript.response().url());
</span><del>-    ScriptSourceCode scriptSourceCode(&amp;cachedScript, JSC::SourceProviderSourceType::Module, loader.scriptFetcher());
-    promise-&gt;resolveWithCallback([] (JSC::ExecState&amp; state, JSDOMGlobalObject&amp;, JSC::SourceCode sourceCode) {
-        return JSC::JSSourceCode::create(state.vm(), WTFMove(sourceCode));
-    }, scriptSourceCode.jsSourceCode());
</del><ins>+    promise-&gt;resolveWithCallback([&amp;] (JSC::ExecState&amp; state, JSDOMGlobalObject&amp;) {
+        return JSC::JSSourceCode::create(state.vm(),
+            JSC::SourceCode { ScriptSourceCode { &amp;cachedScript, JSC::SourceProviderSourceType::Module, loader.scriptFetcher() }.jsSourceCode() });
+    });
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsWebCoreBuiltinNamesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h (211472 => 211473)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h        2017-02-01 07:55:44 UTC (rev 211472)
+++ trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h        2017-02-01 10:00:32 UTC (rev 211473)
</span><span class="lines">@@ -45,6 +45,7 @@
</span><span class="cx">     macro(controller) \
</span><span class="cx">     macro(createReadableStreamSource) \
</span><span class="cx">     macro(disturbed) \
</span><ins>+    macro(failureKind) \
</ins><span class="cx">     macro(fetchRequest) \
</span><span class="cx">     macro(fillFromJS) \
</span><span class="cx">     macro(finishConsumingStream) \
</span></span></pre>
</div>
</div>

</body>
</html>