<!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>[269950] 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/269950">269950</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2020-11-18 02:55:25 -0800 (Wed, 18 Nov 2020)</dd>
</dl>

<h3>Log Message</h3>
<pre>Unreviewed, reverting <a href="http://trac.webkit.org/projects/webkit/changeset/269940">r269940</a>.
https://bugs.webkit.org/show_bug.cgi?id=219076

caused seemingly-infinite build time regression

Reverted changeset:

"[JSC] Implement WebAssembly.Memory with shared"
https://bugs.webkit.org/show_bug.cgi?id=218693
https://trac.webkit.org/changeset/269940</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkJSTestsChangeLog">trunk/JSTests/ChangeLog</a></li>
<li><a href="#trunkJSTestswasmjsapitest_memoryjs">trunk/JSTests/wasm/js-api/test_memory.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="#trunkLayoutTestsimportedw3cwebplatformtestshtmlwebappapisscriptingprocessingmodel2integrationwiththejavascriptagentformalismrequiressuccessanyworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/requires-success.any.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestswasmjsapimemoryconstructorsharedtentativeanyexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/constructor-shared.tentative.any-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestswasmjsapimemoryconstructorsharedtentativeanyworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/constructor-shared.tentative.any.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestswasmjsapimemoryconstructoranyexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/constructor.any-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestswasmjsapimemoryconstructoranyworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/constructor.any.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestswasmjsapimemorygrowanyexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/grow.any-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestswasmjsapimemorygrowanyworkerexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/grow.any.worker-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestswebaudiotheaudioapitheaudiobufferinterfaceaudiobuffercopychannelexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwinTestExpectations">trunk/LayoutTests/platform/win/TestExpectations</a></li>
<li><a href="#trunkSourceJavaScriptCoreCMakeListstxt">trunk/Source/JavaScriptCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj">trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceJavaScriptCorellintLLIntPCRangesh">trunk/Source/JavaScriptCore/llint/LLIntPCRanges.h</a></li>
<li><a href="#trunkSourceJavaScriptCorellintLowLevelInterpreterasm">trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm</a></li>
<li><a href="#trunkSourceJavaScriptCorellintWebAssemblyasm">trunk/Source/JavaScriptCore/llint/WebAssembly.asm</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSArrayBufferh">trunk/Source/JavaScriptCore/runtime/JSArrayBuffer.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSArrayBufferViewh">trunk/Source/JavaScriptCore/runtime/JSArrayBufferView.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSArrayBufferViewInlinesh">trunk/Source/JavaScriptCore/runtime/JSArrayBufferViewInlines.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSGenericTypedArrayViewh">trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeOptionscpp">trunk/Source/JavaScriptCore/runtime/Options.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmWasmAirIRGeneratorcpp">trunk/Source/JavaScriptCore/wasm/WasmAirIRGenerator.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmWasmB3IRGeneratorcpp">trunk/Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmWasmBindingcpp">trunk/Source/JavaScriptCore/wasm/WasmBinding.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmWasmFaultSignalHandlercpp">trunk/Source/JavaScriptCore/wasm/WasmFaultSignalHandler.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmWasmInstanceh">trunk/Source/JavaScriptCore/wasm/WasmInstance.h</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmWasmMemorycpp">trunk/Source/JavaScriptCore/wasm/WasmMemory.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmWasmMemoryh">trunk/Source/JavaScriptCore/wasm/WasmMemory.h</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmWasmMemoryInformationcpp">trunk/Source/JavaScriptCore/wasm/WasmMemoryInformation.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmWasmMemoryInformationh">trunk/Source/JavaScriptCore/wasm/WasmMemoryInformation.h</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmWasmMemoryModecpp">trunk/Source/JavaScriptCore/wasm/WasmMemoryMode.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmWasmMemoryModeh">trunk/Source/JavaScriptCore/wasm/WasmMemoryMode.h</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmjsJSToWasmcpp">trunk/Source/JavaScriptCore/wasm/js/JSToWasm.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmjsJSWebAssemblyInstancecpp">trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmjsJSWebAssemblyMemorycpp">trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyMemory.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmjsJSWebAssemblyMemoryh">trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyMemory.h</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmjsWebAssemblyFunctioncpp">trunk/Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmjsWebAssemblyMemoryConstructorcpp">trunk/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmjsWebAssemblyMemoryPrototypecpp">trunk/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryPrototype.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmjsWebAssemblyModuleRecordcpp">trunk/Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp</a></li>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfPlatformEnableh">trunk/Source/WTF/wtf/PlatformEnable.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreHeaderscmake">trunk/Source/WebCore/Headers.cmake</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIDBSerializationContextcpp">trunk/Source/WebCore/Modules/indexeddb/server/IDBSerializationContext.cpp</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsIDLTypesh">trunk/Source/WebCore/bindings/IDLTypes.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsCommonVMcpp">trunk/Source/WebCore/bindings/js/CommonVM.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertBufferSourceh">trunk/Source/WebCore/bindings/js/JSDOMConvertBufferSource.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMConvertUnionh">trunk/Source/WebCore/bindings/js/JSDOMConvertUnion.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsSerializedScriptValuecpp">trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsSerializedScriptValueh">trunk/Source/WebCore/bindings/js/SerializedScriptValue.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsWebCoreJSClientDatacpp">trunk/Source/WebCore/bindings/js/WebCoreJSClientData.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsWebCoreJSClientDatah">trunk/Source/WebCore/bindings/js/WebCoreJSClientData.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsWebCoreTypedArrayControllercpp">trunk/Source/WebCore/bindings/js/WebCoreTypedArrayController.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsWebCoreTypedArrayControllerh">trunk/Source/WebCore/bindings/js/WebCoreTypedArrayController.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsIDLAttributesjson">trunk/Source/WebCore/bindings/scripts/IDLAttributes.json</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestTestObjidl">trunk/Source/WebCore/bindings/scripts/test/TestObj.idl</a></li>
<li><a href="#trunkSourceWebCoredomTextDecoderidl">trunk/Source/WebCore/dom/TextDecoder.idl</a></li>
<li><a href="#trunkSourceWebCoredomTextDecoderStreamDecoderidl">trunk/Source/WebCore/dom/TextDecoderStreamDecoder.idl</a></li>
<li><a href="#trunkSourceWebCoredomTextEncoderidl">trunk/Source/WebCore/dom/TextEncoder.idl</a></li>
<li><a href="#trunkSourceWebCoreworkersDedicatedWorkerGlobalScopecpp">trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerGlobalScopecpp">trunk/Source/WebCore/workers/WorkerGlobalScope.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerGlobalScopeh">trunk/Source/WebCore/workers/WorkerGlobalScope.h</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerOrWorkletGlobalScopecpp">trunk/Source/WebCore/workers/WorkerOrWorkletGlobalScope.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerOrWorkletGlobalScopeh">trunk/Source/WebCore/workers/WorkerOrWorkletGlobalScope.h</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerOrWorkletScriptControllercpp">trunk/Source/WebCore/workers/WorkerOrWorkletScriptController.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerOrWorkletScriptControllerh">trunk/Source/WebCore/workers/WorkerOrWorkletScriptController.h</a></li>
<li><a href="#trunkSourceWebCoreworkersserviceServiceWorkerGlobalScopecpp">trunk/Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkletsWorkletGlobalScopecpp">trunk/Source/WebCore/worklets/WorkletGlobalScope.cpp</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkJSTestswasmfunctionteststraploadsharedjs">trunk/JSTests/wasm/function-tests/trap-load-shared.js</a></li>
<li><a href="#trunkJSTestswasmfunctionteststrapstoresharedjs">trunk/JSTests/wasm/function-tests/trap-store-shared.js</a></li>
<li><a href="#trunkJSTestswasmstresssharedmemoryerrorsjs">trunk/JSTests/wasm/stress/shared-memory-errors.js</a></li>
<li><a href="#trunkJSTestswasmstresssharedwasmmemorybufferjs">trunk/JSTests/wasm/stress/shared-wasm-memory-buffer.js</a></li>
<li>trunk/LayoutTests/js/dom/resources/</li>
<li><a href="#trunkLayoutTestsjsdomwebassemblymemorynormalfailexpectedtxt">trunk/LayoutTests/js/dom/webassembly-memory-normal-fail-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdomwebassemblymemorynormalfailhtml">trunk/LayoutTests/js/dom/webassembly-memory-normal-fail.html</a></li>
<li><a href="#trunkLayoutTestsjsdomwebassemblymemorysharedbasicexpectedtxt">trunk/LayoutTests/js/dom/webassembly-memory-shared-basic-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdomwebassemblymemorysharedbasichtml">trunk/LayoutTests/js/dom/webassembly-memory-shared-basic.html</a></li>
<li><a href="#trunkLayoutTestsjsdomwebassemblymemorysharedfailexpectedtxt">trunk/LayoutTests/js/dom/webassembly-memory-shared-fail-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdomwebassemblymemorysharedfailhtml">trunk/LayoutTests/js/dom/webassembly-memory-shared-fail.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbresourcessharedmemorystructuredclonejs">trunk/LayoutTests/storage/indexeddb/resources/shared-memory-structured-clone.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbsharedmemorystructuredcloneexpectedtxt">trunk/LayoutTests/storage/indexeddb/shared-memory-structured-clone-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbsharedmemorystructuredclonehtml">trunk/LayoutTests/storage/indexeddb/shared-memory-structured-clone.html</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerThreadTypeh">trunk/Source/WebCore/workers/WorkerThreadType.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkJSTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/JSTests/ChangeLog (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JSTests/ChangeLog  2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/JSTests/ChangeLog     2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2020-11-18  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, reverting r269940.
+        https://bugs.webkit.org/show_bug.cgi?id=219076
+
+        caused seemingly-infinite build time regression
+
+        Reverted changeset:
+
+        "[JSC] Implement WebAssembly.Memory with shared"
+        https://bugs.webkit.org/show_bug.cgi?id=218693
+        https://trac.webkit.org/changeset/269940
+
</ins><span class="cx"> 2020-11-16  Yusuke Suzuki  <ysuzuki@apple.com>
</span><span class="cx"> 
</span><span class="cx">         [JSC] Implement WebAssembly.Memory with shared
</span></span></pre></div>
<a id="trunkJSTestswasmfunctionteststraploadsharedjs"></a>
<div class="delfile"><h4>Deleted: trunk/JSTests/wasm/function-tests/trap-load-shared.js (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JSTests/wasm/function-tests/trap-load-shared.js    2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/JSTests/wasm/function-tests/trap-load-shared.js       2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -1,34 +0,0 @@
</span><del>-import Builder from '../Builder.js'
-import * as assert from '../assert.js'
-
-const pageSize = 64 * 1024;
-const numPages = 10;
-
-const builder = (new Builder())
-    .Type().End()
-    .Import()
-        .Memory("a", "b", {initial: numPages})
-    .End()
-    .Function().End()
-    .Export().Function("foo").End()
-    .Code()
-        .Function("foo", {params: ["i32"], ret: "i32"})
-            .GetLocal(0)
-            .I32Load(2, 0)
-            .Return()
-        .End()
-    .End();
-
-const bin = builder.WebAssembly().get();
-const module = new WebAssembly.Module(bin);
-const foo = new WebAssembly.Instance(module, {a: {b: new WebAssembly.Memory({initial: numPages, maximum: numPages * 2, shared: true})}}).exports.foo;
-
-function wasmFrameCountFromError(e) {
-    let stackFrames = e.stack.split("\n").filter((s) => s.indexOf("wasm-") !== -1);
-    return stackFrames.length;
-}
-
-for (let i = 0; i < 1000; i++) {
-    const e = assert.throws(() => foo(numPages * pageSize + 1), WebAssembly.RuntimeError, "Out of bounds memory access");
-    assert.eq(wasmFrameCountFromError(e), 2);
-}
</del></span></pre></div>
<a id="trunkJSTestswasmfunctionteststrapstoresharedjs"></a>
<div class="delfile"><h4>Deleted: trunk/JSTests/wasm/function-tests/trap-store-shared.js (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JSTests/wasm/function-tests/trap-store-shared.js   2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/JSTests/wasm/function-tests/trap-store-shared.js      2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -1,29 +0,0 @@
</span><del>-import Builder from '../Builder.js'
-import * as assert from '../assert.js'
-
-const pageSize = 64 * 1024;
-const numPages = 10;
-
-{
-    const builder = (new Builder())
-        .Type().End()
-        .Import()
-            .Memory("a", "b", {initial: numPages})
-        .End()
-        .Function().End()
-        .Export().Function("foo").End()
-        .Code()
-            .Function("foo", {params: ["i32", "i32"]})
-                .GetLocal(1)
-                .GetLocal(0)
-                .I32Store(2, 0)
-            .End()
-        .End();
-
-    const bin = builder.WebAssembly().get();
-    const module = new WebAssembly.Module(bin);
-    const foo = new WebAssembly.Instance(module, {a: {b: new WebAssembly.Memory({initial: numPages, maximum: numPages * 2, shared: true})}}).exports.foo;
-
-    for (let i = 0; i < 10000; i++)
-        assert.throws(() => foo(i, numPages * pageSize + 1), WebAssembly.RuntimeError, "Out of bounds memory access");
-}
</del></span></pre></div>
<a id="trunkJSTestswasmjsapitest_memoryjs"></a>
<div class="modfile"><h4>Modified: trunk/JSTests/wasm/js-api/test_memory.js (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JSTests/wasm/js-api/test_memory.js 2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/JSTests/wasm/js-api/test_memory.js    2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -124,7 +124,7 @@
</span><span class="cx"> 
</span><span class="cx"> {
</span><span class="cx">     assert.throws(() => new WebAssembly.Memory(20), TypeError, "WebAssembly.Memory expects its first argument to be an object"); 
</span><del>-    new WebAssembly.Memory({initial:1}, {});
</del><ins>+    assert.throws(() => new WebAssembly.Memory({}, {}), TypeError,  "WebAssembly.Memory expects exactly one argument");
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function test(f) {
</span></span></pre></div>
<a id="trunkJSTestswasmstresssharedmemoryerrorsjs"></a>
<div class="delfile"><h4>Deleted: trunk/JSTests/wasm/stress/shared-memory-errors.js (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JSTests/wasm/stress/shared-memory-errors.js        2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/JSTests/wasm/stress/shared-memory-errors.js   2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -1,10 +0,0 @@
</span><del>-import * as assert from '../assert.js';
-
-assert.throws(() => {
-    new WebAssembly.Memory({ initial: 1, shared: true });
-}, TypeError, `'maximum' page count must be defined if 'shared' is true`);
-
-assert.throws(() => {
-    let memory = new WebAssembly.Memory({ initial: 1, maximum: 2, shared: true });
-    memory.grow(3);
-}, RangeError, `WebAssembly.Memory.grow would exceed the memory's declared maximum size`);
</del></span></pre></div>
<a id="trunkJSTestswasmstresssharedwasmmemorybufferjs"></a>
<div class="delfile"><h4>Deleted: trunk/JSTests/wasm/stress/shared-wasm-memory-buffer.js (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JSTests/wasm/stress/shared-wasm-memory-buffer.js   2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/JSTests/wasm/stress/shared-wasm-memory-buffer.js      2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -1,24 +0,0 @@
</span><del>-import * as assert from '../assert.js'
-
-let pageSize = 64 << 10;
-let memory = new WebAssembly.Memory({
-    initial: 1,
-    maximum: 5,
-    shared: true,
-});
-let buffer1 = memory.buffer;
-assert.eq(buffer1.byteLength, pageSize * 1);
-assert.eq(buffer1, memory.buffer);
-
-memory.grow(1);
-let buffer2 = memory.buffer;
-assert.eq(buffer1.byteLength, pageSize * 1);
-assert.eq(buffer2.byteLength, pageSize * 2);
-assert.falsy(buffer1 === buffer2);
-
-let bytes1 = new Uint8Array(buffer1);
-let bytes2 = new Uint8Array(buffer2);
-bytes1[0] = 42;
-assert.eq(bytes2[0], 42);
-bytes2[0] = 43;
-assert.eq(bytes1[0], 43);
</del></span></pre></div>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog      2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/LayoutTests/ChangeLog 2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2020-11-18  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, reverting r269940.
+        https://bugs.webkit.org/show_bug.cgi?id=219076
+
+        caused seemingly-infinite build time regression
+
+        Reverted changeset:
+
+        "[JSC] Implement WebAssembly.Memory with shared"
+        https://bugs.webkit.org/show_bug.cgi?id=218693
+        https://trac.webkit.org/changeset/269940
+
</ins><span class="cx"> 2020-11-18  Carlos Garcia Campos  <cgarcia@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         Release assertion failure in Optional<WebCore::SimpleRange>::operator* via CompositeEditCommand::moveParagraphs
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog 2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/LayoutTests/imported/w3c/ChangeLog    2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2020-11-18  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, reverting r269940.
+        https://bugs.webkit.org/show_bug.cgi?id=219076
+
+        caused seemingly-infinite build time regression
+
+        Reverted changeset:
+
+        "[JSC] Implement WebAssembly.Memory with shared"
+        https://bugs.webkit.org/show_bug.cgi?id=218693
+        https://trac.webkit.org/changeset/269940
+
</ins><span class="cx"> 2020-11-16  Yusuke Suzuki  <ysuzuki@apple.com>
</span><span class="cx"> 
</span><span class="cx">         [JSC] Implement WebAssembly.Memory with shared
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmlwebappapisscriptingprocessingmodel2integrationwiththejavascriptagentformalismrequiressuccessanyworkerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/requires-success.any.worker-expected.txt (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/requires-success.any.worker-expected.txt  2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/requires-success.any.worker-expected.txt     2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -1,3 +1,3 @@
</span><span class="cx"> 
</span><del>-PASS [[CanBlock]] in a DedicatedWorkerGlobalScope
</del><ins>+FAIL [[CanBlock]] in a DedicatedWorkerGlobalScope Typed array for wait/notify must wrap a SharedArrayBuffer.
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestswasmjsapimemoryconstructorsharedtentativeanyexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/constructor-shared.tentative.any-expected.txt (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/constructor-shared.tentative.any-expected.txt        2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/constructor-shared.tentative.any-expected.txt   2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> 
</span><del>-PASS Shared memory without maximum
-PASS Order of evaluation for descriptor (with shared)
-PASS Shared memory
</del><ins>+FAIL Shared memory without maximum assert_throws_js: function "() => new WebAssembly.Memory({ "initial": 10, "shared": true })" did not throw
+FAIL Order of evaluation for descriptor (with shared) assert_array_equals: lengths differ, expected array ["initial", "initial valueOf", "maximum", "maximum valueOf", "shared"] length 5, got ["initial", "initial valueOf", "maximum", "maximum valueOf"] length 4
+FAIL Shared memory assert_equals: undefined: constructor expected true but got false
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestswasmjsapimemoryconstructorsharedtentativeanyworkerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/constructor-shared.tentative.any.worker-expected.txt (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/constructor-shared.tentative.any.worker-expected.txt 2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/constructor-shared.tentative.any.worker-expected.txt    2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> 
</span><del>-PASS Shared memory without maximum
-PASS Order of evaluation for descriptor (with shared)
-PASS Shared memory
</del><ins>+FAIL Shared memory without maximum assert_throws_js: function "() => new WebAssembly.Memory({ "initial": 10, "shared": true })" did not throw
+FAIL Order of evaluation for descriptor (with shared) assert_array_equals: lengths differ, expected array ["initial", "initial valueOf", "maximum", "maximum valueOf", "shared"] length 5, got ["initial", "initial valueOf", "maximum", "maximum valueOf"] length 4
+FAIL Shared memory assert_equals: undefined: constructor expected true but got false
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestswasmjsapimemoryconstructoranyexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/constructor.any-expected.txt (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/constructor.any-expected.txt 2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/constructor.any-expected.txt    2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -22,5 +22,5 @@
</span><span class="cx"> PASS Order of evaluation for descriptor
</span><span class="cx"> PASS Zero initial
</span><span class="cx"> PASS Non-zero initial
</span><del>-PASS Stray argument
</del><ins>+FAIL Stray argument WebAssembly.Memory expects exactly one argument
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestswasmjsapimemoryconstructoranyworkerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/constructor.any.worker-expected.txt (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/constructor.any.worker-expected.txt  2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/constructor.any.worker-expected.txt     2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -22,5 +22,5 @@
</span><span class="cx"> PASS Order of evaluation for descriptor
</span><span class="cx"> PASS Zero initial
</span><span class="cx"> PASS Non-zero initial
</span><del>-PASS Stray argument
</del><ins>+FAIL Stray argument WebAssembly.Memory expects exactly one argument
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestswasmjsapimemorygrowanyexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/grow.any-expected.txt (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/grow.any-expected.txt        2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/grow.any-expected.txt   2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -17,5 +17,5 @@
</span><span class="cx"> PASS Out-of-range argument: "0x100000000"
</span><span class="cx"> PASS Out-of-range argument: object "[object Object]"
</span><span class="cx"> PASS Stray argument
</span><del>-PASS Growing shared memory does not detach old buffer
</del><ins>+FAIL Growing shared memory does not detach old buffer assert_equals: Buffer before growing: constructor expected true but got false
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestswasmjsapimemorygrowanyworkerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/grow.any.worker-expected.txt (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/grow.any.worker-expected.txt 2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/memory/grow.any.worker-expected.txt    2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -17,5 +17,5 @@
</span><span class="cx"> PASS Out-of-range argument: "0x100000000"
</span><span class="cx"> PASS Out-of-range argument: object "[object Object]"
</span><span class="cx"> PASS Stray argument
</span><del>-PASS Growing shared memory does not detach old buffer
</del><ins>+FAIL Growing shared memory does not detach old buffer assert_equals: Buffer before growing: constructor expected true but got false
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestswebaudiotheaudioapitheaudiobufferinterfaceaudiobuffercopychannelexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel-expected.txt (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel-expected.txt 2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel-expected.txt    2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -19,9 +19,9 @@
</span><span class="cx"> PASS   5: buffer.copyFromChannel(x, 0, -1) did not throw an exception.
</span><span class="cx"> PASS   6: buffer.copyFromChannel(x, 0, 16) did not throw an exception.
</span><span class="cx"> PASS   7: buffer.copyFromChannel(x, 3) threw IndexSizeError: "Not a valid channelNumber.".
</span><del>-PASS   8: buffer.copyFromChannel(SharedArrayBuffer view, 0) threw TypeError: "Argument 1 ('destination') to AudioBuffer.copyFromChannel must be an instance of Float32Array".
-PASS   9: buffer.copyFromChannel(SharedArrayBuffer view, 0, 0) threw TypeError: "Argument 1 ('destination') to AudioBuffer.copyFromChannel must be an instance of Float32Array".
-PASS < [copyFrom-exceptions] All assertions passed. (total 11 assertions)
</del><ins>+FAIL X 8: buffer.copyFromChannel(SharedArrayBuffer view, 0) did not throw an exception. assert_true: expected true got false
+FAIL X 9: buffer.copyFromChannel(SharedArrayBuffer view, 0, 0) did not throw an exception. assert_true: expected true got false
+FAIL < [copyFrom-exceptions] 2 out of 11 assertions were failed. assert_true: expected true got false
</ins><span class="cx"> PASS > [copyTo-exceptions]
</span><span class="cx"> PASS   AudioBuffer.prototype.copyToChannel does exist.
</span><span class="cx"> PASS   0: buffer.copyToChannel(null, 0) threw TypeError: "Argument 1 ('source') to AudioBuffer.copyToChannel must be an instance of Float32Array".
</span><span class="lines">@@ -31,9 +31,9 @@
</span><span class="cx"> PASS   4: buffer.copyToChannel(x, 0, -1) did not throw an exception.
</span><span class="cx"> PASS   5: buffer.copyToChannel(x, 0, 16) did not throw an exception.
</span><span class="cx"> PASS   6: buffer.copyToChannel(x, 3) threw IndexSizeError: "Not a valid channelNumber.".
</span><del>-PASS   7: buffer.copyToChannel(SharedArrayBuffer view, 0) threw TypeError: "Argument 1 ('source') to AudioBuffer.copyToChannel must be an instance of Float32Array".
-PASS   8: buffer.copyToChannel(SharedArrayBuffer view, 0, 0) threw TypeError: "Argument 1 ('source') to AudioBuffer.copyToChannel must be an instance of Float32Array".
-PASS < [copyTo-exceptions] All assertions passed. (total 10 assertions)
</del><ins>+FAIL X 7: buffer.copyToChannel(SharedArrayBuffer view, 0) did not throw an exception. assert_true: expected true got false
+FAIL X 8: buffer.copyToChannel(SharedArrayBuffer view, 0, 0) did not throw an exception. assert_true: expected true got false
+FAIL < [copyTo-exceptions] 2 out of 10 assertions were failed. assert_true: expected true got false
</ins><span class="cx"> PASS > [copyFrom-validate]
</span><span class="cx"> PASS   buffer.copyFromChannel(dst8, 0) is identical to the array [1,2,3,4,5,6,7,8].
</span><span class="cx"> PASS   buffer.copyFromChannel(dst8, 1) is identical to the array [2,3,4,5,6,7,8,9].
</span><span class="lines">@@ -60,5 +60,5 @@
</span><span class="cx"> PASS   buffer.copyToChannel(src10, 1, 5) is identical to the array [-1,-1,-1,-1,-1,1,2,3,4,5,6,7,8,9,10,-1...].
</span><span class="cx"> PASS   buffer.copyToChannel(src10, 2, 5) is identical to the array [-1,-1,-1,-1,-1,1,2,3,4,5,6,7,8,9,10,-1...].
</span><span class="cx"> PASS < [copyTo-validate] All assertions passed. (total 10 assertions)
</span><del>-PASS # AUDIT TASK RUNNER FINISHED: 5 tasks ran successfully.
</del><ins>+FAIL # AUDIT TASK RUNNER FINISHED: 2 out of 5 tasks were failed. assert_true: expected true got false
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsjsdomwebassemblymemorynormalfailexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/js/dom/webassembly-memory-normal-fail-expected.txt (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/webassembly-memory-normal-fail-expected.txt     2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/LayoutTests/js/dom/webassembly-memory-normal-fail-expected.txt        2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -1,10 +0,0 @@
</span><del>-Test sending WebAssembly.Memory via postMessage to a worker and fail.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS worker.postMessage(memory) threw exception DataCloneError: The object can not be cloned..
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestsjsdomwebassemblymemorynormalfailhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/js/dom/webassembly-memory-normal-fail.html (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/webassembly-memory-normal-fail.html     2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/LayoutTests/js/dom/webassembly-memory-normal-fail.html        2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -1,21 +0,0 @@
</span><del>-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<script src="../../resources/js-test-pre.js"></script>
-</head>
-<body>
-<script>
-
-description("Test sending WebAssembly.Memory via postMessage to a worker and fail.");
-
-if (typeof WebAssembly !== 'undefined') {
-    window.memory = new WebAssembly.Memory({ initial: 1, maximum: 2 });
-    window.worker = new Worker("./resources/webassembly-memory-normal-fail-worker.js");
-    shouldThrow(`worker.postMessage(memory)`);
-}
-
-</script>
-<script src="../../resources/js-test-post.js"></script>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestsjsdomwebassemblymemorysharedbasicexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/js/dom/webassembly-memory-shared-basic-expected.txt (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/webassembly-memory-shared-basic-expected.txt    2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/LayoutTests/js/dom/webassembly-memory-shared-basic-expected.txt       2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -1,16 +0,0 @@
</span><del>-Test sending shared WebAssembly.Memory via postMessage to a worker.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS view[0] is 42
-PASS message.data is "DONE"
-PASS view[0] is 43
-PASS view[1] is 42
-PASS view[2] is 44
-PASS buffer.byteLength is 65536
-PASS memory.buffer.byteLength is 131072
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestsjsdomwebassemblymemorysharedbasichtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/js/dom/webassembly-memory-shared-basic.html (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/webassembly-memory-shared-basic.html    2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/LayoutTests/js/dom/webassembly-memory-shared-basic.html       2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -1,35 +0,0 @@
</span><del>-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<script src="../../resources/js-test-pre.js"></script>
-</head>
-<body>
-<script>
-
-description("Test sending shared WebAssembly.Memory via postMessage to a worker.");
-
-if (typeof WebAssembly !== 'undefined') {
-    jsTestIsAsync = true;
-    memory = new WebAssembly.Memory({ initial: 1, maximum: 2, shared: true });
-    buffer = memory.buffer;
-    view = new Uint8Array(buffer);
-    view[0] = 42;
-    shouldBe(`view[0]`, `42`);
-    worker = new Worker("./resources/webassembly-memory-shared-worker.js");
-    worker.onmessage = function(msg) {
-        message = msg;
-        shouldBe(`message.data`, `"DONE"`);
-        shouldBe(`view[0]`, `43`);
-        shouldBe(`view[1]`, `42`);
-        shouldBe(`view[2]`, `44`);
-        shouldBe(`buffer.byteLength`, `65536`);
-        shouldBe(`memory.buffer.byteLength`, `131072`);
-        finishJSTest();
-    };
-    worker.postMessage(memory);
-}
-</script>
-<script src="../../resources/js-test-post.js"></script>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestsjsdomwebassemblymemorysharedfailexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/js/dom/webassembly-memory-shared-fail-expected.txt (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/webassembly-memory-shared-fail-expected.txt     2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/LayoutTests/js/dom/webassembly-memory-shared-fail-expected.txt        2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -1,10 +0,0 @@
</span><del>-Test sending shared WebAssembly.Memory's SharedArrayBuffer via postMessage to a worker with transfer-list and fail.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS worker.postMessage(memory.buffer, [memory.buffer]) threw exception DataCloneError: The object can not be cloned..
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestsjsdomwebassemblymemorysharedfailhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/js/dom/webassembly-memory-shared-fail.html (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/webassembly-memory-shared-fail.html     2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/LayoutTests/js/dom/webassembly-memory-shared-fail.html        2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -1,21 +0,0 @@
</span><del>-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<script src="../../resources/js-test-pre.js"></script>
-</head>
-<body>
-<script>
-
-description("Test sending shared WebAssembly.Memory's SharedArrayBuffer via postMessage to a worker with transfer-list and fail.");
-
-if (typeof WebAssembly !== 'undefined') {
-    window.memory = new WebAssembly.Memory({ initial: 1, maximum: 2, shared: true });
-    window.worker = new Worker("./resources/webassembly-memory-normal-fail-worker.js");
-    shouldThrow(`worker.postMessage(memory.buffer, [memory.buffer])`);
-}
-
-</script>
-<script src="../../resources/js-test-post.js"></script>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestsplatformwinTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/win/TestExpectations (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/win/TestExpectations  2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/LayoutTests/platform/win/TestExpectations     2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -4600,9 +4600,3 @@
</span><span class="cx"> # Windows doesn't support color fonts.
</span><span class="cx"> webkit.org/b/218346 fast/text/canvas-color-fonts [ Pass ImageOnlyFailure ]
</span><span class="cx"> webkit.org/b/218346 http/tests/canvas/color-fonts [ Pass ImageOnlyFailure ]
</span><del>-
-# WebAssembly is not enabled
-js/dom/webassembly-memory-shared-basic.html [ Skip ]
-js/dom/webassembly-memory-normal-fail.html [ Skip ]
-js/dom/webassembly-memory-shared-fail.html [ Skip ]
-storage/indexeddb/shared-memory-structured-clone.html [ Skip ]
</del></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbresourcessharedmemorystructuredclonejs"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/storage/indexeddb/resources/shared-memory-structured-clone.js (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/resources/shared-memory-structured-clone.js  2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/LayoutTests/storage/indexeddb/resources/shared-memory-structured-clone.js     2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -1,40 +0,0 @@
</span><del>-if (this.importScripts) {
-    importScripts('../../../resources/js-test.js');
-    importScripts('shared.js');
-}
-
-description("Test structured clone permutations in IndexedDB with shared memories.");
-
-indexedDBTest(prepareDatabase, startTests);
-function prepareDatabase()
-{
-    db = event.target.result;
-    evalAndLog("store = db.createObjectStore('storeName')");
-    debug("This index is not used, but evaluating key path on each put() call will exercise (de)serialization:");
-    evalAndLog("store.createIndex('indexName', 'dummyKeyPath')");
-}
-
-async function startTests()
-{
-    debug("");
-    debug("Running tests...");
-
-    await testSharedWebAssemblyMemory();
-    finishJSTest();
-}
-
-function testSharedWebAssemblyMemory()
-{
-    return new Promise((resolve, reject) => {
-        debug("Test shared WebAssembly.Memory");
-
-        evalAndLog("transaction = db.transaction('storeName', 'readwrite')");
-        evalAndLog("store = transaction.objectStore('storeName')");
-        transaction.onerror = reject;
-        transaction.onabort = reject;
-        transaction.oncomplete = resolve;
-
-        memory = new WebAssembly.Memory({ initial: 1, maximum: 1, shared: true });
-        shouldThrow(`store.put(memory, 'key')`);
-    });
-}
</del></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbsharedmemorystructuredcloneexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/storage/indexeddb/shared-memory-structured-clone-expected.txt (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/shared-memory-structured-clone-expected.txt  2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/LayoutTests/storage/indexeddb/shared-memory-structured-clone-expected.txt     2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -1,22 +0,0 @@
</span><del>-Test structured clone permutations in IndexedDB with shared memories.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB;
-
-indexedDB.deleteDatabase(dbname)
-indexedDB.open(dbname)
-store = db.createObjectStore('storeName')
-This index is not used, but evaluating key path on each put() call will exercise (de)serialization:
-store.createIndex('indexName', 'dummyKeyPath')
-
-Running tests...
-Test shared WebAssembly.Memory
-transaction = db.transaction('storeName', 'readwrite')
-store = transaction.objectStore('storeName')
-PASS store.put(memory, 'key') threw exception DataCloneError: The object can not be cloned..
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbsharedmemorystructuredclonehtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/storage/indexeddb/shared-memory-structured-clone.html (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/shared-memory-structured-clone.html  2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/LayoutTests/storage/indexeddb/shared-memory-structured-clone.html     2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -1,9 +0,0 @@
</span><del>-<html>
-<head>
-<script src="../../resources/js-test.js"></script>
-<script src="resources/shared.js"></script>
-</head>
-<body>
-<script src="resources/shared-memory-structured-clone.js"></script>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/CMakeLists.txt (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/CMakeLists.txt       2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/CMakeLists.txt  2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -1089,7 +1089,6 @@
</span><span class="cx">     wasm/WasmTierUpCount.h
</span><span class="cx"> 
</span><span class="cx">     wasm/js/JSWebAssembly.h
</span><del>-    wasm/js/JSWebAssemblyMemory.h
</del><span class="cx">     wasm/js/JSWebAssemblyModule.h
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog    2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/ChangeLog       2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2020-11-18  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, reverting r269940.
+        https://bugs.webkit.org/show_bug.cgi?id=219076
+
+        caused seemingly-infinite build time regression
+
+        Reverted changeset:
+
+        "[JSC] Implement WebAssembly.Memory with shared"
+        https://bugs.webkit.org/show_bug.cgi?id=218693
+        https://trac.webkit.org/changeset/269940
+
</ins><span class="cx"> 2020-11-16  Yusuke Suzuki  <ysuzuki@apple.com>
</span><span class="cx"> 
</span><span class="cx">         [JSC] Implement WebAssembly.Memory with shared
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj     2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -1574,7 +1574,7 @@
</span><span class="cx">          AD00659E1ECAC812000CA926 /* WasmLimits.h in Headers */ = {isa = PBXBuildFile; fileRef = AD00659D1ECAC7FE000CA926 /* WasmLimits.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          AD2FCBE31DB58DAD00B3E736 /* JSWebAssemblyCompileError.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCBA71DB58DA400B3E736 /* JSWebAssemblyCompileError.h */; };
</span><span class="cx">          AD2FCBE51DB58DAD00B3E736 /* JSWebAssemblyInstance.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCBA91DB58DA400B3E736 /* JSWebAssemblyInstance.h */; };
</span><del>-               AD2FCBE71DB58DAD00B3E736 /* JSWebAssemblyMemory.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCBAB1DB58DA400B3E736 /* JSWebAssemblyMemory.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><ins>+                AD2FCBE71DB58DAD00B3E736 /* JSWebAssemblyMemory.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCBAB1DB58DA400B3E736 /* JSWebAssemblyMemory.h */; };
</ins><span class="cx">           AD2FCBE91DB58DAD00B3E736 /* JSWebAssemblyRuntimeError.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCBAD1DB58DA400B3E736 /* JSWebAssemblyRuntimeError.h */; };
</span><span class="cx">          AD2FCBEB1DB58DAD00B3E736 /* JSWebAssemblyTable.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCBAF1DB58DA400B3E736 /* JSWebAssemblyTable.h */; };
</span><span class="cx">          AD2FCBED1DB58DAD00B3E736 /* WebAssemblyCompileErrorConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = AD2FCBB11DB58DA400B3E736 /* WebAssemblyCompileErrorConstructor.h */; };
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorellintLLIntPCRangesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/LLIntPCRanges.h (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/LLIntPCRanges.h        2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/llint/LLIntPCRanges.h   2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -35,10 +35,6 @@
</span><span class="cx"> extern "C" {
</span><span class="cx">     void llintPCRangeStart();
</span><span class="cx">     void llintPCRangeEnd();
</span><del>-#if ENABLE(WEBASSEMBLY)
-    void wasmLLIntPCRangeStart();
-    void wasmLLIntPCRangeEnd();
-#endif
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ALWAYS_INLINE bool isLLIntPC(void* pc)
</span><span class="lines">@@ -50,17 +46,6 @@
</span><span class="cx">     return llintStart <= pcAsInt && pcAsInt <= llintEnd;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if ENABLE(WEBASSEMBLY)
-ALWAYS_INLINE bool isWasmLLIntPC(void* pc)
-{
-    uintptr_t pcAsInt = bitwise_cast<uintptr_t>(pc);
-    uintptr_t start = untagCodePtr<uintptr_t, CFunctionPtrTag>(wasmLLIntPCRangeStart);
-    uintptr_t end = untagCodePtr<uintptr_t, CFunctionPtrTag>(wasmLLIntPCRangeEnd);
-    RELEASE_ASSERT(start < end);
-    return start <= pcAsInt && pcAsInt <= end;
-}
-#endif
-
</del><span class="cx"> #if !ENABLE(C_LOOP)
</span><span class="cx"> static constexpr GPRReg LLIntPC = GPRInfo::regT4;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorellintLowLevelInterpreterasm"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm        2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm   2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -2467,12 +2467,7 @@
</span><span class="cx">     # but we don't want to interfere with the LLInt opcodes
</span><span class="cx">     include WebAssembly
</span><span class="cx"> end
</span><del>-
-global _wasmLLIntPCRangeStart
-_wasmLLIntPCRangeStart:
</del><span class="cx"> wasmScope()
</span><del>-global _wasmLLIntPCRangeEnd
-_wasmLLIntPCRangeEnd:
</del><span class="cx"> 
</span><span class="cx"> else
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorellintWebAssemblyasm"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/WebAssembly.asm (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/WebAssembly.asm        2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/llint/WebAssembly.asm   2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> # These must match the definition in WasmMemoryInformation.cpp
</span><span class="cx"> const wasmInstance = csr0
</span><span class="cx"> const memoryBase = csr3
</span><del>-const boundsCheckingSize = csr4
</del><ins>+const memorySize = csr4
</ins><span class="cx"> 
</span><span class="cx"> # This must match the definition in LowLevelInterpreter.asm
</span><span class="cx"> if X86_64
</span><span class="lines">@@ -187,7 +187,7 @@
</span><span class="cx"> # Wasm specific helpers
</span><span class="cx"> 
</span><span class="cx"> macro preserveCalleeSavesUsedByWasm()
</span><del>-    # NOTE: We intentionally don't save memoryBase and boundsCheckingSize here. See the comment
</del><ins>+    # NOTE: We intentionally don't save memoryBase and memorySize here. See the comment
</ins><span class="cx">     # in restoreCalleeSavesUsedByWasm() below for why.
</span><span class="cx">     subp CalleeSaveSpaceStackAligned, sp
</span><span class="cx">     if ARM64 or ARM64E
</span><span class="lines">@@ -201,7 +201,7 @@
</span><span class="cx"> end
</span><span class="cx"> 
</span><span class="cx"> macro restoreCalleeSavesUsedByWasm()
</span><del>-    # NOTE: We intentionally don't restore memoryBase and boundsCheckingSize here. These are saved
</del><ins>+    # NOTE: We intentionally don't restore memoryBase and memorySize here. These are saved
</ins><span class="cx">     # and restored when entering Wasm by the JSToWasm wrapper and changes to them are meant
</span><span class="cx">     # to be observable within the same Wasm module.
</span><span class="cx">     if ARM64 or ARM64E
</span><span class="lines">@@ -240,8 +240,8 @@
</span><span class="cx"> 
</span><span class="cx"> macro reloadMemoryRegistersFromInstance(instance, scratch1, scratch2)
</span><span class="cx">     loadp Wasm::Instance::m_cachedMemory[instance], memoryBase
</span><del>-    loadi Wasm::Instance::m_cachedBoundsCheckingSize[instance], boundsCheckingSize
-    cagedPrimitive(memoryBase, boundsCheckingSize, scratch1, scratch2)
</del><ins>+    loadi Wasm::Instance::m_cachedMemorySize[instance], memorySize
+    cagedPrimitive(memoryBase, memorySize, scratch1, scratch2)
</ins><span class="cx"> end
</span><span class="cx"> 
</span><span class="cx"> macro throwException(exception)
</span><span class="lines">@@ -856,9 +856,7 @@
</span><span class="cx"> end)
</span><span class="cx"> 
</span><span class="cx"> wasmOp(current_memory, WasmCurrentMemory, macro(ctx)
</span><del>-    loadp Wasm::Instance::m_memory[wasmInstance], t0
-    loadp Wasm::Memory::m_handle[t0], t0
-    loadp Wasm::MemoryHandle::m_size[t0], t0
</del><ins>+    loadp Wasm::Instance::m_cachedMemorySize[wasmInstance], t0
</ins><span class="cx">     urshiftq 16, t0
</span><span class="cx">     returnq(ctx, t0)
</span><span class="cx"> end)
</span><span class="lines">@@ -876,7 +874,7 @@
</span><span class="cx"> # uses offset as scratch and returns result on pointer
</span><span class="cx"> macro emitCheckAndPreparePointer(ctx, pointer, offset, size)
</span><span class="cx">     leap size - 1[pointer, offset], t5
</span><del>-    bpb t5, boundsCheckingSize, .continuation
</del><ins>+    bpb t5, memorySize, .continuation
</ins><span class="cx">     throwException(OutOfBoundsMemoryAccess)
</span><span class="cx"> .continuation:
</span><span class="cx">     addp memoryBase, pointer
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSArrayBufferh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSArrayBuffer.h (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSArrayBuffer.h      2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/runtime/JSArrayBuffer.h 2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -55,7 +55,6 @@
</span><span class="cx">     
</span><span class="cx">     // This is the default DOM unwrapping. It calls toUnsharedArrayBuffer().
</span><span class="cx">     static ArrayBuffer* toWrapped(VM&, JSValue);
</span><del>-    static ArrayBuffer* toWrappedAllowShared(VM&, JSValue);
</del><span class="cx">     
</span><span class="cx"> private:
</span><span class="cx">     JSArrayBuffer(VM&, Structure*, RefPtr<ArrayBuffer>&&);
</span><span class="lines">@@ -87,9 +86,4 @@
</span><span class="cx">     return toUnsharedArrayBuffer(vm, value);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline ArrayBuffer* JSArrayBuffer::toWrappedAllowShared(VM& vm, JSValue value)
-{
-    return toPossiblySharedArrayBuffer(vm, value);
-}
-
</del><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSArrayBufferViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSArrayBufferView.h (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSArrayBufferView.h  2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/runtime/JSArrayBufferView.h     2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -204,7 +204,6 @@
</span><span class="cx">     static ptrdiff_t offsetOfMode() { return OBJECT_OFFSETOF(JSArrayBufferView, m_mode); }
</span><span class="cx">     
</span><span class="cx">     static RefPtr<ArrayBufferView> toWrapped(VM&, JSValue);
</span><del>-    static RefPtr<ArrayBufferView> toWrappedAllowShared(VM&, JSValue);
</del><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     enum Requester { Mutator, ConcurrentThread };
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSArrayBufferViewInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSArrayBufferViewInlines.h (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSArrayBufferViewInlines.h   2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/runtime/JSArrayBufferViewInlines.h      2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -129,12 +129,4 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline RefPtr<ArrayBufferView> JSArrayBufferView::toWrappedAllowShared(VM& vm, JSValue value)
-{
-    if (JSArrayBufferView* view = jsDynamicCast<JSArrayBufferView*>(vm, value))
-        return view->possiblySharedImpl();
-    return nullptr;
-}
-
-
</del><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGenericTypedArrayViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h    2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h       2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -287,8 +287,6 @@
</span><span class="cx"> 
</span><span class="cx">     // This is the default DOM unwrapping. It calls toUnsharedNativeTypedView().
</span><span class="cx">     static RefPtr<typename Adaptor::ViewType> toWrapped(VM&, JSValue);
</span><del>-    // [AllowShared] annotation allows accepting TypedArray originated from SharedArrayBuffer.
-    static RefPtr<typename Adaptor::ViewType> toWrappedAllowShared(VM&, JSValue);
</del><span class="cx">     
</span><span class="cx"> private:
</span><span class="cx">     friend struct TypedArrayClassInfos;
</span><span class="lines">@@ -394,11 +392,4 @@
</span><span class="cx">     return JSC::toUnsharedNativeTypedView<Adaptor>(vm, value);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template<typename Adaptor>
-RefPtr<typename Adaptor::ViewType> JSGenericTypedArrayView<Adaptor>::toWrappedAllowShared(VM& vm, JSValue value)
-{
-    return JSC::toPossiblySharedNativeTypedView<Adaptor>(vm, value);
-}
-
-
</del><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeOptionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Options.cpp (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Options.cpp  2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/runtime/Options.cpp     2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -365,9 +365,8 @@
</span><span class="cx">     Options::usePollingTraps() = true;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if !ENABLE(WEBASSEMBLY_SIGNALING_MEMORY)
</del><ins>+#if !ENABLE(WEBASSEMBLY_FAST_MEMORY)
</ins><span class="cx">     Options::useWebAssemblyFastMemory() = false;
</span><del>-    Options::useSharedArrayBuffer() = false;
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if !HAVE(MACH_EXCEPTIONS)
</span><span class="lines">@@ -659,15 +658,14 @@
</span><span class="cx">             }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if ASAN_ENABLED && OS(LINUX) && ENABLE(WEBASSEMBLY_SIGNALING_MEMORY)
-            if (Options::useWebAssemblyFastMemory() || Options::useSharedArrayBuffer()) {
</del><ins>+#if ASAN_ENABLED && OS(LINUX) && ENABLE(WEBASSEMBLY_FAST_MEMORY)
+            if (Options::useWebAssemblyFastMemory()) {
</ins><span class="cx">                 const char* asanOptions = getenv("ASAN_OPTIONS");
</span><span class="cx">                 bool okToUseWebAssemblyFastMemory = asanOptions
</span><span class="cx">                     && (strstr(asanOptions, "allow_user_segv_handler=1") || strstr(asanOptions, "handle_segv=0"));
</span><span class="cx">                 if (!okToUseWebAssemblyFastMemory) {
</span><del>-                    dataLogLn("WARNING: ASAN interferes with JSC signal handlers; useWebAssemblyFastMemory and useSharedArrayBuffer will be disabled.");
</del><ins>+                    dataLogLn("WARNING: ASAN interferes with JSC signal handlers; useWebAssemblyFastMemory will be disabled.");
</ins><span class="cx">                     Options::useWebAssemblyFastMemory() = false;
</span><del>-                    Options::useSharedArrayBuffer() = false;
</del><span class="cx">                 }
</span><span class="cx">             }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmWasmAirIRGeneratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/WasmAirIRGenerator.cpp (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/WasmAirIRGenerator.cpp  2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/wasm/WasmAirIRGenerator.cpp     2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -680,7 +680,7 @@
</span><span class="cx">     Vector<TypedTmp> m_locals;
</span><span class="cx">     Vector<UnlinkedWasmToWasmCall>& m_unlinkedWasmToWasmCalls; // List each call site and the function index whose address it should be patched with.
</span><span class="cx">     GPRReg m_memoryBaseGPR { InvalidGPRReg };
</span><del>-    GPRReg m_boundsCheckingSizeGPR { InvalidGPRReg };
</del><ins>+    GPRReg m_memorySizeGPR { InvalidGPRReg };
</ins><span class="cx">     GPRReg m_wasmContextInstanceGPR { InvalidGPRReg };
</span><span class="cx">     bool m_makesCalls { false };
</span><span class="cx"> 
</span><span class="lines">@@ -772,8 +772,8 @@
</span><span class="cx">         m_code.pinRegister(m_wasmContextInstanceGPR);
</span><span class="cx"> 
</span><span class="cx">     if (mode != MemoryMode::Signaling) {
</span><del>-        m_boundsCheckingSizeGPR = pinnedRegs.boundsCheckingSizeRegister;
-        m_code.pinRegister(m_boundsCheckingSizeGPR);
</del><ins>+        m_memorySizeGPR = pinnedRegs.sizeRegister;
+        m_code.pinRegister(m_memorySizeGPR);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     m_code.setNumEntrypoints(1);
</span><span class="lines">@@ -918,7 +918,7 @@
</span><span class="cx">         const PinnedRegisterInfo* pinnedRegs = &PinnedRegisterInfo::get();
</span><span class="cx">         RegisterSet clobbers;
</span><span class="cx">         clobbers.set(pinnedRegs->baseMemoryPointer);
</span><del>-        clobbers.set(pinnedRegs->boundsCheckingSizeRegister);
</del><ins>+        clobbers.set(pinnedRegs->sizeRegister);
</ins><span class="cx">         if (!isARM64())
</span><span class="cx">             clobbers.set(RegisterSet::macroScratchRegisters());
</span><span class="cx"> 
</span><span class="lines">@@ -933,12 +933,12 @@
</span><span class="cx">         patchpoint->setGenerator([pinnedRegs] (CCallHelpers& jit, const B3::StackmapGenerationParams& params) {
</span><span class="cx">             AllowMacroScratchRegisterUsage allowScratch(jit);
</span><span class="cx">             GPRReg baseMemory = pinnedRegs->baseMemoryPointer;
</span><del>-            GPRReg scratchOrBoundsCheckingSize = Gigacage::isEnabled(Gigacage::Primitive) ? params.gpScratch(0) : pinnedRegs->boundsCheckingSizeRegister;
</del><ins>+            GPRReg scratchOrSize = Gigacage::isEnabled(Gigacage::Primitive) ? params.gpScratch(0) : pinnedRegs->sizeRegister;
</ins><span class="cx"> 
</span><del>-            jit.loadPtr(CCallHelpers::Address(params[0].gpr(), Instance::offsetOfCachedBoundsCheckingSize()), pinnedRegs->boundsCheckingSizeRegister);
</del><ins>+            jit.loadPtr(CCallHelpers::Address(params[0].gpr(), Instance::offsetOfCachedMemorySize()), pinnedRegs->sizeRegister);
</ins><span class="cx">             jit.loadPtr(CCallHelpers::Address(params[0].gpr(), Instance::offsetOfCachedMemory()), baseMemory);
</span><span class="cx"> 
</span><del>-            jit.cageConditionally(Gigacage::Primitive, baseMemory, pinnedRegs->boundsCheckingSizeRegister, scratchOrBoundsCheckingSize);
</del><ins>+            jit.cageConditionally(Gigacage::Primitive, baseMemory, pinnedRegs->sizeRegister, scratchOrSize);
</ins><span class="cx">         });
</span><span class="cx"> 
</span><span class="cx">         emitPatchpoint(block, patchpoint, Tmp(), instance);
</span><span class="lines">@@ -1168,12 +1168,8 @@
</span><span class="cx">     auto temp1 = g64();
</span><span class="cx">     auto temp2 = g64();
</span><span class="cx"> 
</span><del>-    RELEASE_ASSERT(Arg::isValidAddrForm(Instance::offsetOfMemory(), B3::Width64));
-    RELEASE_ASSERT(Arg::isValidAddrForm(Memory::offsetOfHandle(), B3::Width64));
-    RELEASE_ASSERT(Arg::isValidAddrForm(MemoryHandle::offsetOfSize(), B3::Width64));
-    append(Move, Arg::addr(instanceValue(), Instance::offsetOfMemory()), temp1);
-    append(Move, Arg::addr(temp1, Memory::offsetOfHandle()), temp1);
-    append(Move, Arg::addr(temp1, MemoryHandle::offsetOfSize()), temp1);
</del><ins>+    RELEASE_ASSERT(Arg::isValidAddrForm(Instance::offsetOfCachedMemorySize(), B3::Width64));
+    append(Move, Arg::addr(instanceValue(), Instance::offsetOfCachedMemorySize()), temp1);
</ins><span class="cx">     constexpr uint32_t shiftValue = 16;
</span><span class="cx">     static_assert(PageCount::pageSize == 1ull << shiftValue, "This must hold for the code below to be correct.");
</span><span class="cx">     append(Move, Arg::imm(16), temp2);
</span><span class="lines">@@ -1367,9 +1363,8 @@
</span><span class="cx"> 
</span><span class="cx">     switch (m_mode) {
</span><span class="cx">     case MemoryMode::BoundsChecking: {
</span><del>-        // In bound checking mode, while shared wasm memory partially relies on signal handler too, we need to perform bound checking
-        // to ensure that no memory access exceeds the current memory size.
-        ASSERT(m_boundsCheckingSizeGPR);
</del><ins>+        // We're not using signal handling at all, we must therefore check that no memory access exceeds the current memory size.
+        ASSERT(m_memorySizeGPR);
</ins><span class="cx">         ASSERT(sizeOfOperation + offset > offset);
</span><span class="cx">         auto temp = g64();
</span><span class="cx">         append(Move, Arg::bigImm(static_cast<uint64_t>(sizeOfOperation) + offset - 1), temp);
</span><span class="lines">@@ -1376,7 +1371,7 @@
</span><span class="cx">         append(Add64, result, temp);
</span><span class="cx"> 
</span><span class="cx">         emitCheck([&] {
</span><del>-            return Inst(Branch64, nullptr, Arg::relCond(MacroAssembler::AboveOrEqual), temp, Tmp(m_boundsCheckingSizeGPR));
</del><ins>+            return Inst(Branch64, nullptr, Arg::relCond(MacroAssembler::AboveOrEqual), temp, Tmp(m_memorySizeGPR));
</ins><span class="cx">         }, [=] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
</span><span class="cx">             this->emitThrowException(jit, ExceptionType::OutOfBoundsMemoryAccess);
</span><span class="cx">         });
</span><span class="lines">@@ -2159,7 +2154,7 @@
</span><span class="cx">         auto* patchpoint = emitCallPatchpoint(m_currentBlock, signature, results, args);
</span><span class="cx">         // We need to clobber the size register since the LLInt always bounds checks
</span><span class="cx">         if (m_mode == MemoryMode::Signaling)
</span><del>-            patchpoint->clobberLate(RegisterSet { PinnedRegisterInfo::get().boundsCheckingSizeRegister });
</del><ins>+            patchpoint->clobberLate(RegisterSet { PinnedRegisterInfo::get().sizeRegister });
</ins><span class="cx">         patchpoint->setGenerator([unlinkedWasmToWasmCalls, functionIndex] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
</span><span class="cx">             AllowMacroScratchRegisterUsage allowScratch(jit);
</span><span class="cx">             CCallHelpers::Call call = jit.threadSafePatchableNearCall();
</span><span class="lines">@@ -2283,13 +2278,13 @@
</span><span class="cx">             jit.storeWasmContextInstance(newContextInstance);
</span><span class="cx">             // FIXME: We should support more than one memory size register
</span><span class="cx">             //   see: https://bugs.webkit.org/show_bug.cgi?id=162952
</span><del>-            ASSERT(pinnedRegs.boundsCheckingSizeRegister != newContextInstance);
-            GPRReg scratchOrBoundsCheckingSize = Gigacage::isEnabled(Gigacage::Primitive) ? params.gpScratch(0) : pinnedRegs.boundsCheckingSizeRegister;
</del><ins>+            ASSERT(pinnedRegs.sizeRegister != newContextInstance);
+            GPRReg scratchOrSize = Gigacage::isEnabled(Gigacage::Primitive) ? params.gpScratch(0) : pinnedRegs.sizeRegister;
</ins><span class="cx"> 
</span><del>-            jit.loadPtr(CCallHelpers::Address(newContextInstance, Instance::offsetOfCachedBoundsCheckingSize()), pinnedRegs.boundsCheckingSizeRegister); // Bound checking size.
</del><ins>+            jit.loadPtr(CCallHelpers::Address(newContextInstance, Instance::offsetOfCachedMemorySize()), pinnedRegs.sizeRegister); // Memory size.
</ins><span class="cx">             jit.loadPtr(CCallHelpers::Address(newContextInstance, Instance::offsetOfCachedMemory()), baseMemory); // Memory::void*.
</span><span class="cx"> 
</span><del>-            jit.cageConditionally(Gigacage::Primitive, baseMemory, pinnedRegs.boundsCheckingSizeRegister, scratchOrBoundsCheckingSize);
</del><ins>+            jit.cageConditionally(Gigacage::Primitive, baseMemory, pinnedRegs.sizeRegister, scratchOrSize);
</ins><span class="cx">         });
</span><span class="cx"> 
</span><span class="cx">         emitPatchpoint(doContextSwitch, patchpoint, Tmp(), newContextInstance, instanceValue());
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmWasmB3IRGeneratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp   2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp      2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -325,7 +325,7 @@
</span><span class="cx">     InsertionSet m_constantInsertionValues;
</span><span class="cx">     Value* m_framePointer { nullptr };
</span><span class="cx">     GPRReg m_memoryBaseGPR { InvalidGPRReg };
</span><del>-    GPRReg m_boundsCheckingSizeGPR { InvalidGPRReg };
</del><ins>+    GPRReg m_memorySizeGPR { InvalidGPRReg };
</ins><span class="cx">     GPRReg m_wasmContextInstanceGPR { InvalidGPRReg };
</span><span class="cx">     bool m_makesCalls { false };
</span><span class="cx"> 
</span><span class="lines">@@ -408,8 +408,8 @@
</span><span class="cx">         m_proc.pinRegister(m_wasmContextInstanceGPR);
</span><span class="cx"> 
</span><span class="cx">     if (mode != MemoryMode::Signaling) {
</span><del>-        m_boundsCheckingSizeGPR = pinnedRegs.boundsCheckingSizeRegister;
-        m_proc.pinRegister(m_boundsCheckingSizeGPR);
</del><ins>+        m_memorySizeGPR = pinnedRegs.sizeRegister;
+        m_proc.pinRegister(m_memorySizeGPR);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (info.memory) {
</span><span class="lines">@@ -417,7 +417,7 @@
</span><span class="cx">             AllowMacroScratchRegisterUsage allowScratch(jit);
</span><span class="cx">             switch (m_mode) {
</span><span class="cx">             case MemoryMode::BoundsChecking:
</span><del>-                ASSERT_UNUSED(pinnedGPR, m_boundsCheckingSizeGPR == pinnedGPR);
</del><ins>+                ASSERT_UNUSED(pinnedGPR, m_memorySizeGPR == pinnedGPR);
</ins><span class="cx">                 break;
</span><span class="cx">             case MemoryMode::Signaling:
</span><span class="cx">                 ASSERT_UNUSED(pinnedGPR, InvalidGPRReg == pinnedGPR);
</span><span class="lines">@@ -545,7 +545,7 @@
</span><span class="cx">         const PinnedRegisterInfo* pinnedRegs = &PinnedRegisterInfo::get();
</span><span class="cx">         RegisterSet clobbers;
</span><span class="cx">         clobbers.set(pinnedRegs->baseMemoryPointer);
</span><del>-        clobbers.set(pinnedRegs->boundsCheckingSizeRegister);
</del><ins>+        clobbers.set(pinnedRegs->sizeRegister);
</ins><span class="cx">         if (!isARM64())
</span><span class="cx">             clobbers.set(RegisterSet::macroScratchRegisters());
</span><span class="cx"> 
</span><span class="lines">@@ -561,12 +561,12 @@
</span><span class="cx">         patchpoint->setGenerator([pinnedRegs] (CCallHelpers& jit, const B3::StackmapGenerationParams& params) {
</span><span class="cx">             AllowMacroScratchRegisterUsage allowScratch(jit);
</span><span class="cx">             GPRReg baseMemory = pinnedRegs->baseMemoryPointer;
</span><del>-            GPRReg scratchOrBoundsCheckingSize = Gigacage::isEnabled(Gigacage::Primitive) ? params.gpScratch(0) : pinnedRegs->boundsCheckingSizeRegister;
</del><ins>+            GPRReg scratchOrSize = Gigacage::isEnabled(Gigacage::Primitive) ? params.gpScratch(0) : pinnedRegs->sizeRegister;
</ins><span class="cx"> 
</span><del>-            jit.loadPtr(CCallHelpers::Address(params[0].gpr(), Instance::offsetOfCachedBoundsCheckingSize()), pinnedRegs->boundsCheckingSizeRegister);
</del><ins>+            jit.loadPtr(CCallHelpers::Address(params[0].gpr(), Instance::offsetOfCachedMemorySize()), pinnedRegs->sizeRegister);
</ins><span class="cx">             jit.loadPtr(CCallHelpers::Address(params[0].gpr(), Instance::offsetOfCachedMemory()), baseMemory);
</span><span class="cx"> 
</span><del>-            jit.cageConditionally(Gigacage::Primitive, baseMemory, pinnedRegs->boundsCheckingSizeRegister, scratchOrBoundsCheckingSize);
</del><ins>+            jit.cageConditionally(Gigacage::Primitive, baseMemory, pinnedRegs->sizeRegister, scratchOrSize);
</ins><span class="cx">         });
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -793,9 +793,7 @@
</span><span class="cx"> auto B3IRGenerator::addCurrentMemory(ExpressionType& result) -> PartialResult
</span><span class="cx"> {
</span><span class="cx">     static_assert(sizeof(decltype(static_cast<Memory*>(nullptr)->size())) == sizeof(uint64_t), "codegen relies on this size");
</span><del>-    Value* memory = m_currentBlock->appendNew<MemoryValue>(m_proc, Load, Int64, origin(), instanceValue(), safeCast<int32_t>(Instance::offsetOfMemory()));
-    Value* handle = m_currentBlock->appendNew<MemoryValue>(m_proc, Load, Int64, origin(), memory, safeCast<int32_t>(Memory::offsetOfHandle()));
-    Value* size = m_currentBlock->appendNew<MemoryValue>(m_proc, Load, Int64, origin(), handle, safeCast<int32_t>(MemoryHandle::offsetOfSize()));
</del><ins>+    Value* size = m_currentBlock->appendNew<MemoryValue>(m_proc, Load, Int64, origin(), instanceValue(), safeCast<int32_t>(Instance::offsetOfCachedMemorySize()));
</ins><span class="cx"> 
</span><span class="cx">     constexpr uint32_t shiftValue = 16;
</span><span class="cx">     static_assert(PageCount::pageSize == 1ull << shiftValue, "This must hold for the code below to be correct.");
</span><span class="lines">@@ -956,9 +954,9 @@
</span><span class="cx">     switch (m_mode) {
</span><span class="cx">     case MemoryMode::BoundsChecking: {
</span><span class="cx">         // We're not using signal handling at all, we must therefore check that no memory access exceeds the current memory size.
</span><del>-        ASSERT(m_boundsCheckingSizeGPR);
</del><ins>+        ASSERT(m_memorySizeGPR);
</ins><span class="cx">         ASSERT(sizeOfOperation + offset > offset);
</span><del>-        m_currentBlock->appendNew<WasmBoundsCheckValue>(m_proc, origin(), m_boundsCheckingSizeGPR, pointer, sizeOfOperation + offset - 1);
</del><ins>+        m_currentBlock->appendNew<WasmBoundsCheckValue>(m_proc, origin(), m_memorySizeGPR, pointer, sizeOfOperation + offset - 1);
</ins><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -1712,7 +1710,7 @@
</span><span class="cx"> 
</span><span class="cx">                 // We need to clobber the size register since the LLInt always bounds checks
</span><span class="cx">                 if (m_mode == MemoryMode::Signaling)
</span><del>-                    patchpoint->clobberLate(RegisterSet { PinnedRegisterInfo::get().boundsCheckingSizeRegister });
</del><ins>+                    patchpoint->clobberLate(RegisterSet { PinnedRegisterInfo::get().sizeRegister });
</ins><span class="cx">                 patchpoint->setGenerator([unlinkedWasmToWasmCalls, functionIndex] (CCallHelpers& jit, const B3::StackmapGenerationParams&) {
</span><span class="cx">                     AllowMacroScratchRegisterUsage allowScratch(jit);
</span><span class="cx">                     CCallHelpers::Call call = jit.threadSafePatchableNearCall();
</span><span class="lines">@@ -1833,16 +1831,16 @@
</span><span class="cx">             jit.loadPtr(CCallHelpers::Address(oldContextInstance, Instance::offsetOfCachedStackLimit()), baseMemory);
</span><span class="cx">             jit.storePtr(baseMemory, CCallHelpers::Address(newContextInstance, Instance::offsetOfCachedStackLimit()));
</span><span class="cx">             jit.storeWasmContextInstance(newContextInstance);
</span><del>-            ASSERT(pinnedRegs.boundsCheckingSizeRegister != baseMemory);
</del><ins>+            ASSERT(pinnedRegs.sizeRegister != baseMemory);
</ins><span class="cx">             // FIXME: We should support more than one memory size register
</span><span class="cx">             //   see: https://bugs.webkit.org/show_bug.cgi?id=162952
</span><del>-            ASSERT(pinnedRegs.boundsCheckingSizeRegister != newContextInstance);
-            GPRReg scratchOrBoundsCheckingSize = Gigacage::isEnabled(Gigacage::Primitive) ? params.gpScratch(0) : pinnedRegs.boundsCheckingSizeRegister;
</del><ins>+            ASSERT(pinnedRegs.sizeRegister != newContextInstance);
+            GPRReg scratchOrSize = Gigacage::isEnabled(Gigacage::Primitive) ? params.gpScratch(0) : pinnedRegs.sizeRegister;
</ins><span class="cx"> 
</span><del>-            jit.loadPtr(CCallHelpers::Address(newContextInstance, Instance::offsetOfCachedBoundsCheckingSize()), pinnedRegs.boundsCheckingSizeRegister); // Memory size.
</del><ins>+            jit.loadPtr(CCallHelpers::Address(newContextInstance, Instance::offsetOfCachedMemorySize()), pinnedRegs.sizeRegister); // Memory size.
</ins><span class="cx">             jit.loadPtr(CCallHelpers::Address(newContextInstance, Instance::offsetOfCachedMemory()), baseMemory); // Memory::void*.
</span><span class="cx"> 
</span><del>-            jit.cageConditionally(Gigacage::Primitive, baseMemory, pinnedRegs.boundsCheckingSizeRegister, scratchOrBoundsCheckingSize);
</del><ins>+            jit.cageConditionally(Gigacage::Primitive, baseMemory, pinnedRegs.sizeRegister, scratchOrSize);
</ins><span class="cx">         });
</span><span class="cx">         doContextSwitch->appendNewControlValue(m_proc, Jump, origin(), continuation);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmWasmBindingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/WasmBinding.cpp (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/WasmBinding.cpp 2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/wasm/WasmBinding.cpp    2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -49,9 +49,9 @@
</span><span class="cx">     GPRReg baseMemory = pinnedRegs.baseMemoryPointer;
</span><span class="cx">     ASSERT(baseMemory != GPRReg::InvalidGPRReg);
</span><span class="cx">     ASSERT(baseMemory != scratch);
</span><del>-    ASSERT(pinnedRegs.boundsCheckingSizeRegister != baseMemory);
-    ASSERT(pinnedRegs.boundsCheckingSizeRegister != scratch);
-    GPRReg sizeRegAsScratch = pinnedRegs.boundsCheckingSizeRegister;
</del><ins>+    ASSERT(pinnedRegs.sizeRegister != baseMemory);
+    ASSERT(pinnedRegs.sizeRegister != scratch);
+    GPRReg sizeRegAsScratch = pinnedRegs.sizeRegister;
</ins><span class="cx">     ASSERT(sizeRegAsScratch != GPRReg::InvalidGPRReg);
</span><span class="cx"> 
</span><span class="cx">     // B3's call codegen ensures that the JSCell is a WebAssemblyFunction.
</span><span class="lines">@@ -68,11 +68,11 @@
</span><span class="cx">     // FIXME the following code assumes that all Wasm::Instance have the same pinned registers. https://bugs.webkit.org/show_bug.cgi?id=162952
</span><span class="cx">     // Set up the callee's baseMemory register as well as the memory size registers.
</span><span class="cx">     {
</span><del>-        GPRReg scratchOrBoundsCheckingSize = !Gigacage::isEnabled(Gigacage::Primitive) ? pinnedRegs.boundsCheckingSizeRegister : wasmCallingConvention().prologueScratchGPRs[1];
</del><ins>+        GPRReg scratchOrSize = !Gigacage::isEnabled(Gigacage::Primitive) ? pinnedRegs.sizeRegister : wasmCallingConvention().prologueScratchGPRs[1];
</ins><span class="cx"> 
</span><del>-        jit.loadPtr(JIT::Address(baseMemory, Wasm::Instance::offsetOfCachedBoundsCheckingSize()), pinnedRegs.boundsCheckingSizeRegister); // Bound checking size.
</del><ins>+        jit.loadPtr(JIT::Address(baseMemory, Wasm::Instance::offsetOfCachedMemorySize()), pinnedRegs.sizeRegister); // Memory size.
</ins><span class="cx">         jit.loadPtr(JIT::Address(baseMemory, Wasm::Instance::offsetOfCachedMemory()), baseMemory); // Wasm::Memory::TaggedArrayStoragePtr<void> (void*).
</span><del>-        jit.cageConditionally(Gigacage::Primitive, baseMemory, pinnedRegs.boundsCheckingSizeRegister, scratchOrBoundsCheckingSize);
</del><ins>+        jit.cageConditionally(Gigacage::Primitive, baseMemory, pinnedRegs.sizeRegister, scratchOrSize);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Tail call into the callee WebAssembly function.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmWasmFaultSignalHandlercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/WasmFaultSignalHandler.cpp (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/WasmFaultSignalHandler.cpp      2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/wasm/WasmFaultSignalHandler.cpp 2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx"> 
</span><span class="cx"> static bool fastHandlerInstalled { false };
</span><span class="cx"> 
</span><del>-#if ENABLE(WEBASSEMBLY_SIGNALING_MEMORY)
</del><ins>+#if ENABLE(WEBASSEMBLY_FAST_MEMORY)
</ins><span class="cx"> 
</span><span class="cx"> static SignalAction trapHandler(Signal, SigInfo& sigInfo, PlatformRegisters& context)
</span><span class="cx"> {
</span><span class="lines">@@ -63,40 +63,29 @@
</span><span class="cx">     dataLogLnIf(WasmFaultSignalHandlerInternal::verbose, "starting handler for fault at: ", RawPointer(faultingInstruction));
</span><span class="cx"> 
</span><span class="cx">     dataLogLnIf(WasmFaultSignalHandlerInternal::verbose, "JIT memory start: ", RawPointer(startOfFixedExecutableMemoryPool()), " end: ", RawPointer(endOfFixedExecutableMemoryPool()));
</span><del>-    dataLogLnIf(WasmFaultSignalHandlerInternal::verbose, "WasmLLInt memory start: ", RawPointer(untagCodePtr<void*, CFunctionPtrTag>(LLInt::wasmLLIntPCRangeStart)), " end: ", RawPointer(untagCodePtr<void*, CFunctionPtrTag>(LLInt::wasmLLIntPCRangeEnd)));
-    // First we need to make sure we are in JIT code or Wasm LLInt code before we can aquire any locks. Otherwise,
</del><ins>+    // First we need to make sure we are in JIT code before we can aquire any locks. Otherwise,
</ins><span class="cx">     // we might have crashed in code that is already holding one of the locks we want to aquire.
</span><span class="cx">     assertIsNotTagged(faultingInstruction);
</span><del>-    if (isJITPC(faultingInstruction) || LLInt::isWasmLLIntPC(faultingInstruction)) {
-        bool faultedInActiveGrowableMemory = false;
</del><ins>+    if (isJITPC(faultingInstruction)) {
+        bool faultedInActiveFastMemory = false;
</ins><span class="cx">         {
</span><span class="cx">             void* faultingAddress = sigInfo.faultingAddress;
</span><span class="cx">             dataLogLnIf(WasmFaultSignalHandlerInternal::verbose, "checking faulting address: ", RawPointer(faultingAddress), " is in an active fast memory");
</span><del>-            faultedInActiveGrowableMemory = Wasm::Memory::addressIsInGrowableOrFastMemory(faultingAddress);
</del><ins>+            faultedInActiveFastMemory = Wasm::Memory::addressIsInActiveFastMemory(faultingAddress);
</ins><span class="cx">         }
</span><del>-        if (faultedInActiveGrowableMemory) {
</del><ins>+        if (faultedInActiveFastMemory) {
</ins><span class="cx">             dataLogLnIf(WasmFaultSignalHandlerInternal::verbose, "found active fast memory for faulting address");
</span><del>-
-            auto didFaultInWasm = [](void* faultingInstruction) {
-                if (LLInt::isWasmLLIntPC(faultingInstruction))
-                    return true;
-                auto& calleeRegistry = CalleeRegistry::singleton();
-                auto locker = holdLock(calleeRegistry.getLock());
-                for (auto* callee : calleeRegistry.allCallees(locker)) {
-                    auto [start, end] = callee->range();
-                    dataLogLnIf(WasmFaultSignalHandlerInternal::verbose, "function start: ", RawPointer(start), " end: ", RawPointer(end));
-                    if (start <= faultingInstruction && faultingInstruction < end) {
-                        dataLogLnIf(WasmFaultSignalHandlerInternal::verbose, "found match");
-                        return true;
-                    }
</del><ins>+            auto& calleeRegistry = CalleeRegistry::singleton();
+            auto locker = holdLock(calleeRegistry.getLock());
+            for (auto* callee : calleeRegistry.allCallees(locker)) {
+                auto [start, end] = callee->range();
+                dataLogLnIf(WasmFaultSignalHandlerInternal::verbose, "function start: ", RawPointer(start), " end: ", RawPointer(end));
+                if (start <= faultingInstruction && faultingInstruction < end) {
+                    dataLogLnIf(WasmFaultSignalHandlerInternal::verbose, "found match");
+                    MachineContext::argumentPointer<1>(context) = reinterpret_cast<void*>(static_cast<uintptr_t>(Wasm::Context::useFastTLS()));
+                    MachineContext::setInstructionPointer(context, LLInt::getCodePtr<CFunctionPtrTag>(wasm_throw_from_fault_handler_trampoline));
+                    return SignalAction::Handled;
</ins><span class="cx">                 }
</span><del>-                return false;
-            };
-
-            if (didFaultInWasm(faultingInstruction)) {
-                MachineContext::argumentPointer<1>(context) = reinterpret_cast<void*>(static_cast<uintptr_t>(Wasm::Context::useFastTLS()));
-                MachineContext::setInstructionPointer(context, LLInt::getCodePtr<CFunctionPtrTag>(wasm_throw_from_fault_handler_trampoline));
-                return SignalAction::Handled;
</del><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -103,7 +92,7 @@
</span><span class="cx">     return SignalAction::NotHandled;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#endif // ENABLE(WEBASSEMBLY_SIGNALING_MEMORY)
</del><ins>+#endif // ENABLE(WEBASSEMBLY_FAST_MEMORY)
</ins><span class="cx"> 
</span><span class="cx"> bool fastMemoryEnabled()
</span><span class="cx"> {
</span><span class="lines">@@ -112,13 +101,13 @@
</span><span class="cx"> 
</span><span class="cx"> void enableFastMemory()
</span><span class="cx"> {
</span><del>-#if ENABLE(WEBASSEMBLY_SIGNALING_MEMORY)
</del><ins>+#if ENABLE(WEBASSEMBLY_FAST_MEMORY)
</ins><span class="cx">     static std::once_flag once;
</span><span class="cx">     std::call_once(once, [] {
</span><span class="cx">         if (!Wasm::isSupported())
</span><span class="cx">             return;
</span><span class="cx"> 
</span><del>-        if (!Options::useWebAssemblyFastMemory() && !Options::useSharedArrayBuffer())
</del><ins>+        if (!Options::useWebAssemblyFastMemory())
</ins><span class="cx">             return;
</span><span class="cx"> 
</span><span class="cx">         activateSignalHandlersFor(Signal::AccessFault);
</span><span class="lines">@@ -130,13 +119,13 @@
</span><span class="cx"> 
</span><span class="cx"> void prepareFastMemory()
</span><span class="cx"> {
</span><del>-#if ENABLE(WEBASSEMBLY_SIGNALING_MEMORY)
</del><ins>+#if ENABLE(WEBASSEMBLY_FAST_MEMORY)
</ins><span class="cx">     static std::once_flag once;
</span><span class="cx">     std::call_once(once, [] {
</span><span class="cx">         if (!Wasm::isSupported())
</span><span class="cx">             return;
</span><span class="cx"> 
</span><del>-        if (!Options::useWebAssemblyFastMemory() && !Options::useSharedArrayBuffer())
</del><ins>+        if (!Options::useWebAssemblyFastMemory())
</ins><span class="cx">             return;
</span><span class="cx"> 
</span><span class="cx">         addSignalHandler(Signal::AccessFault, [] (Signal signal, SigInfo& sigInfo, PlatformRegisters& ucontext) {
</span><span class="lines">@@ -143,7 +132,7 @@
</span><span class="cx">             return trapHandler(signal, sigInfo, ucontext);
</span><span class="cx">         });
</span><span class="cx">     });
</span><del>-#endif // ENABLE(WEBASSEMBLY_SIGNALING_MEMORY)
</del><ins>+#endif // ENABLE(WEBASSEMBLY_FAST_MEMORY)
</ins><span class="cx"> }
</span><span class="cx">     
</span><span class="cx"> } } // namespace JSC::Wasm
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmWasmInstanceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/WasmInstance.h (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/WasmInstance.h  2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/wasm/WasmInstance.h     2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -77,8 +77,8 @@
</span><span class="cx">     Table* table(unsigned);
</span><span class="cx">     void setTable(unsigned, Ref<Table>&&);
</span><span class="cx"> 
</span><del>-    void* cachedMemory() const { return m_cachedMemory.getMayBeNull(cachedBoundsCheckingSize()); }
-    size_t cachedBoundsCheckingSize() const { return m_cachedBoundsCheckingSize; }
</del><ins>+    void* cachedMemory() const { return m_cachedMemory.getMayBeNull(cachedMemorySize()); }
+    size_t cachedMemorySize() const { return m_cachedMemorySize; }
</ins><span class="cx"> 
</span><span class="cx">     void setMemory(Ref<Memory>&& memory)
</span><span class="cx">     {
</span><span class="lines">@@ -89,8 +89,8 @@
</span><span class="cx">     void updateCachedMemory()
</span><span class="cx">     {
</span><span class="cx">         if (m_memory != nullptr) {
</span><del>-            m_cachedMemory = CagedPtr<Gigacage::Primitive, void, tagCagedPtr>(memory()->memory(), memory()->boundsCheckingSize());
-            m_cachedBoundsCheckingSize = memory()->boundsCheckingSize();
</del><ins>+            m_cachedMemory = CagedPtr<Gigacage::Primitive, void, tagCagedPtr>(memory()->memory(), memory()->size());
+            m_cachedMemorySize = memory()->size();
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -146,7 +146,7 @@
</span><span class="cx">     static ptrdiff_t offsetOfMemory() { return OBJECT_OFFSETOF(Instance, m_memory); }
</span><span class="cx">     static ptrdiff_t offsetOfGlobals() { return OBJECT_OFFSETOF(Instance, m_globals); }
</span><span class="cx">     static ptrdiff_t offsetOfCachedMemory() { return OBJECT_OFFSETOF(Instance, m_cachedMemory); }
</span><del>-    static ptrdiff_t offsetOfCachedBoundsCheckingSize() { return OBJECT_OFFSETOF(Instance, m_cachedBoundsCheckingSize); }
</del><ins>+    static ptrdiff_t offsetOfCachedMemorySize() { return OBJECT_OFFSETOF(Instance, m_cachedMemorySize); }
</ins><span class="cx">     static ptrdiff_t offsetOfPointerToTopEntryFrame() { return OBJECT_OFFSETOF(Instance, m_pointerToTopEntryFrame); }
</span><span class="cx"> 
</span><span class="cx">     static ptrdiff_t offsetOfPointerToActualStackLimit() { return OBJECT_OFFSETOF(Instance, m_pointerToActualStackLimit); }
</span><span class="lines">@@ -201,7 +201,7 @@
</span><span class="cx">     void* m_owner { nullptr }; // In a JS embedding, this is a JSWebAssemblyInstance*.
</span><span class="cx">     Context* m_context { nullptr };
</span><span class="cx">     CagedPtr<Gigacage::Primitive, void, tagCagedPtr> m_cachedMemory;
</span><del>-    size_t m_cachedBoundsCheckingSize { 0 };
</del><ins>+    size_t m_cachedMemorySize { 0 };
</ins><span class="cx">     Ref<Module> m_module;
</span><span class="cx">     RefPtr<CodeBlock> m_codeBlock;
</span><span class="cx">     RefPtr<Memory> m_memory;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmWasmMemorycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/WasmMemory.cpp (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/WasmMemory.cpp  2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/wasm/WasmMemory.cpp     2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -36,7 +36,6 @@
</span><span class="cx"> #include <wtf/Platform.h>
</span><span class="cx"> #include <wtf/PrintStream.h>
</span><span class="cx"> #include <wtf/RAMSize.h>
</span><del>-#include <wtf/StdSet.h>
</del><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx"> 
</span><span class="cx"> #include <cstring>
</span><span class="lines">@@ -134,39 +133,10 @@
</span><span class="cx">         
</span><span class="cx">         dataLogLnIf(Options::logWebAssemblyMemory(), "Freed virtual; state: ", *this);
</span><span class="cx">     }
</span><del>-
-    MemoryResult tryAllocateGrowableBoundsCheckingMemory(size_t mappedCapacity)
</del><ins>+    
+    bool isAddressInFastMemory(void* address)
</ins><span class="cx">     {
</span><del>-        MemoryResult result = [&] {
-            auto holder = holdLock(m_lock);
-            void* result = Gigacage::tryAllocateZeroedVirtualPages(Gigacage::Primitive, mappedCapacity);
-            if (!result)
-                return MemoryResult(nullptr, MemoryResult::SyncTryToReclaimMemory);
-
-            m_growableBoundsCheckingMemories.insert(std::make_pair(bitwise_cast<uintptr_t>(result), mappedCapacity));
-
-            return MemoryResult(result, MemoryResult::Success);
-        }();
-
-        dataLogLnIf(Options::logWebAssemblyMemory(), "Allocated virtual: ", result, "; state: ", *this);
-
-        return result;
-    }
-
-    void freeGrowableBoundsCheckingMemory(void* basePtr, size_t mappedCapacity)
-    {
-        {
-            auto holder = holdLock(m_lock);
-            Gigacage::freeVirtualPages(Gigacage::Primitive, basePtr, mappedCapacity);
-            m_growableBoundsCheckingMemories.erase(std::make_pair(bitwise_cast<uintptr_t>(basePtr), mappedCapacity));
-        }
-
-        dataLogLnIf(Options::logWebAssemblyMemory(), "Freed virtual; state: ", *this);
-    }
-
-    bool isInGrowableOrFastMemory(void* address)
-    {
-        // NOTE: This can be called from a signal handler, but only after we proved that we're in JIT code or WasmLLInt code.
</del><ins>+        // NOTE: This can be called from a signal handler, but only after we proved that we're in JIT code.
</ins><span class="cx">         auto holder = holdLock(m_lock);
</span><span class="cx">         for (void* memory : m_fastMemories) {
</span><span class="cx">             char* start = static_cast<char*>(memory);
</span><span class="lines">@@ -173,16 +143,6 @@
</span><span class="cx">             if (start <= address && address <= start + Memory::fastMappedBytes())
</span><span class="cx">                 return true;
</span><span class="cx">         }
</span><del>-        uintptr_t addressValue = bitwise_cast<uintptr_t>(address);
-        auto iterator = std::upper_bound(m_growableBoundsCheckingMemories.begin(), m_growableBoundsCheckingMemories.end(), std::make_pair(addressValue, 0),
-            [](std::pair<uintptr_t, size_t> a, std::pair<uintptr_t, size_t> b) {
-                return (a.first + a.second) < (b.first + b.second);
-            });
-        if (iterator != m_growableBoundsCheckingMemories.end()) {
-            // Since we never have overlapped range in m_growableBoundsCheckingMemories, just checking one lower-bound range is enough.
-            if (iterator->first <= addressValue && addressValue < (iterator->first + iterator->second))
-                return true;
-        }
</del><span class="cx">         return false;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -232,7 +192,6 @@
</span><span class="cx">     Lock m_lock;
</span><span class="cx">     unsigned m_maxFastMemoryCount { 0 };
</span><span class="cx">     Vector<void*> m_fastMemories;
</span><del>-    StdSet<std::pair<uintptr_t, size_t>> m_growableBoundsCheckingMemories;
</del><span class="cx">     size_t m_physicalBytes { 0 };
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -276,73 +235,30 @@
</span><span class="cx"> 
</span><span class="cx"> } // anonymous namespace
</span><span class="cx"> 
</span><del>-
-MemoryHandle::MemoryHandle(void* memory, size_t size, size_t mappedCapacity, PageCount initial, PageCount maximum, MemorySharingMode sharingMode, MemoryMode mode)
-    : m_memory(memory, mappedCapacity)
-    , m_size(size)
-    , m_mappedCapacity(mappedCapacity)
-    , m_initial(initial)
-    , m_maximum(maximum)
-    , m_sharingMode(sharingMode)
-    , m_mode(mode)
-{
-#if ASSERT_ENABLED
-    if (sharingMode == MemorySharingMode::Default && mode == MemoryMode::BoundsChecking)
-        ASSERT(mappedCapacity == size);
-#endif
-}
-
-MemoryHandle::~MemoryHandle()
-{
-    if (m_memory) {
-        memoryManager().freePhysicalBytes(m_size);
-        switch (m_mode) {
-        case MemoryMode::Signaling:
-            if (mprotect(memory(), Memory::fastMappedBytes(), PROT_READ | PROT_WRITE)) {
-                dataLog("mprotect failed: ", strerror(errno), "\n");
-                RELEASE_ASSERT_NOT_REACHED();
-            }
-            memoryManager().freeFastMemory(memory());
-            break;
-        case MemoryMode::BoundsChecking: {
-            switch (m_sharingMode) {
-            case MemorySharingMode::Default:
-                Gigacage::freeVirtualPages(Gigacage::Primitive, memory(), m_size);
-                break;
-            case MemorySharingMode::Shared: {
-                if (mprotect(memory(), m_mappedCapacity, PROT_READ | PROT_WRITE)) {
-                    dataLog("mprotect failed: ", strerror(errno), "\n");
-                    RELEASE_ASSERT_NOT_REACHED();
-                }
-                memoryManager().freeGrowableBoundsCheckingMemory(memory(), m_mappedCapacity);
-                break;
-            }
-            }
-            break;
-        }
-        }
-    }
-}
-
</del><span class="cx"> Memory::Memory()
</span><del>-    : m_handle(adoptRef(*new MemoryHandle(nullptr, 0, 0, PageCount(0), PageCount(0), MemorySharingMode::Default, MemoryMode::BoundsChecking)))
</del><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Memory::Memory(PageCount initial, PageCount maximum, MemorySharingMode sharingMode, Function<void(NotifyPressure)>&& notifyMemoryPressure, Function<void(SyncTryToReclaim)>&& syncTryToReclaimMemory, WTF::Function<void(GrowSuccess, PageCount, PageCount)>&& growSuccessCallback)
-    : m_handle(adoptRef(*new MemoryHandle(nullptr, 0, 0, initial, maximum, sharingMode, MemoryMode::BoundsChecking)))
</del><ins>+Memory::Memory(PageCount initial, PageCount maximum, Function<void(NotifyPressure)>&& notifyMemoryPressure, Function<void(SyncTryToReclaim)>&& syncTryToReclaimMemory, WTF::Function<void(GrowSuccess, PageCount, PageCount)>&& growSuccessCallback)
+    : m_initial(initial)
+    , m_maximum(maximum)
</ins><span class="cx">     , m_notifyMemoryPressure(WTFMove(notifyMemoryPressure))
</span><span class="cx">     , m_syncTryToReclaimMemory(WTFMove(syncTryToReclaimMemory))
</span><span class="cx">     , m_growSuccessCallback(WTFMove(growSuccessCallback))
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!initial.bytes());
</span><del>-    ASSERT(mode() == MemoryMode::BoundsChecking);
</del><ins>+    ASSERT(m_mode == MemoryMode::BoundsChecking);
</ins><span class="cx">     dataLogLnIf(verbose, "Memory::Memory allocating ", *this);
</span><span class="cx">     ASSERT(!memory());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Memory::Memory(Ref<MemoryHandle>&& handle, Function<void(NotifyPressure)>&& notifyMemoryPressure, Function<void(SyncTryToReclaim)>&& syncTryToReclaimMemory, WTF::Function<void(GrowSuccess, PageCount, PageCount)>&& growSuccessCallback)
-    : m_handle(WTFMove(handle))
</del><ins>+Memory::Memory(void* memory, PageCount initial, PageCount maximum, size_t mappedCapacity, MemoryMode mode, Function<void(NotifyPressure)>&& notifyMemoryPressure, Function<void(SyncTryToReclaim)>&& syncTryToReclaimMemory, WTF::Function<void(GrowSuccess, PageCount, PageCount)>&& growSuccessCallback)
+    : m_memory(memory, initial.bytes())
+    , m_size(initial.bytes())
+    , m_initial(initial)
+    , m_maximum(maximum)
+    , m_mappedCapacity(mappedCapacity)
+    , m_mode(mode)
</ins><span class="cx">     , m_notifyMemoryPressure(WTFMove(notifyMemoryPressure))
</span><span class="cx">     , m_syncTryToReclaimMemory(WTFMove(syncTryToReclaimMemory))
</span><span class="cx">     , m_growSuccessCallback(WTFMove(growSuccessCallback))
</span><span class="lines">@@ -355,13 +271,8 @@
</span><span class="cx">     return adoptRef(*new Memory());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref<Memory> Memory::create(Ref<MemoryHandle>&& handle, WTF::Function<void(NotifyPressure)>&& notifyMemoryPressure, WTF::Function<void(SyncTryToReclaim)>&& syncTryToReclaimMemory, WTF::Function<void(GrowSuccess, PageCount, PageCount)>&& growSuccessCallback)
</del><ins>+RefPtr<Memory> Memory::tryCreate(PageCount initial, PageCount maximum, WTF::Function<void(NotifyPressure)>&& notifyMemoryPressure, WTF::Function<void(SyncTryToReclaim)>&& syncTryToReclaimMemory, WTF::Function<void(GrowSuccess, PageCount, PageCount)>&& growSuccessCallback)
</ins><span class="cx"> {
</span><del>-    return adoptRef(*new Memory(WTFMove(handle), WTFMove(notifyMemoryPressure), WTFMove(syncTryToReclaimMemory), WTFMove(growSuccessCallback)));
-}
-
-RefPtr<Memory> Memory::tryCreate(PageCount initial, PageCount maximum, MemorySharingMode sharingMode, WTF::Function<void(NotifyPressure)>&& notifyMemoryPressure, WTF::Function<void(SyncTryToReclaim)>&& syncTryToReclaimMemory, WTF::Function<void(GrowSuccess, PageCount, PageCount)>&& growSuccessCallback)
-{
</del><span class="cx">     ASSERT(initial);
</span><span class="cx">     RELEASE_ASSERT(!maximum || maximum >= initial); // This should be guaranteed by our caller.
</span><span class="cx"> 
</span><span class="lines">@@ -374,7 +285,7 @@
</span><span class="cx">     if (maximum && !maximumBytes) {
</span><span class="cx">         // User specified a zero maximum, initial size must also be zero.
</span><span class="cx">         RELEASE_ASSERT(!initialBytes);
</span><del>-        return adoptRef(new Memory(initial, maximum, sharingMode, WTFMove(notifyMemoryPressure), WTFMove(syncTryToReclaimMemory), WTFMove(growSuccessCallback)));
</del><ins>+        return adoptRef(new Memory(initial, maximum, WTFMove(notifyMemoryPressure), WTFMove(syncTryToReclaimMemory), WTFMove(growSuccessCallback)));
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     bool done = tryAllocate(
</span><span class="lines">@@ -395,12 +306,13 @@
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     if (fastMemory) {
</span><ins>+        
</ins><span class="cx">         if (mprotect(fastMemory + initialBytes, Memory::fastMappedBytes() - initialBytes, PROT_NONE)) {
</span><span class="cx">             dataLog("mprotect failed: ", strerror(errno), "\n");
</span><span class="cx">             RELEASE_ASSERT_NOT_REACHED();
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        return Memory::create(adoptRef(*new MemoryHandle(fastMemory, initialBytes, Memory::fastMappedBytes(), initial, maximum, sharingMode, MemoryMode::Signaling)), WTFMove(notifyMemoryPressure), WTFMove(syncTryToReclaimMemory), WTFMove(growSuccessCallback));
</del><ins>+        return adoptRef(new Memory(fastMemory, initial, maximum, Memory::fastMappedBytes(), MemoryMode::Signaling, WTFMove(notifyMemoryPressure), WTFMove(syncTryToReclaimMemory), WTFMove(growSuccessCallback)));
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     if (UNLIKELY(Options::crashIfWebAssemblyCantFastMemory()))
</span><span class="lines">@@ -407,44 +319,35 @@
</span><span class="cx">         webAssemblyCouldntGetFastMemory();
</span><span class="cx"> 
</span><span class="cx">     if (!initialBytes)
</span><del>-        return adoptRef(new Memory(initial, maximum, sharingMode, WTFMove(notifyMemoryPressure), WTFMove(syncTryToReclaimMemory), WTFMove(growSuccessCallback)));
-
-    switch (sharingMode) {
-    case MemorySharingMode::Default: {
-        void* slowMemory = Gigacage::tryAllocateZeroedVirtualPages(Gigacage::Primitive, initialBytes);
-        if (!slowMemory) {
-            memoryManager().freePhysicalBytes(initialBytes);
-            return nullptr;
-        }
-        return Memory::create(adoptRef(*new MemoryHandle(slowMemory, initialBytes, initialBytes, initial, maximum, sharingMode, MemoryMode::BoundsChecking)), WTFMove(notifyMemoryPressure), WTFMove(syncTryToReclaimMemory), WTFMove(growSuccessCallback));
</del><ins>+        return adoptRef(new Memory(initial, maximum, WTFMove(notifyMemoryPressure), WTFMove(syncTryToReclaimMemory), WTFMove(growSuccessCallback)));
+    
+    void* slowMemory = Gigacage::tryAllocateZeroedVirtualPages(Gigacage::Primitive, initialBytes);
+    if (!slowMemory) {
+        memoryManager().freePhysicalBytes(initialBytes);
+        return nullptr;
</ins><span class="cx">     }
</span><del>-    case MemorySharingMode::Shared: {
-        char* slowMemory = nullptr;
-        tryAllocate(
-            [&] () -> MemoryResult::Kind {
-                auto result = memoryManager().tryAllocateGrowableBoundsCheckingMemory(maximumBytes);
-                slowMemory = bitwise_cast<char*>(result.basePtr);
-                return result.kind;
-            }, notifyMemoryPressure, syncTryToReclaimMemory);
-        if (!slowMemory) {
-            memoryManager().freePhysicalBytes(initialBytes);
-            return nullptr;
-        }
</del><ins>+    return adoptRef(new Memory(slowMemory, initial, maximum, initialBytes, MemoryMode::BoundsChecking, WTFMove(notifyMemoryPressure), WTFMove(syncTryToReclaimMemory), WTFMove(growSuccessCallback)));
+}
</ins><span class="cx"> 
</span><del>-        if (mprotect(slowMemory + initialBytes, maximumBytes - initialBytes, PROT_NONE)) {
-            dataLog("mprotect failed: ", strerror(errno), "\n");
-            RELEASE_ASSERT_NOT_REACHED();
</del><ins>+Memory::~Memory()
+{
+    if (m_memory) {
+        memoryManager().freePhysicalBytes(m_size);
+        switch (m_mode) {
+        case MemoryMode::Signaling:
+            if (mprotect(memory(), Memory::fastMappedBytes(), PROT_READ | PROT_WRITE)) {
+                dataLog("mprotect failed: ", strerror(errno), "\n");
+                RELEASE_ASSERT_NOT_REACHED();
+            }
+            memoryManager().freeFastMemory(memory());
+            break;
+        case MemoryMode::BoundsChecking:
+            Gigacage::freeVirtualPages(Gigacage::Primitive, memory(), m_size);
+            break;
</ins><span class="cx">         }
</span><del>-
-        return Memory::create(adoptRef(*new MemoryHandle(slowMemory, initialBytes, maximumBytes, initial, maximum, sharingMode, MemoryMode::BoundsChecking)), WTFMove(notifyMemoryPressure), WTFMove(syncTryToReclaimMemory), WTFMove(growSuccessCallback));
</del><span class="cx">     }
</span><del>-    }
-    RELEASE_ASSERT_NOT_REACHED();
-    return nullptr;
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-Memory::~Memory() = default;
-
</del><span class="cx"> size_t Memory::fastMappedRedzoneBytes()
</span><span class="cx"> {
</span><span class="cx">     return static_cast<size_t>(PageCount::pageSize) * Options::webAssemblyFastMemoryRedzonePages();
</span><span class="lines">@@ -456,76 +359,18 @@
</span><span class="cx">     return (static_cast<size_t>(1) << 32) + fastMappedRedzoneBytes();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool Memory::addressIsInGrowableOrFastMemory(void* address)
</del><ins>+bool Memory::addressIsInActiveFastMemory(void* address)
</ins><span class="cx"> {
</span><del>-    return memoryManager().isInGrowableOrFastMemory(address);
</del><ins>+    return memoryManager().isAddressInFastMemory(address);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-Expected<PageCount, Memory::GrowFailReason> Memory::growShared(PageCount delta)
</del><ins>+Expected<PageCount, Memory::GrowFailReason> Memory::grow(PageCount delta)
</ins><span class="cx"> {
</span><del>-    Wasm::PageCount oldPageCount;
-    Wasm::PageCount newPageCount;
-    auto result = ([&]() -> Expected<PageCount, Memory::GrowFailReason> {
-        auto locker = holdLock(m_handle->lock());
</del><ins>+    const Wasm::PageCount oldPageCount = sizeInPages();
</ins><span class="cx"> 
</span><del>-        oldPageCount = sizeInPages();
-        newPageCount = oldPageCount + delta;
-        if (!newPageCount || !newPageCount.isValid())
-            return makeUnexpected(GrowFailReason::InvalidGrowSize);
-        if (newPageCount.bytes() > MAX_ARRAY_BUFFER_SIZE)
-            return makeUnexpected(GrowFailReason::OutOfMemory);
-
-        if (!delta.pageCount())
-            return oldPageCount;
-
-        dataLogLnIf(verbose, "Memory::grow(", delta, ") to ", newPageCount, " from ", *this);
-        RELEASE_ASSERT(newPageCount > PageCount::fromBytes(size()));
-
-        if (maximum() && newPageCount > maximum())
-            return makeUnexpected(GrowFailReason::WouldExceedMaximum);
-
-        size_t desiredSize = newPageCount.bytes();
-        RELEASE_ASSERT(desiredSize <= MAX_ARRAY_BUFFER_SIZE);
-        RELEASE_ASSERT(desiredSize > size());
-
-        // If the memory is MemorySharingMode::Shared, we already allocated enough virtual address space even if the memory is bound-checking mode. We perform mprotect to extend.
-        size_t extraBytes = desiredSize - size();
-        RELEASE_ASSERT(extraBytes);
-        bool allocationSuccess = tryAllocate(
-            [&] () -> MemoryResult::Kind {
-                return memoryManager().tryAllocatePhysicalBytes(extraBytes);
-            }, [](Wasm::Memory::NotifyPressure) { }, [](Memory::SyncTryToReclaim) { });
-        if (!allocationSuccess)
-            return makeUnexpected(GrowFailReason::OutOfMemory);
-
-        RELEASE_ASSERT(memory());
-
-        // Signaling memory must have been pre-allocated virtually.
-        uint8_t* startAddress = static_cast<uint8_t*>(memory()) + size();
-
-        dataLogLnIf(verbose, "Marking WebAssembly memory's ", RawPointer(memory()), " as read+write in range [", RawPointer(startAddress), ", ", RawPointer(startAddress + extraBytes), ")");
-        if (mprotect(startAddress, extraBytes, PROT_READ | PROT_WRITE)) {
-            dataLog("mprotect failed: ", strerror(errno), "\n");
-            RELEASE_ASSERT_NOT_REACHED();
-        }
-
-        m_handle->growToSize(desiredSize);
-        return oldPageCount;
-    }());
-    if (result)
-        m_growSuccessCallback(GrowSuccessTag, oldPageCount, newPageCount);
-    return result;
-}
-
-Expected<PageCount, Memory::GrowFailReason> Memory::grow(PageCount delta)
-{
</del><span class="cx">     if (!delta.isValid())
</span><span class="cx">         return makeUnexpected(GrowFailReason::InvalidDelta);
</span><del>-
-    if (sharingMode() == MemorySharingMode::Shared)
-        return growShared(delta);
-
-    const Wasm::PageCount oldPageCount = sizeInPages();
</del><ins>+    
</ins><span class="cx">     const Wasm::PageCount newPageCount = oldPageCount + delta;
</span><span class="cx">     if (!newPageCount || !newPageCount.isValid())
</span><span class="cx">         return makeUnexpected(GrowFailReason::InvalidGrowSize);
</span><span class="lines">@@ -546,7 +391,7 @@
</span><span class="cx">         return success();
</span><span class="cx"> 
</span><span class="cx">     dataLogLnIf(verbose, "Memory::grow(", delta, ") to ", newPageCount, " from ", *this);
</span><del>-    RELEASE_ASSERT(newPageCount > PageCount::fromBytes(size()));
</del><ins>+    RELEASE_ASSERT(newPageCount > PageCount::fromBytes(m_size));
</ins><span class="cx"> 
</span><span class="cx">     if (maximum() && newPageCount > maximum())
</span><span class="cx">         return makeUnexpected(GrowFailReason::WouldExceedMaximum);
</span><span class="lines">@@ -553,16 +398,18 @@
</span><span class="cx"> 
</span><span class="cx">     size_t desiredSize = newPageCount.bytes();
</span><span class="cx">     RELEASE_ASSERT(desiredSize <= MAX_ARRAY_BUFFER_SIZE);
</span><del>-    RELEASE_ASSERT(desiredSize > size());
</del><ins>+    RELEASE_ASSERT(desiredSize > m_size);
+    size_t extraBytes = desiredSize - m_size;
+    RELEASE_ASSERT(extraBytes);
+    bool allocationSuccess = tryAllocate(
+        [&] () -> MemoryResult::Kind {
+            return memoryManager().tryAllocatePhysicalBytes(extraBytes);
+        }, m_notifyMemoryPressure, m_syncTryToReclaimMemory);
+    if (!allocationSuccess)
+        return makeUnexpected(GrowFailReason::OutOfMemory);
+
</ins><span class="cx">     switch (mode()) {
</span><span class="cx">     case MemoryMode::BoundsChecking: {
</span><del>-        bool allocationSuccess = tryAllocate(
-            [&] () -> MemoryResult::Kind {
-                return memoryManager().tryAllocatePhysicalBytes(desiredSize);
-            }, m_notifyMemoryPressure, m_syncTryToReclaimMemory);
-        if (!allocationSuccess)
-            return makeUnexpected(GrowFailReason::OutOfMemory);
-
</del><span class="cx">         RELEASE_ASSERT(maximum().bytes() != 0);
</span><span class="cx"> 
</span><span class="cx">         void* newMemory = Gigacage::tryAllocateZeroedVirtualPages(Gigacage::Primitive, desiredSize);
</span><span class="lines">@@ -569,27 +416,19 @@
</span><span class="cx">         if (!newMemory)
</span><span class="cx">             return makeUnexpected(GrowFailReason::OutOfMemory);
</span><span class="cx"> 
</span><del>-        memcpy(newMemory, memory(), size());
-        auto newHandle = adoptRef(*new MemoryHandle(newMemory, desiredSize, desiredSize, initial(), maximum(), sharingMode(), MemoryMode::BoundsChecking));
-        m_handle = WTFMove(newHandle);
-
</del><ins>+        memcpy(newMemory, memory(), m_size);
+        if (m_memory)
+            Gigacage::freeVirtualPages(Gigacage::Primitive, memory(), m_size);
+        m_memory = CagedMemory(newMemory, desiredSize);
+        m_mappedCapacity = desiredSize;
+        m_size = desiredSize;
</ins><span class="cx">         ASSERT(memory() == newMemory);
</span><span class="cx">         return success();
</span><span class="cx">     }
</span><span class="cx">     case MemoryMode::Signaling: {
</span><del>-        size_t extraBytes = desiredSize - size();
-        RELEASE_ASSERT(extraBytes);
-        bool allocationSuccess = tryAllocate(
-            [&] () -> MemoryResult::Kind {
-                return memoryManager().tryAllocatePhysicalBytes(extraBytes);
-            }, m_notifyMemoryPressure, m_syncTryToReclaimMemory);
-        if (!allocationSuccess)
-            return makeUnexpected(GrowFailReason::OutOfMemory);
-
</del><span class="cx">         RELEASE_ASSERT(memory());
</span><del>-
</del><span class="cx">         // Signaling memory must have been pre-allocated virtually.
</span><del>-        uint8_t* startAddress = static_cast<uint8_t*>(memory()) + size();
</del><ins>+        uint8_t* startAddress = static_cast<uint8_t*>(memory()) + m_size;
</ins><span class="cx">         
</span><span class="cx">         dataLogLnIf(verbose, "Marking WebAssembly memory's ", RawPointer(memory()), " as read+write in range [", RawPointer(startAddress), ", ", RawPointer(startAddress + extraBytes), ")");
</span><span class="cx">         if (mprotect(startAddress, extraBytes, PROT_READ | PROT_WRITE)) {
</span><span class="lines">@@ -596,8 +435,8 @@
</span><span class="cx">             dataLog("mprotect failed: ", strerror(errno), "\n");
</span><span class="cx">             RELEASE_ASSERT_NOT_REACHED();
</span><span class="cx">         }
</span><del>-
-        m_handle->growToSize(desiredSize);
</del><ins>+        m_memory.recage(m_size, desiredSize);
+        m_size = desiredSize;
</ins><span class="cx">         return success();
</span><span class="cx">     }
</span><span class="cx">     }
</span><span class="lines">@@ -620,8 +459,7 @@
</span><span class="cx"> 
</span><span class="cx"> void Memory::dump(PrintStream& out) const
</span><span class="cx"> {
</span><del>-    auto handle = m_handle.copyRef();
-    out.print("Memory at ", RawPointer(handle->memory()), ", size ", handle->size(), "B capacity ", handle->mappedCapacity(), "B, initial ", handle->initial(), " maximum ", handle->maximum(), " mode ", makeString(handle->mode()), " sharingMode ", makeString(handle->sharingMode()));
</del><ins>+    out.print("Memory at ", RawPointer(memory()), ", size ", m_size, "B capacity ", m_mappedCapacity, "B, initial ", m_initial, " maximum ", m_maximum, " mode ", makeString(m_mode));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmWasmMemoryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/WasmMemory.h (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/WasmMemory.h    2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/wasm/WasmMemory.h       2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -44,55 +44,17 @@
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><del>-class LLIntOffsetsExtractor;
-
</del><span class="cx"> namespace Wasm {
</span><span class="cx"> 
</span><span class="cx"> class Instance;
</span><span class="cx"> 
</span><del>-class MemoryHandle final : public ThreadSafeRefCounted<MemoryHandle> {
-    WTF_MAKE_NONCOPYABLE(MemoryHandle);
-    WTF_MAKE_FAST_ALLOCATED;
-    friend LLIntOffsetsExtractor;
-public:
-    MemoryHandle(void*, size_t size, size_t mappedCapacity, PageCount initial, PageCount maximum, MemorySharingMode, MemoryMode);
-    JS_EXPORT_PRIVATE ~MemoryHandle();
-
-    void* memory() const { ASSERT(m_memory.getMayBeNull(m_mappedCapacity) == m_memory.getUnsafe()); return m_memory.getMayBeNull(m_mappedCapacity); }
-    size_t size() const { return m_size; }
-    size_t mappedCapacity() const { return m_mappedCapacity; }
-    PageCount initial() const { return m_initial; }
-    PageCount maximum() const { return m_maximum; }
-    MemorySharingMode sharingMode() const { return m_sharingMode; }
-    MemoryMode mode() const { return m_mode; }
-    static ptrdiff_t offsetOfSize() { return OBJECT_OFFSETOF(MemoryHandle, m_size); }
-    Lock& lock() { return m_lock; }
-
-    void growToSize(size_t size)
-    {
-        m_size = size;
-    }
-
-private:
-    using CagedMemory = CagedPtr<Gigacage::Primitive, void, tagCagedPtr>;
-    CagedMemory m_memory;
-    size_t m_size { 0 };
-    size_t m_mappedCapacity { 0 };
-    PageCount m_initial;
-    PageCount m_maximum;
-    MemorySharingMode m_sharingMode { MemorySharingMode::Default };
-    MemoryMode m_mode { MemoryMode::BoundsChecking };
-    Lock m_lock;
-};
-
-class Memory final : public RefCounted<Memory> {
</del><ins>+class Memory : public RefCounted<Memory> {
</ins><span class="cx">     WTF_MAKE_NONCOPYABLE(Memory);
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><del>-    friend LLIntOffsetsExtractor;
</del><span class="cx"> public:
</span><span class="cx">     void dump(WTF::PrintStream&) const;
</span><span class="cx"> 
</span><del>-    explicit operator bool() const { return !!m_handle->memory(); }
</del><ins>+    explicit operator bool() const { return !!m_memory; }
</ins><span class="cx">     
</span><span class="cx">     enum NotifyPressure { NotifyPressureTag };
</span><span class="cx">     enum SyncTryToReclaim { SyncTryToReclaimTag };
</span><span class="lines">@@ -99,26 +61,23 @@
</span><span class="cx">     enum GrowSuccess { GrowSuccessTag };
</span><span class="cx"> 
</span><span class="cx">     static Ref<Memory> create();
</span><del>-    JS_EXPORT_PRIVATE static Ref<Memory> create(Ref<MemoryHandle>&&, WTF::Function<void(NotifyPressure)>&& notifyMemoryPressure, WTF::Function<void(SyncTryToReclaim)>&& syncTryToReclaimMemory, WTF::Function<void(GrowSuccess, PageCount, PageCount)>&& growSuccessCallback);
-    static RefPtr<Memory> tryCreate(PageCount initial, PageCount maximum, MemorySharingMode, WTF::Function<void(NotifyPressure)>&& notifyMemoryPressure, WTF::Function<void(SyncTryToReclaim)>&& syncTryToReclaimMemory, WTF::Function<void(GrowSuccess, PageCount, PageCount)>&& growSuccessCallback);
</del><ins>+    static RefPtr<Memory> tryCreate(PageCount initial, PageCount maximum, WTF::Function<void(NotifyPressure)>&& notifyMemoryPressure, WTF::Function<void(SyncTryToReclaim)>&& syncTryToReclaimMemory, WTF::Function<void(GrowSuccess, PageCount, PageCount)>&& growSuccessCallback);
</ins><span class="cx"> 
</span><del>-    JS_EXPORT_PRIVATE ~Memory();
</del><ins>+    ~Memory();
</ins><span class="cx"> 
</span><span class="cx">     static size_t fastMappedRedzoneBytes();
</span><span class="cx">     static size_t fastMappedBytes(); // Includes redzone.
</span><del>-    static bool addressIsInGrowableOrFastMemory(void*);
</del><ins>+    static bool addressIsInActiveFastMemory(void*);
</ins><span class="cx"> 
</span><del>-    void* memory() const { return m_handle->memory(); }
-    size_t size() const { return m_handle->size(); }
-    PageCount sizeInPages() const { return PageCount::fromBytes(size()); }
-    size_t boundsCheckingSize() const { return m_handle->mappedCapacity(); }
-    PageCount initial() const { return m_handle->initial(); }
-    PageCount maximum() const { return m_handle->maximum(); }
-    MemoryHandle& handle() { return m_handle.get(); }
</del><ins>+    void* memory() const { ASSERT(m_memory.getMayBeNull(size()) == m_memory.getUnsafe()); return m_memory.getMayBeNull(size()); }
+    size_t size() const { return m_size; }
+    PageCount sizeInPages() const { return PageCount::fromBytes(m_size); }
</ins><span class="cx"> 
</span><del>-    MemorySharingMode sharingMode() const { return m_handle->sharingMode(); }
-    MemoryMode mode() const { return m_handle->mode(); }
</del><ins>+    PageCount initial() const { return m_initial; }
+    PageCount maximum() const { return m_maximum; }
</ins><span class="cx"> 
</span><ins>+    MemoryMode mode() const { return m_mode; }
+
</ins><span class="cx">     enum class GrowFailReason {
</span><span class="cx">         InvalidDelta,
</span><span class="cx">         InvalidGrowSize,
</span><span class="lines">@@ -130,16 +89,21 @@
</span><span class="cx"> 
</span><span class="cx">     void check() {  ASSERT(!deletionHasBegun()); }
</span><span class="cx"> 
</span><del>-    static ptrdiff_t offsetOfHandle() { return OBJECT_OFFSETOF(Memory, m_handle); }
</del><ins>+    static ptrdiff_t offsetOfMemory() { return OBJECT_OFFSETOF(Memory, m_memory); }
+    static ptrdiff_t offsetOfSize() { return OBJECT_OFFSETOF(Memory, m_size); }
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     Memory();
</span><del>-    Memory(Ref<MemoryHandle>&&, WTF::Function<void(NotifyPressure)>&& notifyMemoryPressure, WTF::Function<void(SyncTryToReclaim)>&& syncTryToReclaimMemory, WTF::Function<void(GrowSuccess, PageCount, PageCount)>&& growSuccessCallback);
-    Memory(PageCount initial, PageCount maximum, MemorySharingMode, WTF::Function<void(NotifyPressure)>&& notifyMemoryPressure, WTF::Function<void(SyncTryToReclaim)>&& syncTryToReclaimMemory, WTF::Function<void(GrowSuccess, PageCount, PageCount)>&& growSuccessCallback);
</del><ins>+    Memory(void* memory, PageCount initial, PageCount maximum, size_t mappedCapacity, MemoryMode, WTF::Function<void(NotifyPressure)>&& notifyMemoryPressure, WTF::Function<void(SyncTryToReclaim)>&& syncTryToReclaimMemory, WTF::Function<void(GrowSuccess, PageCount, PageCount)>&& growSuccessCallback);
+    Memory(PageCount initial, PageCount maximum, WTF::Function<void(NotifyPressure)>&& notifyMemoryPressure, WTF::Function<void(SyncTryToReclaim)>&& syncTryToReclaimMemory, WTF::Function<void(GrowSuccess, PageCount, PageCount)>&& growSuccessCallback);
</ins><span class="cx"> 
</span><del>-    Expected<PageCount, GrowFailReason> growShared(PageCount);
-
-    Ref<MemoryHandle> m_handle;
</del><ins>+    using CagedMemory = CagedPtr<Gigacage::Primitive, void, tagCagedPtr>;
+    CagedMemory m_memory;
+    size_t m_size { 0 };
+    PageCount m_initial;
+    PageCount m_maximum;
+    size_t m_mappedCapacity { 0 };
+    MemoryMode m_mode { MemoryMode::BoundsChecking };
</ins><span class="cx">     WTF::Function<void(NotifyPressure)> m_notifyMemoryPressure;
</span><span class="cx">     WTF::Function<void(SyncTryToReclaim)> m_syncTryToReclaimMemory;
</span><span class="cx">     WTF::Function<void(GrowSuccess, PageCount, PageCount)> m_growSuccessCallback;
</span><span class="lines">@@ -155,7 +119,7 @@
</span><span class="cx"> class Memory {
</span><span class="cx"> public:
</span><span class="cx">     static size_t maxFastMemoryCount() { return 0; }
</span><del>-    static bool addressIsInGrowableOrFastMemory(void*) { return false; }
</del><ins>+    static bool addressIsInActiveFastMemory(void*) { return false; }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } } // namespace JSC::Wasm
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmWasmMemoryInformationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/WasmMemoryInformation.cpp (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/WasmMemoryInformation.cpp       2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/wasm/WasmMemoryInformation.cpp  2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -42,19 +42,19 @@
</span><span class="cx">         if (!Context::useFastTLS())
</span><span class="cx">             ++numberOfPinnedRegisters;
</span><span class="cx">         GPRReg baseMemoryPointer = GPRInfo::regCS3;
</span><del>-        GPRReg boundsCheckingSizeRegister = GPRInfo::regCS4;
</del><ins>+        GPRReg sizeRegister = GPRInfo::regCS4;
</ins><span class="cx">         GPRReg wasmContextInstancePointer = InvalidGPRReg;
</span><span class="cx">         if (!Context::useFastTLS())
</span><span class="cx">             wasmContextInstancePointer = GPRInfo::regCS0;
</span><span class="cx"> 
</span><del>-        staticPinnedRegisterInfo.construct(boundsCheckingSizeRegister, baseMemoryPointer, wasmContextInstancePointer);
</del><ins>+        staticPinnedRegisterInfo.construct(sizeRegister, baseMemoryPointer, wasmContextInstancePointer);
</ins><span class="cx">     });
</span><span class="cx"> 
</span><span class="cx">     return staticPinnedRegisterInfo.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PinnedRegisterInfo::PinnedRegisterInfo(GPRReg boundsCheckingSizeRegister, GPRReg baseMemoryPointer, GPRReg wasmContextInstancePointer)
-    : boundsCheckingSizeRegister(boundsCheckingSizeRegister)
</del><ins>+PinnedRegisterInfo::PinnedRegisterInfo(GPRReg sizeRegister, GPRReg baseMemoryPointer, GPRReg wasmContextInstancePointer)
+    : sizeRegister(sizeRegister)
</ins><span class="cx">     , baseMemoryPointer(baseMemoryPointer)
</span><span class="cx">     , wasmContextInstancePointer(wasmContextInstancePointer)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmWasmMemoryInformationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/WasmMemoryInformation.h (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/WasmMemoryInformation.h 2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/wasm/WasmMemoryInformation.h    2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx"> namespace JSC { namespace Wasm {
</span><span class="cx"> 
</span><span class="cx"> struct PinnedSizeRegisterInfo {
</span><del>-    GPRReg boundsCheckingSizeRegister;
</del><ins>+    GPRReg sizeRegister;
</ins><span class="cx">     unsigned sizeOffset;
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -56,11 +56,11 @@
</span><span class="cx">         if (wasmContextInstancePointer != InvalidGPRReg)
</span><span class="cx">             result.set(wasmContextInstancePointer);
</span><span class="cx">         if (mode != MemoryMode::Signaling)
</span><del>-            result.set(boundsCheckingSizeRegister);
</del><ins>+            result.set(sizeRegister);
</ins><span class="cx">         return result;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    GPRReg boundsCheckingSizeRegister;
</del><ins>+    GPRReg sizeRegister;
</ins><span class="cx">     GPRReg baseMemoryPointer;
</span><span class="cx">     GPRReg wasmContextInstancePointer;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmWasmMemoryModecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/WasmMemoryMode.cpp (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/WasmMemoryMode.cpp      2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/wasm/WasmMemoryMode.cpp 2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -42,16 +42,6 @@
</span><span class="cx">     return "";
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-const char* makeString(MemorySharingMode sharingMode)
-{
-    switch (sharingMode) {
-    case MemorySharingMode::Default: return "Default";
-    case MemorySharingMode::Shared: return "Shared";
-    }
-    RELEASE_ASSERT_NOT_REACHED();
-    return "";
-}
-
</del><span class="cx"> } } // namespace JSC::Wasm
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(WEBASSEMBLY)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmWasmMemoryModeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/WasmMemoryMode.h (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/WasmMemoryMode.h        2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/wasm/WasmMemoryMode.h   2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -40,13 +40,6 @@
</span><span class="cx"> static constexpr size_t NumberOfMemoryModes = 2;
</span><span class="cx"> JS_EXPORT_PRIVATE const char* makeString(MemoryMode);
</span><span class="cx"> 
</span><del>-enum class MemorySharingMode : uint8_t {
-    Default,
-    Shared,
-};
-
-JS_EXPORT_PRIVATE const char* makeString(MemorySharingMode);
-
</del><span class="cx"> } } // namespace JSC::Wasm
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(WEBASSEMBLY)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmjsJSToWasmcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/js/JSToWasm.cpp (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/js/JSToWasm.cpp 2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/wasm/js/JSToWasm.cpp    2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -221,7 +221,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (!!info.memory) {
</span><span class="cx">         GPRReg baseMemory = pinnedRegs.baseMemoryPointer;
</span><del>-        GPRReg scratchOrBoundsCheckingSize = wasmCallingConvention().prologueScratchGPRs[0];
</del><ins>+        GPRReg scratchOrSize = wasmCallingConvention().prologueScratchGPRs[0];
</ins><span class="cx"> 
</span><span class="cx">         if (Context::useFastTLS())
</span><span class="cx">             jit.loadWasmContextInstance(baseMemory);
</span><span class="lines">@@ -229,15 +229,15 @@
</span><span class="cx">         GPRReg currentInstanceGPR = Context::useFastTLS() ? baseMemory : wasmContextInstanceGPR;
</span><span class="cx">         if (isARM64E()) {
</span><span class="cx">             if (mode != Wasm::MemoryMode::Signaling)
</span><del>-                scratchOrBoundsCheckingSize = pinnedRegs.boundsCheckingSizeRegister;
-            jit.loadPtr(CCallHelpers::Address(currentInstanceGPR, Wasm::Instance::offsetOfCachedBoundsCheckingSize()), scratchOrBoundsCheckingSize);
</del><ins>+                scratchOrSize = pinnedRegs.sizeRegister;
+            jit.loadPtr(CCallHelpers::Address(currentInstanceGPR, Wasm::Instance::offsetOfCachedMemorySize()), scratchOrSize);
</ins><span class="cx">         } else {
</span><span class="cx">             if (mode != Wasm::MemoryMode::Signaling)
</span><del>-                jit.loadPtr(CCallHelpers::Address(currentInstanceGPR, Wasm::Instance::offsetOfCachedBoundsCheckingSize()), pinnedRegs.boundsCheckingSizeRegister);
</del><ins>+                jit.loadPtr(CCallHelpers::Address(currentInstanceGPR, Wasm::Instance::offsetOfCachedMemorySize()), pinnedRegs.sizeRegister);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         jit.loadPtr(CCallHelpers::Address(currentInstanceGPR, Wasm::Instance::offsetOfCachedMemory()), baseMemory);
</span><del>-        jit.cageConditionally(Gigacage::Primitive, baseMemory, scratchOrBoundsCheckingSize, scratchOrBoundsCheckingSize);
</del><ins>+        jit.cageConditionally(Gigacage::Primitive, baseMemory, scratchOrSize, scratchOrSize);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     CCallHelpers::Call call = jit.threadSafePatchableNearCall();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmjsJSWebAssemblyInstancecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.cpp (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.cpp    2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.cpp       2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -291,7 +291,7 @@
</span><span class="cx">             auto* jsMemory = JSWebAssemblyMemory::tryCreate(globalObject, vm, globalObject->webAssemblyMemoryStructure());
</span><span class="cx">             RETURN_IF_EXCEPTION(throwScope, nullptr);
</span><span class="cx"> 
</span><del>-            RefPtr<Wasm::Memory> memory = Wasm::Memory::tryCreate(moduleInformation.memory.initial(), moduleInformation.memory.maximum(), Wasm::MemorySharingMode::Default,
</del><ins>+            RefPtr<Wasm::Memory> memory = Wasm::Memory::tryCreate(moduleInformation.memory.initial(), moduleInformation.memory.maximum(),
</ins><span class="cx">                 [&vm] (Wasm::Memory::NotifyPressure) { vm.heap.collectAsync(CollectionScope::Full); },
</span><span class="cx">                 [&vm] (Wasm::Memory::SyncTryToReclaim) { vm.heap.collectSync(CollectionScope::Full); },
</span><span class="cx">                 [&vm, jsMemory] (Wasm::Memory::GrowSuccess, Wasm::PageCount oldPageCount, Wasm::PageCount newPageCount) { jsMemory->growSuccessCallback(vm, oldPageCount, newPageCount); });
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmjsJSWebAssemblyMemorycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyMemory.cpp (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyMemory.cpp      2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyMemory.cpp 2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> 
</span><span class="cx"> #include "ArrayBuffer.h"
</span><span class="cx"> #include "JSArrayBuffer.h"
</span><del>-#include "ObjectConstructor.h"
</del><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><span class="lines">@@ -73,34 +72,17 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-JSArrayBuffer* JSWebAssemblyMemory::buffer(JSGlobalObject* globalObject)
</del><ins>+JSArrayBuffer* JSWebAssemblyMemory::buffer(VM& vm, JSGlobalObject* globalObject)
</ins><span class="cx"> {
</span><del>-    VM& vm = globalObject->vm();
-    auto throwScope = DECLARE_THROW_SCOPE(vm);
</del><ins>+    if (m_bufferWrapper)
+        return m_bufferWrapper.get();
</ins><span class="cx"> 
</span><del>-    auto* wrapper = m_bufferWrapper.get();
-    if (wrapper) {
-        if (m_memory->sharingMode() == Wasm::MemorySharingMode::Default)
-            return wrapper;
-
-        ASSERT(m_memory->sharingMode() == Wasm::MemorySharingMode::Shared);
-        // If SharedArrayBuffer's underlying memory is not grown, we continue using cached wrapper.
-        if (wrapper->impl()->byteLength() == memory().size())
-            return wrapper;
-    }
-
-    Ref<Wasm::MemoryHandle> protectedHandle = m_memory->handle();
-    auto destructor = createSharedTask<void(void*)>([protectedHandle = WTFMove(protectedHandle)] (void*) { });
</del><ins>+    // We can't use a ref here since it doesn't have a copy constructor...
+    Ref<Wasm::Memory> protectedMemory = m_memory.get();
+    auto destructor = createSharedTask<void(void*)>([protectedMemory = WTFMove(protectedMemory)] (void*) { });
</ins><span class="cx">     m_buffer = ArrayBuffer::createFromBytes(memory().memory(), memory().size(), WTFMove(destructor));
</span><span class="cx">     m_buffer->makeWasmMemory();
</span><del>-    if (m_memory->sharingMode() == Wasm::MemorySharingMode::Shared)
-        m_buffer->makeShared();
-    auto* arrayBuffer = JSArrayBuffer::create(vm, globalObject->arrayBufferStructure(m_buffer->sharingMode()), m_buffer.get());
-    if (m_memory->sharingMode() == Wasm::MemorySharingMode::Shared) {
-        objectConstructorFreeze(globalObject, arrayBuffer);
-        RETURN_IF_EXCEPTION(throwScope, { });
-    }
-    m_bufferWrapper.set(vm, this, arrayBuffer);
</del><ins>+    m_bufferWrapper.set(vm, this, JSArrayBuffer::create(vm, globalObject->arrayBufferStructure(ArrayBufferSharingMode::Default), m_buffer.get()));
</ins><span class="cx">     RELEASE_ASSERT(m_bufferWrapper);
</span><span class="cx">     return m_bufferWrapper.get();
</span><span class="cx"> }
</span><span class="lines">@@ -135,8 +117,7 @@
</span><span class="cx"> {
</span><span class="cx">     // We need to clear out the old array buffer because it might now be pointing to stale memory.
</span><span class="cx">     if (m_buffer) {
</span><del>-        if (m_memory->sharingMode() == Wasm::MemorySharingMode::Default)
-            m_buffer->detach(vm);
</del><ins>+        m_buffer->detach(vm);
</ins><span class="cx">         m_buffer = nullptr;
</span><span class="cx">         m_bufferWrapper.clear();
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmjsJSWebAssemblyMemoryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyMemory.h (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyMemory.h        2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyMemory.h   2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx"> 
</span><del>-#include "JSObject.h"
</del><ins>+#include "JSDestructibleObject.h"
</ins><span class="cx"> #include "WasmMemory.h"
</span><span class="cx"> #include <wtf/Ref.h>
</span><span class="cx"> #include <wtf/RefPtr.h>
</span><span class="lines">@@ -49,16 +49,16 @@
</span><span class="cx">         return vm.webAssemblyMemorySpace<mode>();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    JS_EXPORT_PRIVATE static JSWebAssemblyMemory* tryCreate(JSGlobalObject*, VM&, Structure*);
</del><ins>+    static JSWebAssemblyMemory* tryCreate(JSGlobalObject*, VM&, Structure*);
</ins><span class="cx">     static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
</span><span class="cx"> 
</span><span class="cx">     DECLARE_EXPORT_INFO;
</span><span class="cx"> 
</span><del>-    JS_EXPORT_PRIVATE void adopt(Ref<Wasm::Memory>&&);
</del><ins>+    void adopt(Ref<Wasm::Memory>&&);
</ins><span class="cx">     Wasm::Memory& memory() { return m_memory.get(); }
</span><del>-    JSArrayBuffer* buffer(JSGlobalObject*);
</del><ins>+    JSArrayBuffer* buffer(VM& vm, JSGlobalObject*);
</ins><span class="cx">     Wasm::PageCount grow(VM&, JSGlobalObject*, uint32_t delta);
</span><del>-    JS_EXPORT_PRIVATE void growSuccessCallback(VM&, Wasm::PageCount oldPageCount, Wasm::PageCount newPageCount);
</del><ins>+    void growSuccessCallback(VM&, Wasm::PageCount oldPageCount, Wasm::PageCount newPageCount);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     JSWebAssemblyMemory(VM&, Structure*);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmjsWebAssemblyFunctioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp      2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp 2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -357,20 +357,20 @@
</span><span class="cx"> 
</span><span class="cx">     if (!!moduleInformation.memory) {
</span><span class="cx">         GPRReg baseMemory = pinnedRegs.baseMemoryPointer;
</span><del>-        GPRReg scratchOrBoundsCheckingSize = stackLimitGPR;
</del><ins>+        GPRReg scratchOrSize = stackLimitGPR;
</ins><span class="cx">         auto mode = instance()->memoryMode();
</span><span class="cx"> 
</span><span class="cx">         if (isARM64E()) {
</span><span class="cx">             if (mode != Wasm::MemoryMode::Signaling)
</span><del>-                scratchOrBoundsCheckingSize = pinnedRegs.boundsCheckingSizeRegister;
-            jit.loadPtr(CCallHelpers::Address(scratchGPR, Wasm::Instance::offsetOfCachedBoundsCheckingSize()), scratchOrBoundsCheckingSize);
</del><ins>+                scratchOrSize = pinnedRegs.sizeRegister;
+            jit.loadPtr(CCallHelpers::Address(scratchGPR, Wasm::Instance::offsetOfCachedMemorySize()), scratchOrSize);
</ins><span class="cx">         } else {
</span><span class="cx">             if (mode != Wasm::MemoryMode::Signaling)
</span><del>-                jit.loadPtr(CCallHelpers::Address(scratchGPR, Wasm::Instance::offsetOfCachedBoundsCheckingSize()), pinnedRegs.boundsCheckingSizeRegister);
</del><ins>+                jit.loadPtr(CCallHelpers::Address(scratchGPR, Wasm::Instance::offsetOfCachedMemorySize()), pinnedRegs.sizeRegister);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         jit.loadPtr(CCallHelpers::Address(scratchGPR, Wasm::Instance::offsetOfCachedMemory()), baseMemory);
</span><del>-        jit.cageConditionally(Gigacage::Primitive, baseMemory, scratchOrBoundsCheckingSize, scratchOrBoundsCheckingSize);
</del><ins>+        jit.cageConditionally(Gigacage::Primitive, baseMemory, scratchOrSize, scratchOrSize);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // We use this callee to indicate how to unwind past these types of frames:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmjsWebAssemblyMemoryConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.cpp (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.cpp     2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.cpp        2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -56,6 +56,8 @@
</span><span class="cx"> {
</span><span class="cx">     VM& vm = globalObject->vm();
</span><span class="cx">     auto throwScope = DECLARE_THROW_SCOPE(vm);
</span><ins>+    if (callFrame->argumentCount() != 1)
+        return JSValue::encode(throwException(globalObject, throwScope, createTypeError(globalObject, "WebAssembly.Memory expects exactly one argument"_s)));
</ins><span class="cx"> 
</span><span class="cx">     JSObject* memoryDescriptor;
</span><span class="cx">     {
</span><span class="lines">@@ -100,23 +102,10 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    Wasm::MemorySharingMode sharingMode = Wasm::MemorySharingMode::Default;
-    JSValue sharedValue = memoryDescriptor->get(globalObject, Identifier::fromString(vm, "shared"));
-    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
-    bool shared = sharedValue.toBoolean(globalObject);
-    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
-    if (shared) {
-        if (!maximumPageCount)
-            return throwVMTypeError(globalObject, throwScope, "'maximum' page count must be defined if 'shared' is true"_s);
-        if (!Options::useSharedArrayBuffer())
-            return throwVMTypeError(globalObject, throwScope, "Shared WebAssembly.Memory and SharedArrayBuffer are not enabled"_s);
-        sharingMode = Wasm::MemorySharingMode::Shared;
-    }
-
</del><span class="cx">     auto* jsMemory = JSWebAssemblyMemory::tryCreate(globalObject, vm, globalObject->webAssemblyMemoryStructure());
</span><span class="cx">     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
</span><span class="cx"> 
</span><del>-    RefPtr<Wasm::Memory> memory = Wasm::Memory::tryCreate(initialPageCount, maximumPageCount, sharingMode,
</del><ins>+    RefPtr<Wasm::Memory> memory = Wasm::Memory::tryCreate(initialPageCount, maximumPageCount,
</ins><span class="cx">         [&vm] (Wasm::Memory::NotifyPressure) { vm.heap.collectAsync(CollectionScope::Full); },
</span><span class="cx">         [&vm] (Wasm::Memory::SyncTryToReclaim) { vm.heap.collectSync(CollectionScope::Full); },
</span><span class="cx">         [&vm, jsMemory] (Wasm::Memory::GrowSuccess, Wasm::PageCount oldPageCount, Wasm::PageCount newPageCount) { jsMemory->growSuccessCallback(vm, oldPageCount, newPageCount); });
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmjsWebAssemblyMemoryPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryPrototype.cpp (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryPrototype.cpp       2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryPrototype.cpp  2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -93,7 +93,7 @@
</span><span class="cx"> 
</span><span class="cx">     JSWebAssemblyMemory* memory = getMemory(globalObject, vm, callFrame->thisValue()); 
</span><span class="cx">     RETURN_IF_EXCEPTION(throwScope, { });
</span><del>-    RELEASE_AND_RETURN(throwScope, JSValue::encode(memory->buffer(globalObject)));
</del><ins>+    return JSValue::encode(memory->buffer(globalObject->vm(), globalObject));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WebAssemblyMemoryPrototype* WebAssemblyMemoryPrototype::create(VM& vm, JSGlobalObject*, Structure* structure)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmjsWebAssemblyModuleRecordcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp  2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp     2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -566,9 +566,8 @@
</span><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     auto forEachSegment = [&] (auto fn) {
</span><del>-        auto wasmMemory = m_instance->instance().memory();
-        uint8_t* memory = reinterpret_cast<uint8_t*>(wasmMemory->memory());
-        uint64_t sizeInBytes = wasmMemory->size();
</del><ins>+        uint8_t* memory = reinterpret_cast<uint8_t*>(m_instance->instance().cachedMemory());
+        uint64_t sizeInBytes = m_instance->instance().cachedMemorySize();
</ins><span class="cx"> 
</span><span class="cx">         for (const Wasm::Segment::Ptr& segment : data) {
</span><span class="cx">             uint32_t offset = segment->offset.isGlobalImport()
</span></span></pre></div>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog       2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WTF/ChangeLog  2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2020-11-18  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, reverting r269940.
+        https://bugs.webkit.org/show_bug.cgi?id=219076
+
+        caused seemingly-infinite build time regression
+
+        Reverted changeset:
+
+        "[JSC] Implement WebAssembly.Memory with shared"
+        https://bugs.webkit.org/show_bug.cgi?id=218693
+        https://trac.webkit.org/changeset/269940
+
</ins><span class="cx"> 2020-11-17  Ryan Haddad  <ryanhaddad@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Build fails on internal simulator builds due to missing enum kCVPixelFormatType_AGX_420YpCbCr8BiPlanarVideoRange
</span></span></pre></div>
<a id="trunkSourceWTFwtfPlatformEnableh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/PlatformEnable.h (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/PlatformEnable.h    2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WTF/wtf/PlatformEnable.h       2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -690,7 +690,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEBASSEMBLY) && HAVE(MACHINE_CONTEXT)
</span><del>-#define ENABLE_WEBASSEMBLY_SIGNALING_MEMORY 1
</del><ins>+#define ENABLE_WEBASSEMBLY_FAST_MEMORY 1
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> /* Counts uses of write barriers using sampling counters. Be sure to also
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/ChangeLog      2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2020-11-18  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, reverting r269940.
+        https://bugs.webkit.org/show_bug.cgi?id=219076
+
+        caused seemingly-infinite build time regression
+
+        Reverted changeset:
+
+        "[JSC] Implement WebAssembly.Memory with shared"
+        https://bugs.webkit.org/show_bug.cgi?id=218693
+        https://trac.webkit.org/changeset/269940
+
</ins><span class="cx"> 2020-11-18  Carlos Garcia Campos  <cgarcia@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         Unreviewed. Fix the build with GCC 10
</span></span></pre></div>
<a id="trunkSourceWebCoreHeaderscmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Headers.cmake (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Headers.cmake       2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/Headers.cmake  2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -1576,7 +1576,6 @@
</span><span class="cx">     workers/WorkerScriptLoader.h
</span><span class="cx">     workers/WorkerScriptLoaderClient.h
</span><span class="cx">     workers/WorkerThread.h
</span><del>-    workers/WorkerThreadType.h
</del><span class="cx">     workers/WorkerType.h
</span><span class="cx"> 
</span><span class="cx">     workers/service/SWClientConnection.h
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIDBSerializationContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBSerializationContext.cpp (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IDBSerializationContext.cpp        2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBSerializationContext.cpp   2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -79,7 +79,7 @@
</span><span class="cx">     ASSERT(!m_globalObject);
</span><span class="cx">     m_vm = JSC::VM::create();
</span><span class="cx">     m_vm->heap.acquireAccess();
</span><del>-    JSVMClientData::initNormalWorld(m_vm.get(), WorkerThreadType::Worklet);
</del><ins>+    JSVMClientData::initNormalWorld(m_vm.get());
</ins><span class="cx"> 
</span><span class="cx">     JSC::JSLockHolder locker(m_vm.get());
</span><span class="cx">     m_globalObject.set(*m_vm, JSIDBSerializationGlobalObject::create(*m_vm, JSIDBSerializationGlobalObject::createStructure(*m_vm, JSC::jsNull()), normalWorld(*m_vm)));
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj   2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj      2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -5026,7 +5026,6 @@
</span><span class="cx">          E39628C12395743100658ECD /* MotionManagerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = E39628C02395743000658ECD /* MotionManagerClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          E3A776671DC85D2800B690D8 /* DOMJITIDLConvert.h in Headers */ = {isa = PBXBuildFile; fileRef = E3A776651DC85D2200B690D8 /* DOMJITIDLConvert.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          E3A776681DC85D2800B690D8 /* DOMJITIDLType.h in Headers */ = {isa = PBXBuildFile; fileRef = E3A776661DC85D2200B690D8 /* DOMJITIDLType.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-               E3AFD7AD255F50EB00E5E30E /* WorkerThreadType.h in Headers */ = {isa = PBXBuildFile; fileRef = E3AFD7AB255F50DC00E5E30E /* WorkerThreadType.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">           E3B2F0ED1D7F4CA300B0C9D1 /* LoadableScript.h in Headers */ = {isa = PBXBuildFile; fileRef = E3B2F0E71D7F35EC00B0C9D1 /* LoadableScript.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          E3B2F0EE1D7F4CA900B0C9D1 /* LoadableScriptClient.h in Headers */ = {isa = PBXBuildFile; fileRef = E3B2F0E81D7F35EC00B0C9D1 /* LoadableScriptClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">          E3B2F0F01D7F4CB500B0C9D1 /* LoadableClassicScript.h in Headers */ = {isa = PBXBuildFile; fileRef = E3B2F0E41D7F35EC00B0C9D1 /* LoadableClassicScript.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -16072,7 +16071,6 @@
</span><span class="cx">          E3A776661DC85D2200B690D8 /* DOMJITIDLType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMJITIDLType.h; sourceTree = "<group>"; };
</span><span class="cx">          E3AE6CD12252F27000C70B50 /* AllDescendantsCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AllDescendantsCollection.cpp; sourceTree = "<group>"; };
</span><span class="cx">          E3AFA9641DA6E908002861BD /* JSNodeDOMJIT.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNodeDOMJIT.cpp; sourceTree = "<group>"; };
</span><del>-               E3AFD7AB255F50DC00E5E30E /* WorkerThreadType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WorkerThreadType.h; sourceTree = "<group>"; };
</del><span class="cx">           E3B2F0E31D7F35EC00B0C9D1 /* LoadableClassicScript.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoadableClassicScript.cpp; sourceTree = "<group>"; };
</span><span class="cx">          E3B2F0E41D7F35EC00B0C9D1 /* LoadableClassicScript.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoadableClassicScript.h; sourceTree = "<group>"; };
</span><span class="cx">          E3B2F0E71D7F35EC00B0C9D1 /* LoadableScript.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoadableScript.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -19049,7 +19047,6 @@
</span><span class="cx">                          2EA768030FE7126400AB9C8A /* WorkerScriptLoaderClient.h */,
</span><span class="cx">                          2E4346420F546A8200B0F1BA /* WorkerThread.cpp */,
</span><span class="cx">                          2E4346430F546A8200B0F1BA /* WorkerThread.h */,
</span><del>-                               E3AFD7AB255F50DC00E5E30E /* WorkerThreadType.h */,
</del><span class="cx">                           51F174FC1F35898800C74950 /* WorkerType.h */,
</span><span class="cx">                          51F174FA1F3588D700C74950 /* WorkerType.idl */,
</span><span class="cx">                  );
</span><span class="lines">@@ -35198,7 +35195,6 @@
</span><span class="cx">                          2E4346550F546A8200B0F1BA /* WorkerThread.h in Headers */,
</span><span class="cx">                          0B9056F90F2685F30095FF6A /* WorkerThreadableLoader.h in Headers */,
</span><span class="cx">                          97AABD2D14FA09D5007457AE /* WorkerThreadableWebSocketChannel.h in Headers */,
</span><del>-                               E3AFD7AD255F50EB00E5E30E /* WorkerThreadType.h in Headers */,
</del><span class="cx">                           A54A0C681DB807D90017A90B /* WorkerToPageFrontendChannel.h in Headers */,
</span><span class="cx">                          51F174FE1F35899200C74950 /* WorkerType.h in Headers */,
</span><span class="cx">                          4BDEA320217EC55F0052DFCD /* Worklet.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsIDLTypesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/IDLTypes.h (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/IDLTypes.h 2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/bindings/IDLTypes.h    2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -151,10 +151,6 @@
</span><span class="cx">     using InnerType = T;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template<typename T> struct IDLAllowSharedAdaptor : T {
-    using InnerType = T;
-};
-
</del><span class="cx"> struct IDLObject : IDLType<JSC::Strong<JSC::JSObject>> {
</span><span class="cx">     using NullableType = JSC::Strong<JSC::JSObject>;
</span><span class="cx"> 
</span><span class="lines">@@ -327,17 +323,4 @@
</span><span class="cx"> template<typename T>
</span><span class="cx"> struct IsIDLTypedArray : public std::integral_constant<bool, WTF::IsBaseOfTemplate<IDLTypedArray, T>::value> { };
</span><span class="cx"> 
</span><del>-template<typename T>
-struct IsIDLArrayBuffer : public std::integral_constant<bool, std::is_base_of<IDLArrayBuffer, T>::value> { };
-
-template<typename T>
-struct IsIDLArrayBufferView : public std::integral_constant<bool, std::is_base_of<IDLArrayBufferView, T>::value> { };
-
-template<typename T>
-struct IsIDLArrayBufferAllowShared : public std::integral_constant<bool, std::is_base_of<IDLAllowSharedAdaptor<IDLArrayBuffer>, T>::value> { };
-
-template<typename T>
-struct IsIDLArrayBufferViewAllowShared : public std::integral_constant<bool, std::is_base_of<IDLAllowSharedAdaptor<IDLArrayBufferView>, T>::value> { };
-
-
</del><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsCommonVMcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/CommonVM.cpp (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/CommonVM.cpp    2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/bindings/js/CommonVM.cpp       2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -88,7 +88,7 @@
</span><span class="cx"> 
</span><span class="cx">     vm.setGlobalConstRedeclarationShouldThrow(globalConstRedeclarationShouldThrow());
</span><span class="cx"> 
</span><del>-    JSVMClientData::initNormalWorld(&vm, WorkerThreadType::Main);
</del><ins>+    JSVMClientData::initNormalWorld(&vm);
</ins><span class="cx"> 
</span><span class="cx">     return vm;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertBufferSourceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMConvertBufferSource.h (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertBufferSource.h      2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertBufferSource.h 2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -109,8 +109,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace Detail {
</span><span class="cx"> 
</span><del>-enum class BufferSourceConverterAllowSharedMode { Allow, Disallow };
-template<typename BufferSourceType, BufferSourceConverterAllowSharedMode mode>
</del><ins>+template<typename BufferSourceType>
</ins><span class="cx"> struct BufferSourceConverter {
</span><span class="cx">     using WrapperType = typename Converter<BufferSourceType>::WrapperType;
</span><span class="cx">     using ReturnType = typename Converter<BufferSourceType>::ReturnType;
</span><span class="lines">@@ -120,11 +119,7 @@
</span><span class="cx">     {
</span><span class="cx">         auto& vm = JSC::getVM(&lexicalGlobalObject);
</span><span class="cx">         auto scope = DECLARE_THROW_SCOPE(vm);
</span><del>-        ReturnType object { };
-        if constexpr (mode == BufferSourceConverterAllowSharedMode::Allow)
-            object = WrapperType::toWrappedAllowShared(vm, value);
-        else
-            object = WrapperType::toWrapped(vm, value);
</del><ins>+        ReturnType object = WrapperType::toWrapped(vm, value);
</ins><span class="cx">         if (UNLIKELY(!object))
</span><span class="cx">             exceptionThrower(lexicalGlobalObject, scope);
</span><span class="cx">         return object;
</span><span class="lines">@@ -140,7 +135,7 @@
</span><span class="cx">     template<typename ExceptionThrower = DefaultExceptionThrower>
</span><span class="cx">     static ReturnType convert(JSC::JSGlobalObject& lexicalGlobalObject, JSC::JSValue value, ExceptionThrower&& exceptionThrower = ExceptionThrower())
</span><span class="cx">     {
</span><del>-        return Detail::BufferSourceConverter<IDLArrayBuffer, Detail::BufferSourceConverterAllowSharedMode::Disallow>::convert(lexicalGlobalObject, value, std::forward<ExceptionThrower>(exceptionThrower));
</del><ins>+        return Detail::BufferSourceConverter<IDLArrayBuffer>::convert(lexicalGlobalObject, value, std::forward<ExceptionThrower>(exceptionThrower));
</ins><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -162,7 +157,7 @@
</span><span class="cx">     template<typename ExceptionThrower = DefaultExceptionThrower>
</span><span class="cx">     static ReturnType convert(JSC::JSGlobalObject& lexicalGlobalObject, JSC::JSValue value, ExceptionThrower&& exceptionThrower = ExceptionThrower())
</span><span class="cx">     {
</span><del>-        return Detail::BufferSourceConverter<IDLDataView, Detail::BufferSourceConverterAllowSharedMode::Disallow>::convert(lexicalGlobalObject, value, std::forward<ExceptionThrower>(exceptionThrower));
</del><ins>+        return Detail::BufferSourceConverter<IDLDataView>::convert(lexicalGlobalObject, value, std::forward<ExceptionThrower>(exceptionThrower));
</ins><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -184,7 +179,7 @@
</span><span class="cx">     template<typename ExceptionThrower = DefaultExceptionThrower>
</span><span class="cx">     static ReturnType convert(JSC::JSGlobalObject& lexicalGlobalObject, JSC::JSValue value, ExceptionThrower&& exceptionThrower = ExceptionThrower())
</span><span class="cx">     {
</span><del>-        return Detail::BufferSourceConverter<IDLInt8Array, Detail::BufferSourceConverterAllowSharedMode::Disallow>::convert(lexicalGlobalObject, value, std::forward<ExceptionThrower>(exceptionThrower));
</del><ins>+        return Detail::BufferSourceConverter<IDLInt8Array>::convert(lexicalGlobalObject, value, std::forward<ExceptionThrower>(exceptionThrower));
</ins><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -206,7 +201,7 @@
</span><span class="cx">     template<typename ExceptionThrower = DefaultExceptionThrower>
</span><span class="cx">     static ReturnType convert(JSC::JSGlobalObject& lexicalGlobalObject, JSC::JSValue value, ExceptionThrower&& exceptionThrower = ExceptionThrower())
</span><span class="cx">     {
</span><del>-        return Detail::BufferSourceConverter<IDLInt16Array, Detail::BufferSourceConverterAllowSharedMode::Disallow>::convert(lexicalGlobalObject, value, std::forward<ExceptionThrower>(exceptionThrower));
</del><ins>+        return Detail::BufferSourceConverter<IDLInt16Array>::convert(lexicalGlobalObject, value, std::forward<ExceptionThrower>(exceptionThrower));
</ins><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -228,7 +223,7 @@
</span><span class="cx">     template<typename ExceptionThrower = DefaultExceptionThrower>
</span><span class="cx">     static ReturnType convert(JSC::JSGlobalObject& lexicalGlobalObject, JSC::JSValue value, ExceptionThrower&& exceptionThrower = ExceptionThrower())
</span><span class="cx">     {
</span><del>-        return Detail::BufferSourceConverter<IDLInt32Array, Detail::BufferSourceConverterAllowSharedMode::Disallow>::convert(lexicalGlobalObject, value, std::forward<ExceptionThrower>(exceptionThrower));
</del><ins>+        return Detail::BufferSourceConverter<IDLInt32Array>::convert(lexicalGlobalObject, value, std::forward<ExceptionThrower>(exceptionThrower));
</ins><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -250,7 +245,7 @@
</span><span class="cx">     template<typename ExceptionThrower = DefaultExceptionThrower>
</span><span class="cx">     static ReturnType convert(JSC::JSGlobalObject& lexicalGlobalObject, JSC::JSValue value, ExceptionThrower&& exceptionThrower = ExceptionThrower())
</span><span class="cx">     {
</span><del>-        return Detail::BufferSourceConverter<IDLUint8Array, Detail::BufferSourceConverterAllowSharedMode::Disallow>::convert(lexicalGlobalObject, value, std::forward<ExceptionThrower>(exceptionThrower));
</del><ins>+        return Detail::BufferSourceConverter<IDLUint8Array>::convert(lexicalGlobalObject, value, std::forward<ExceptionThrower>(exceptionThrower));
</ins><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -278,7 +273,7 @@
</span><span class="cx">     template<typename ExceptionThrower = DefaultExceptionThrower>
</span><span class="cx">     static ReturnType convert(JSC::JSGlobalObject& lexicalGlobalObject, JSC::JSValue value, ExceptionThrower&& exceptionThrower = ExceptionThrower())
</span><span class="cx">     {
</span><del>-        return Detail::BufferSourceConverter<IDLUint16Array, Detail::BufferSourceConverterAllowSharedMode::Disallow>::convert(lexicalGlobalObject, value, std::forward<ExceptionThrower>(exceptionThrower));
</del><ins>+        return Detail::BufferSourceConverter<IDLUint16Array>::convert(lexicalGlobalObject, value, std::forward<ExceptionThrower>(exceptionThrower));
</ins><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -300,7 +295,7 @@
</span><span class="cx">     template<typename ExceptionThrower = DefaultExceptionThrower>
</span><span class="cx">     static ReturnType convert(JSC::JSGlobalObject& lexicalGlobalObject, JSC::JSValue value, ExceptionThrower&& exceptionThrower = ExceptionThrower())
</span><span class="cx">     {
</span><del>-        return Detail::BufferSourceConverter<IDLUint32Array, Detail::BufferSourceConverterAllowSharedMode::Disallow>::convert(lexicalGlobalObject, value, std::forward<ExceptionThrower>(exceptionThrower));
</del><ins>+        return Detail::BufferSourceConverter<IDLUint32Array>::convert(lexicalGlobalObject, value, std::forward<ExceptionThrower>(exceptionThrower));
</ins><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -322,7 +317,7 @@
</span><span class="cx">     template<typename ExceptionThrower = DefaultExceptionThrower>
</span><span class="cx">     static ReturnType convert(JSC::JSGlobalObject& lexicalGlobalObject, JSC::JSValue value, ExceptionThrower&& exceptionThrower = ExceptionThrower())
</span><span class="cx">     {
</span><del>-        return Detail::BufferSourceConverter<IDLUint8ClampedArray, Detail::BufferSourceConverterAllowSharedMode::Disallow>::convert(lexicalGlobalObject, value, std::forward<ExceptionThrower>(exceptionThrower));
</del><ins>+        return Detail::BufferSourceConverter<IDLUint8ClampedArray>::convert(lexicalGlobalObject, value, std::forward<ExceptionThrower>(exceptionThrower));
</ins><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -344,7 +339,7 @@
</span><span class="cx">     template<typename ExceptionThrower = DefaultExceptionThrower>
</span><span class="cx">     static ReturnType convert(JSC::JSGlobalObject& lexicalGlobalObject, JSC::JSValue value, ExceptionThrower&& exceptionThrower = ExceptionThrower())
</span><span class="cx">     {
</span><del>-        return Detail::BufferSourceConverter<IDLFloat32Array, Detail::BufferSourceConverterAllowSharedMode::Disallow>::convert(lexicalGlobalObject, value, std::forward<ExceptionThrower>(exceptionThrower));
</del><ins>+        return Detail::BufferSourceConverter<IDLFloat32Array>::convert(lexicalGlobalObject, value, std::forward<ExceptionThrower>(exceptionThrower));
</ins><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -366,7 +361,7 @@
</span><span class="cx">     template<typename ExceptionThrower = DefaultExceptionThrower>
</span><span class="cx">     static ReturnType convert(JSC::JSGlobalObject& lexicalGlobalObject, JSC::JSValue value, ExceptionThrower&& exceptionThrower = ExceptionThrower())
</span><span class="cx">     {
</span><del>-        return Detail::BufferSourceConverter<IDLFloat64Array, Detail::BufferSourceConverterAllowSharedMode::Disallow>::convert(lexicalGlobalObject, value, std::forward<ExceptionThrower>(exceptionThrower));
</del><ins>+        return Detail::BufferSourceConverter<IDLFloat64Array>::convert(lexicalGlobalObject, value, std::forward<ExceptionThrower>(exceptionThrower));
</ins><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -388,7 +383,7 @@
</span><span class="cx">     template<typename ExceptionThrower = DefaultExceptionThrower>
</span><span class="cx">     static ReturnType convert(JSC::JSGlobalObject& lexicalGlobalObject, JSC::JSValue value, ExceptionThrower&& exceptionThrower = ExceptionThrower())
</span><span class="cx">     {
</span><del>-        return Detail::BufferSourceConverter<IDLArrayBufferView, Detail::BufferSourceConverterAllowSharedMode::Disallow>::convert(lexicalGlobalObject, value, std::forward<ExceptionThrower>(exceptionThrower));
</del><ins>+        return Detail::BufferSourceConverter<IDLArrayBufferView>::convert(lexicalGlobalObject, value, std::forward<ExceptionThrower>(exceptionThrower));
</ins><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -403,17 +398,4 @@
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template<typename T>
-struct Converter<IDLAllowSharedAdaptor<T>> : DefaultConverter<T> {
-    using ConverterType = Converter<T>;
-    using WrapperType = typename ConverterType::WrapperType;
-    using ReturnType = typename ConverterType::ReturnType;
-
-    template<typename ExceptionThrower = DefaultExceptionThrower>
-    static ReturnType convert(JSC::JSGlobalObject& lexicalGlobalObject, JSC::JSValue value, ExceptionThrower&& exceptionThrower = ExceptionThrower())
-    {
-        return Detail::BufferSourceConverter<T, Detail::BufferSourceConverterAllowSharedMode::Allow>::convert(lexicalGlobalObject, value, std::forward<ExceptionThrower>(exceptionThrower));
-    }
-};
-
</del><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMConvertUnionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMConvertUnion.h (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMConvertUnion.h     2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/bindings/js/JSDOMConvertUnion.h        2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -225,9 +225,9 @@
</span><span class="cx">         // 7. If Type(V) is Object and V has an [[ArrayBufferData]] internal slot, then:
</span><span class="cx">         //     1. If types includes ArrayBuffer, then return the result of converting V to ArrayBuffer.
</span><span class="cx">         //     2. If types includes object, then return the IDL value that is a reference to the object V.
</span><del>-        constexpr bool hasArrayBufferType = brigand::any<TypeList, IsIDLArrayBuffer<brigand::_1>>::value;
</del><ins>+        constexpr bool hasArrayBufferType = brigand::any<TypeList, std::is_same<IDLArrayBuffer, brigand::_1>>::value;
</ins><span class="cx">         if (hasArrayBufferType || hasObjectType) {
</span><del>-            auto arrayBuffer = (brigand::any<TypeList, IsIDLArrayBufferAllowShared<brigand::_1>>::value) ? JSC::JSArrayBuffer::toWrappedAllowShared(vm, value) : JSC::JSArrayBuffer::toWrapped(vm, value);
</del><ins>+            auto arrayBuffer = JSC::JSArrayBuffer::toWrapped(vm, value);
</ins><span class="cx">             if (arrayBuffer) {
</span><span class="cx">                 if (hasArrayBufferType)
</span><span class="cx">                     return ConditionalReturner<ReturnType, hasArrayBufferType>::get(WTFMove(arrayBuffer)).value();
</span><span class="lines">@@ -235,9 +235,9 @@
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        constexpr bool hasArrayBufferViewType = brigand::any<TypeList, IsIDLArrayBufferView<brigand::_1>>::value;
</del><ins>+        constexpr bool hasArrayBufferViewType = brigand::any<TypeList, std::is_same<IDLArrayBufferView, brigand::_1>>::value;
</ins><span class="cx">         if (hasArrayBufferViewType || hasObjectType) {
</span><del>-            auto arrayBufferView = (brigand::any<TypeList, IsIDLArrayBufferViewAllowShared<brigand::_1>>::value) ? JSC::JSArrayBufferView::toWrappedAllowShared(vm, value) : JSC::JSArrayBufferView::toWrapped(vm, value);
</del><ins>+            auto arrayBufferView = JSC::JSArrayBufferView::toWrapped(vm, value);
</ins><span class="cx">             if (arrayBufferView) {
</span><span class="cx">                 if (hasArrayBufferViewType)
</span><span class="cx">                     return ConditionalReturner<ReturnType, hasArrayBufferViewType>::get(WTFMove(arrayBufferView)).value();
</span><span class="lines">@@ -405,13 +405,4 @@
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-// BufferSource specialization. In WebKit, BufferSource is defined as IDLUnion<IDLArrayBufferView, IDLArrayBuffer> as a hack, and it is not compatible to
-// annotation described in WebIDL.
-template<> struct Converter<IDLAllowSharedAdaptor<IDLUnion<IDLArrayBufferView, IDLArrayBuffer>>> : DefaultConverter<IDLUnion<IDLArrayBufferView, IDLArrayBuffer>> {
-    static auto convert(JSC::JSGlobalObject& lexicalGlobalObject, JSC::JSValue value) -> decltype(auto)
-    {
-        return Converter<IDLUnion<IDLAllowSharedAdaptor<IDLArrayBufferView>, IDLAllowSharedAdaptor<IDLArrayBuffer>>>::convert(lexicalGlobalObject, value);
-    }
-};
-
</del><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsSerializedScriptValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp       2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp  2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -75,7 +75,6 @@
</span><span class="cx"> #include <JavaScriptCore/JSSet.h>
</span><span class="cx"> #include <JavaScriptCore/JSSetIterator.h>
</span><span class="cx"> #include <JavaScriptCore/JSTypedArrays.h>
</span><del>-#include <JavaScriptCore/JSWebAssemblyMemory.h>
</del><span class="cx"> #include <JavaScriptCore/JSWebAssemblyModule.h>
</span><span class="cx"> #include <JavaScriptCore/ObjectConstructor.h>
</span><span class="cx"> #include <JavaScriptCore/PropertyNameArray.h>
</span><span class="lines">@@ -183,9 +182,6 @@
</span><span class="cx"> #endif
</span><span class="cx">     BigIntTag = 47,
</span><span class="cx">     BigIntObjectTag = 48,
</span><del>-#if ENABLE(WEBASSEMBLY)
-    WasmMemoryTag = 49,
-#endif
</del><span class="cx">     ErrorTag = 255
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -361,6 +357,7 @@
</span><span class="cx">  *    | MessagePortReferenceTag <value:uint32_t>
</span><span class="cx">  *    | ArrayBuffer
</span><span class="cx">  *    | ArrayBufferViewTag ArrayBufferViewSubtag <byteOffset:uint32_t> <byteLength:uint32_t> (ArrayBuffer | ObjectReference)
</span><ins>+ *    | ArrayBufferTransferTag <value:uint32_t>
</ins><span class="cx">  *    | CryptoKeyTag <wrappedKeyLength:uint32_t> <factor:byte{wrappedKeyLength}>
</span><span class="cx">  *    | DOMPoint
</span><span class="cx">  *    | DOMRect
</span><span class="lines">@@ -370,7 +367,6 @@
</span><span class="cx">  *    | RTCCertificateTag
</span><span class="cx">  *    | ImageBitmapTag <originClean:uint8_t> <logicalWidth:int32_t> <logicalHeight:int32_t> <resolutionScale:double> <byteLength:uint32_t>(<imageByteData:uint8_t>)
</span><span class="cx">  *    | OffscreenCanvasTransferTag <value:uint32_t>
</span><del>- *    | WasmMemoryTag <value:uint32_t>
</del><span class="cx">  *
</span><span class="cx">  * Inside certificate, data is serialized in this format as per spec:
</span><span class="cx">  *
</span><span class="lines">@@ -423,8 +419,6 @@
</span><span class="cx">  *
</span><span class="cx">  * ArrayBuffer :-
</span><span class="cx">  *    ArrayBufferTag <length:uint32_t> <contents:byte{length}>
</span><del>- *    ArrayBufferTransferTag <value:uint32_t>
- *    SharedArrayBufferTag <value:uint32_t>
</del><span class="cx">  *
</span><span class="cx">  * CryptoKeyHMAC :-
</span><span class="cx">  *    <keySize:uint32_t> <keyData:byte{keySize}> CryptoAlgorithmIdentifierTag // Algorithm tag inner hash function.
</span><span class="lines">@@ -582,7 +576,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx">             WasmModuleArray& wasmModules,
</span><del>-            WasmMemoryHandleArray& wasmMemoryHandles,
</del><span class="cx"> #endif
</span><span class="cx">         Vector<String>& blobURLs, Vector<uint8_t>& out, SerializationContext context, ArrayBufferContentsArray& sharedBuffers)
</span><span class="cx">     {
</span><span class="lines">@@ -592,7 +585,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx">             wasmModules,
</span><del>-            wasmMemoryHandles,
</del><span class="cx"> #endif
</span><span class="cx">             blobURLs, out, context, sharedBuffers);
</span><span class="cx">         return serializer.serialize(value);
</span><span class="lines">@@ -623,7 +615,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx">             WasmModuleArray& wasmModules,
</span><del>-            WasmMemoryHandleArray& wasmMemoryHandles,
</del><span class="cx"> #endif
</span><span class="cx">         Vector<String>& blobURLs, Vector<uint8_t>& out, SerializationContext context, ArrayBufferContentsArray& sharedBuffers)
</span><span class="cx">         : CloneBase(lexicalGlobalObject)
</span><span class="lines">@@ -634,7 +625,6 @@
</span><span class="cx">         , m_sharedBuffers(sharedBuffers)
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx">         , m_wasmModules(wasmModules)
</span><del>-        , m_wasmMemoryHandles(wasmMemoryHandles)
</del><span class="cx"> #endif
</span><span class="cx">     {
</span><span class="cx">         write(CurrentVersion);
</span><span class="lines">@@ -1240,7 +1230,6 @@
</span><span class="cx">                 Vector<RefPtr<JSC::ArrayBuffer>> dummyArrayBuffers;
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx">                 WasmModuleArray dummyModules;
</span><del>-                WasmMemoryHandleArray dummyMemoryHandles;
</del><span class="cx"> #endif
</span><span class="cx">                 ArrayBufferContentsArray dummySharedBuffers;
</span><span class="cx">                 CloneSerializer rawKeySerializer(m_lexicalGlobalObject, dummyMessagePorts, dummyArrayBuffers, { },
</span><span class="lines">@@ -1249,7 +1238,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx">                     dummyModules,
</span><del>-                    dummyMemoryHandles,
</del><span class="cx"> #endif
</span><span class="cx">                     dummyBlobURLs, serializedKey, SerializationContext::Default, dummySharedBuffers);
</span><span class="cx">                 rawKeySerializer.write(key);
</span><span class="lines">@@ -1286,21 +1274,6 @@
</span><span class="cx">                 write(index);
</span><span class="cx">                 return true;
</span><span class="cx">             }
</span><del>-            if (JSWebAssemblyMemory* memory = jsDynamicCast<JSWebAssemblyMemory*>(vm, obj)) {
-                if (memory->memory().sharingMode() != JSC::Wasm::MemorySharingMode::Shared) {
-                    code = SerializationReturnCode::DataCloneError;
-                    return true;
-                }
-                if (m_context != SerializationContext::WorkerPostMessage) {
-                    code = SerializationReturnCode::DataCloneError;
-                    return true;
-                }
-                uint32_t index = m_wasmMemoryHandles.size();
-                m_wasmMemoryHandles.append(makeRef(memory->memory().handle()));
-                write(WasmMemoryTag);
-                write(index);
-                return true;
-            }
</del><span class="cx"> #endif
</span><span class="cx">             if (obj->inherits<JSDOMPointReadOnly>(vm)) {
</span><span class="cx">                 dumpDOMPoint(obj);
</span><span class="lines">@@ -1685,7 +1658,6 @@
</span><span class="cx">     ArrayBufferContentsArray& m_sharedBuffers;
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx">     WasmModuleArray& m_wasmModules;
</span><del>-    WasmMemoryHandleArray& m_wasmMemoryHandles;
</del><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -1965,7 +1937,6 @@
</span><span class="cx">         , ArrayBufferContentsArray* arrayBufferContentsArray, const Vector<uint8_t>& buffer, const Vector<String>& blobURLs, const Vector<String> blobFilePaths, ArrayBufferContentsArray* sharedBuffers
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx">         , WasmModuleArray* wasmModules
</span><del>-        , WasmMemoryHandleArray* wasmMemoryHandles
</del><span class="cx"> #endif
</span><span class="cx">         )
</span><span class="cx">     {
</span><span class="lines">@@ -1977,7 +1948,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx">             , wasmModules
</span><del>-            , wasmMemoryHandles
</del><span class="cx"> #endif
</span><span class="cx">             );
</span><span class="cx">         if (!deserializer.isValid())
</span><span class="lines">@@ -2031,7 +2001,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx">         , WasmModuleArray* wasmModules = nullptr
</span><del>-        , WasmMemoryHandleArray* wasmMemoryHandles = nullptr
</del><span class="cx"> #endif
</span><span class="cx">         )
</span><span class="cx">         : CloneBase(lexicalGlobalObject)
</span><span class="lines">@@ -2052,7 +2021,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx">         , m_wasmModules(wasmModules)
</span><del>-        , m_wasmMemoryHandles(wasmMemoryHandles)
</del><span class="cx"> #endif
</span><span class="cx">     {
</span><span class="cx">         if (!read(m_version))
</span><span class="lines">@@ -2065,7 +2033,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx">         , WasmModuleArray* wasmModules
</span><del>-        , WasmMemoryHandleArray* wasmMemoryHandles
</del><span class="cx"> #endif
</span><span class="cx">         )
</span><span class="cx">         : CloneBase(lexicalGlobalObject)
</span><span class="lines">@@ -2089,7 +2056,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx">         , m_wasmModules(wasmModules)
</span><del>-        , m_wasmMemoryHandles(wasmMemoryHandles)
</del><span class="cx"> #endif
</span><span class="cx">     {
</span><span class="cx">         if (!read(m_version))
</span><span class="lines">@@ -3333,33 +3299,6 @@
</span><span class="cx">             m_gcBuffer.appendWithCrashOnOverflow(result);
</span><span class="cx">             return result;
</span><span class="cx">         }
</span><del>-        case WasmMemoryTag: {
-            uint32_t index;
-            bool indexSuccessfullyRead = read(index);
-            if (!indexSuccessfullyRead || !m_wasmMemoryHandles || index >= m_wasmMemoryHandles->size()) {
-                fail();
-                return JSValue();
-            }
-            RefPtr<Wasm::MemoryHandle> handle = m_wasmMemoryHandles->at(index);
-            if (!handle) {
-                fail();
-                return JSValue();
-            }
-            auto& vm = m_lexicalGlobalObject->vm();
-            auto scope = DECLARE_THROW_SCOPE(vm);
-            JSWebAssemblyMemory* result = JSC::JSWebAssemblyMemory::tryCreate(m_lexicalGlobalObject, vm, m_globalObject->webAssemblyMemoryStructure());
-            // Since we are cloning a JSWebAssemblyMemory, it's impossible for that
-            // module to not have been a valid module. Therefore, createStub should
-            // not trow.
-            scope.releaseAssertNoException();
-            Ref<Wasm::Memory> memory = Wasm::Memory::create(handle.releaseNonNull(),
-                [&vm] (Wasm::Memory::NotifyPressure) { vm.heap.collectAsync(CollectionScope::Full); },
-                [&vm] (Wasm::Memory::SyncTryToReclaim) { vm.heap.collectSync(CollectionScope::Full); },
-                [&vm, result] (Wasm::Memory::GrowSuccess, Wasm::PageCount oldPageCount, Wasm::PageCount newPageCount) { result->growSuccessCallback(vm, oldPageCount, newPageCount); });
-            result->adopt(WTFMove(memory));
-            m_gcBuffer.appendWithCrashOnOverflow(result);
-            return result;
-        }
</del><span class="cx"> #endif
</span><span class="cx">         case ArrayBufferTag: {
</span><span class="cx">             RefPtr<ArrayBuffer> arrayBuffer;
</span><span class="lines">@@ -3500,7 +3439,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx">     WasmModuleArray* m_wasmModules;
</span><del>-    WasmMemoryHandleArray* m_wasmMemoryHandles;
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     String blobFilePathForBlobURL(const String& blobURL)
</span><span class="lines">@@ -3723,7 +3661,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx">         , std::unique_ptr<WasmModuleArray> wasmModulesArray
</span><del>-        , std::unique_ptr<WasmMemoryHandleArray> wasmMemoryHandlesArray
</del><span class="cx"> #endif
</span><span class="cx">         )
</span><span class="cx">     : m_data(WTFMove(buffer))
</span><span class="lines">@@ -3735,7 +3672,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx">     , m_wasmModulesArray(WTFMove(wasmModulesArray))
</span><del>-    , m_wasmMemoryHandlesArray(WTFMove(wasmMemoryHandlesArray))
</del><span class="cx"> #endif
</span><span class="cx"> {
</span><span class="cx">     // Since this SerializedScriptValue is meant to be passed between threads, its String data members
</span><span class="lines">@@ -3774,10 +3710,6 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx">     // We are not supporting WebAssembly Module memory estimation yet.
</span><del>-    if (m_wasmMemoryHandlesArray) {
-        for (auto& content : *m_wasmMemoryHandlesArray)
-            cost += content->size();
-    }
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     for (auto& urls : m_blobURLs)
</span><span class="lines">@@ -3868,7 +3800,6 @@
</span><span class="cx">     Vector<RefPtr<JSC::ArrayBuffer>> dummyArrayBuffers;
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx">     WasmModuleArray dummyModules;
</span><del>-    WasmMemoryHandleArray dummyMemoryHandles;
</del><span class="cx"> #endif
</span><span class="cx">     ArrayBufferContentsArray dummySharedBuffers;
</span><span class="cx">     auto code = CloneSerializer::serialize(&lexicalGlobalObject, value, dummyMessagePorts, dummyArrayBuffers, dummyImageBitmaps,
</span><span class="lines">@@ -3877,13 +3808,11 @@
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx">         dummyModules,
</span><del>-        dummyMemoryHandles,
</del><span class="cx"> #endif
</span><span class="cx">         blobURLs, buffer, SerializationContext::Default, dummySharedBuffers);
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx">     ASSERT_WITH_MESSAGE(dummyModules.isEmpty(), "Wasm::Module serialization is only allowed in the postMessage context");
</span><del>-    ASSERT_WITH_MESSAGE(dummyMemoryHandles.isEmpty(), "Wasm::Memory serialization is only allowed in the postMessage context");
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     if (throwExceptions == SerializationErrorMode::Throwing)
</span><span class="lines">@@ -3930,7 +3859,7 @@
</span><span class="cx"> #endif
</span><span class="cx">     for (auto& transferable : transferList) {
</span><span class="cx">         if (auto arrayBuffer = toPossiblySharedArrayBuffer(vm, transferable.get())) {
</span><del>-            if (arrayBuffer->isDetached() || arrayBuffer->isShared())
</del><ins>+            if (arrayBuffer->isDetached())
</ins><span class="cx">                 return Exception { DataCloneError };
</span><span class="cx">             if (arrayBuffer->isLocked()) {
</span><span class="cx">                 auto scope = DECLARE_THROW_SCOPE(vm);
</span><span class="lines">@@ -3975,7 +3904,6 @@
</span><span class="cx">     Vector<String> blobURLs;
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx">     WasmModuleArray wasmModules;
</span><del>-    WasmMemoryHandleArray wasmMemoryHandles;
</del><span class="cx"> #endif
</span><span class="cx">     std::unique_ptr<ArrayBufferContentsArray> sharedBuffers = makeUnique<ArrayBufferContentsArray>();
</span><span class="cx">     auto code = CloneSerializer::serialize(&lexicalGlobalObject, value, messagePorts, arrayBuffers, imageBitmaps,
</span><span class="lines">@@ -3983,8 +3911,7 @@
</span><span class="cx">         offscreenCanvases,
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><del>-        wasmModules,
-        wasmMemoryHandles,
</del><ins>+        wasmModules, 
</ins><span class="cx"> #endif
</span><span class="cx">         blobURLs, buffer, context, *sharedBuffers);
</span><span class="cx"> 
</span><span class="lines">@@ -4009,7 +3936,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx">                 , makeUnique<WasmModuleArray>(wasmModules)
</span><del>-                , context == SerializationContext::WorkerPostMessage ? makeUnique<WasmMemoryHandleArray>(wasmMemoryHandles) : nullptr
</del><span class="cx"> #endif
</span><span class="cx">                 ));
</span><span class="cx"> }
</span><span class="lines">@@ -4067,7 +3993,6 @@
</span><span class="cx">         , m_arrayBufferContentsArray.get(), m_data, blobURLs, blobFilePaths, m_sharedBufferContentsArray.get()
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx">         , m_wasmModulesArray.get()
</span><del>-        , m_wasmMemoryHandlesArray.get()
</del><span class="cx"> #endif
</span><span class="cx">         );
</span><span class="cx">     if (throwExceptions == SerializationErrorMode::Throwing)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsSerializedScriptValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/SerializedScriptValue.h (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/SerializedScriptValue.h 2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/bindings/js/SerializedScriptValue.h    2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -41,7 +41,6 @@
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx"> namespace JSC { namespace Wasm {
</span><span class="cx"> class Module;
</span><del>-class MemoryHandle;
</del><span class="cx"> } }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -62,7 +61,6 @@
</span><span class="cx"> using ArrayBufferContentsArray = Vector<JSC::ArrayBufferContents>;
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx"> using WasmModuleArray = Vector<RefPtr<JSC::Wasm::Module>>;
</span><del>-using WasmMemoryHandleArray = Vector<RefPtr<JSC::Wasm::MemoryHandle>>;
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> DECLARE_ALLOCATOR_WITH_HEAP_IDENTIFIER(SerializedScriptValue);
</span><span class="lines">@@ -124,7 +122,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx">         , std::unique_ptr<WasmModuleArray> = nullptr
</span><del>-        , std::unique_ptr<WasmMemoryHandleArray> = nullptr
</del><span class="cx"> #endif
</span><span class="cx">         );
</span><span class="cx"> 
</span><span class="lines">@@ -139,7 +136,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(WEBASSEMBLY)
</span><span class="cx">     std::unique_ptr<WasmModuleArray> m_wasmModulesArray;
</span><del>-    std::unique_ptr<WasmMemoryHandleArray> m_wasmMemoryHandlesArray;
</del><span class="cx"> #endif
</span><span class="cx">     Vector<String> m_blobURLs;
</span><span class="cx">     size_t m_memoryCost { 0 };
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsWebCoreJSClientDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/WebCoreJSClientData.cpp (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/WebCoreJSClientData.cpp 2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/bindings/js/WebCoreJSClientData.cpp    2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -136,7 +136,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void JSVMClientData::initNormalWorld(VM* vm, WorkerThreadType type)
</del><ins>+void JSVMClientData::initNormalWorld(VM* vm)
</ins><span class="cx"> {
</span><span class="cx">     JSVMClientData* clientData = new JSVMClientData(*vm);
</span><span class="cx">     vm->clientData = clientData; // ~VM deletes this pointer.
</span><span class="lines">@@ -144,7 +144,7 @@
</span><span class="cx">     vm->heap.addMarkingConstraint(makeUnique<DOMGCOutputConstraint>(*vm, *clientData));
</span><span class="cx"> 
</span><span class="cx">     clientData->m_normalWorld = DOMWrapperWorld::create(*vm, DOMWrapperWorld::Type::Normal);
</span><del>-    vm->m_typedArrayController = adoptRef(new WebCoreTypedArrayController(type == WorkerThreadType::DedicatedWorker || type == WorkerThreadType::Worklet));
</del><ins>+    vm->m_typedArrayController = adoptRef(new WebCoreTypedArrayController());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsWebCoreJSClientDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/WebCoreJSClientData.h (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/WebCoreJSClientData.h   2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/bindings/js/WebCoreJSClientData.h      2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -24,7 +24,6 @@
</span><span class="cx"> #include "DOMWrapperWorld.h"
</span><span class="cx"> #include "WebCoreBuiltinNames.h"
</span><span class="cx"> #include "WebCoreJSBuiltins.h"
</span><del>-#include "WorkerThreadType.h"
</del><span class="cx"> #include <wtf/HashSet.h>
</span><span class="cx"> #include <wtf/RefPtr.h>
</span><span class="cx"> 
</span><span class="lines">@@ -41,7 +40,7 @@
</span><span class="cx"> 
</span><span class="cx">     virtual ~JSVMClientData();
</span><span class="cx">     
</span><del>-    WEBCORE_EXPORT static void initNormalWorld(JSC::VM*, WorkerThreadType);
</del><ins>+    WEBCORE_EXPORT static void initNormalWorld(JSC::VM*);
</ins><span class="cx"> 
</span><span class="cx">     DOMWrapperWorld& normalWorld() { return *m_normalWorld; }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsWebCoreTypedArrayControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/WebCoreTypedArrayController.cpp (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/WebCoreTypedArrayController.cpp 2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/bindings/js/WebCoreTypedArrayController.cpp    2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -34,10 +34,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-WebCoreTypedArrayController::WebCoreTypedArrayController(bool allowAtomicsWait)
-    : m_allowAtomicsWait(allowAtomicsWait)
-{
-}
</del><ins>+WebCoreTypedArrayController::WebCoreTypedArrayController() = default;
</ins><span class="cx"> 
</span><span class="cx"> WebCoreTypedArrayController::~WebCoreTypedArrayController() = default;
</span><span class="cx"> 
</span><span class="lines">@@ -53,7 +50,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool WebCoreTypedArrayController::isAtomicsWaitAllowedOnCurrentThread()
</span><span class="cx"> {
</span><del>-    return m_allowAtomicsWait;
</del><ins>+    return !isMainThread();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, JSC::SlotVisitor& visitor, const char** reason)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsWebCoreTypedArrayControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/WebCoreTypedArrayController.h (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/WebCoreTypedArrayController.h   2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/bindings/js/WebCoreTypedArrayController.h      2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx"> 
</span><span class="cx"> class WebCoreTypedArrayController : public JSC::TypedArrayController {
</span><span class="cx"> public:
</span><del>-    WebCoreTypedArrayController(bool allowAtomicsWait);
</del><ins>+    WebCoreTypedArrayController();
</ins><span class="cx">     virtual ~WebCoreTypedArrayController();
</span><span class="cx">     
</span><span class="cx">     JSC::JSArrayBuffer* toJS(JSC::JSGlobalObject*, JSC::JSGlobalObject*, JSC::ArrayBuffer*) override;
</span><span class="lines">@@ -53,7 +53,6 @@
</span><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     JSArrayBufferOwner m_owner;
</span><del>-    bool m_allowAtomicsWait;
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm    2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -6999,7 +6999,6 @@
</span><span class="cx">     return 1 if $type->extendedAttributes->{LegacyNullToEmptyString};
</span><span class="cx">     return 1 if $type->extendedAttributes->{AtomString};
</span><span class="cx">     return 1 if $type->extendedAttributes->{RequiresExistingAtomString};
</span><del>-    return 1 if $type->extendedAttributes->{AllowShared};
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub GetAnnotatedIDLType
</span><span class="lines">@@ -7011,7 +7010,6 @@
</span><span class="cx">     return "IDLLegacyNullToEmptyStringAdaptor" if $type->extendedAttributes->{LegacyNullToEmptyString};
</span><span class="cx">     return "IDLAtomStringAdaptor" if $type->extendedAttributes->{AtomString};
</span><span class="cx">     return "IDLRequiresExistingAtomStringAdaptor" if $type->extendedAttributes->{RequiresExistingAtomString};
</span><del>-    return "IDLAllowSharedAdaptor" if $type->extendedAttributes->{AllowShared};
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub GetBaseIDLType
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsIDLAttributesjson"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.json (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.json 2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.json    2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -24,7 +24,8 @@
</span><span class="cx">             "contextsAllowed": ["type"],
</span><span class="cx">             "standard": {
</span><span class="cx">                 "url": "https://heycam.github.io/webidl/#AllowShared"
</span><del>-            }
</del><ins>+            },
+            "unsupported": true
</ins><span class="cx">         },
</span><span class="cx">         "AppleCopyright": {
</span><span class="cx">             "contextsAllowed": ["interface", "attribute", "operation"]
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp      2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -1602,7 +1602,6 @@
</span><span class="cx"> static JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunction_leading_underscore_function);
</span><span class="cx"> static JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunction_double_leading_underscore_function);
</span><span class="cx"> static JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunction_trailing_underscore_function_);
</span><del>-static JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunction_encodeInto);
</del><span class="cx"> static JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunction_toString);
</span><span class="cx"> 
</span><span class="cx"> // Attributes
</span><span class="lines">@@ -2334,7 +2333,6 @@
</span><span class="cx">     { "leading_underscore_function", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunction_leading_underscore_function), (intptr_t) (0) } },
</span><span class="cx">     { "_double_leading_underscore_function", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunction_double_leading_underscore_function), (intptr_t) (0) } },
</span><span class="cx">     { "trailing_underscore_function_", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunction_trailing_underscore_function_), (intptr_t) (0) } },
</span><del>-    { "encodeInto", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunction_encodeInto), (intptr_t) (1) } },
</del><span class="cx">     { "toString", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunction_toString), (intptr_t) (0) } },
</span><span class="cx"> #if ENABLE(Condition1)
</span><span class="cx">     { "CONDITIONAL_CONST", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(0) } },
</span><span class="lines">@@ -9499,26 +9497,6 @@
</span><span class="cx">     return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunction_trailing_underscore_function_Body>(*lexicalGlobalObject, *callFrame, "trailing_underscore_function_");
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static inline JSC::EncodedJSValue jsTestObjPrototypeFunction_encodeIntoBody(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis)
-{
-    auto& vm = JSC::getVM(lexicalGlobalObject);
-    auto throwScope = DECLARE_THROW_SCOPE(vm);
-    UNUSED_PARAM(throwScope);
-    UNUSED_PARAM(callFrame);
-    auto& impl = castedThis->wrapped();
-    if (UNLIKELY(callFrame->argumentCount() < 1))
-        return throwVMError(lexicalGlobalObject, throwScope, createNotEnoughArgumentsError(lexicalGlobalObject));
-    EnsureStillAliveScope argument0 = callFrame->uncheckedArgument(0);
-    auto destination = convert<IDLAllowSharedAdaptor<IDLUint8Array>>(*lexicalGlobalObject, argument0.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentTypeError(lexicalGlobalObject, scope, 0, "destination", "TestObject", "encodeInto", "Uint8Array"); });
-    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
-    RELEASE_AND_RETURN(throwScope, JSValue::encode(toJS<IDLBoolean>(impl.encodeInto(destination.releaseNonNull()))));
-}
-
-JSC_DEFINE_HOST_FUNCTION(jsTestObjPrototypeFunction_encodeInto, (JSGlobalObject* lexicalGlobalObject, CallFrame* callFrame))
-{
-    return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunction_encodeIntoBody>(*lexicalGlobalObject, *callFrame, "encodeInto");
-}
-
</del><span class="cx"> static inline JSC::EncodedJSValue jsTestObjPrototypeFunction_toStringBody(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis)
</span><span class="cx"> {
</span><span class="cx">     auto& vm = JSC::getVM(lexicalGlobalObject);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestTestObjidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/TestObj.idl (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/TestObj.idl   2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/bindings/scripts/test/TestObj.idl      2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -467,8 +467,6 @@
</span><span class="cx">     undefined _leading_underscore_function(); // NOTE: WebIDL removes the leading underscore so this is interpreted as "leading_underscore_function"
</span><span class="cx">     undefined __double_leading_underscore_function(); // NOTE: WebIDL removes the leading underscore so this is interpreted as "_double_leading_underscore_function"
</span><span class="cx">     undefined trailing_underscore_function_();
</span><del>-
-    boolean encodeInto([AllowShared] Uint8Array destination);
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> // The following comments should not generate any code.
</span></span></pre></div>
<a id="trunkSourceWebCoredomTextDecoderidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/TextDecoder.idl (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/TextDecoder.idl 2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/dom/TextDecoder.idl    2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -41,5 +41,5 @@
</span><span class="cx">     readonly attribute DOMString encoding;
</span><span class="cx">     readonly attribute boolean fatal;
</span><span class="cx">     readonly attribute boolean ignoreBOM;
</span><del>-    [MayThrowException] USVString decode(optional [AllowShared] BufferSource? input, optional TextDecodeOptions options);
</del><ins>+    [MayThrowException] USVString decode(optional BufferSource? input, optional TextDecodeOptions options);
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoredomTextDecoderStreamDecoderidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/TextDecoderStreamDecoder.idl (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/TextDecoderStreamDecoder.idl    2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/dom/TextDecoderStreamDecoder.idl       2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -32,6 +32,6 @@
</span><span class="cx">     constructor(DOMString label, boolean fatal, boolean ignoreBOM);
</span><span class="cx"> 
</span><span class="cx">     [PrivateIdentifier] DOMString encoding();
</span><del>-    [PrivateIdentifier, MayThrowException] DOMString decode([AllowShared] BufferSource source);
</del><ins>+    [PrivateIdentifier, MayThrowException] DOMString decode(BufferSource source);
</ins><span class="cx">     [PrivateIdentifier, MayThrowException] DOMString flush();
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoredomTextEncoderidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/TextEncoder.idl (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/TextEncoder.idl 2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/dom/TextEncoder.idl    2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -39,5 +39,5 @@
</span><span class="cx">     readonly attribute DOMString encoding;
</span><span class="cx"> 
</span><span class="cx">     [NewObject] Uint8Array encode(optional USVString input = "");
</span><del>-    TextEncoderEncodeIntoResult encodeInto(USVString source, [AllowShared] Uint8Array destination);
</del><ins>+    TextEncoderEncodeIntoResult encodeInto(USVString source, Uint8Array destination);
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersDedicatedWorkerGlobalScopecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.cpp (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.cpp      2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.cpp 2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope(const WorkerParameters& params, Ref<SecurityOrigin>&& origin, DedicatedWorkerThread& thread, Ref<SecurityOrigin>&& topOrigin, IDBClient::IDBConnectionProxy* connectionProxy, SocketProvider* socketProvider)
</span><del>-    : WorkerGlobalScope(WorkerThreadType::DedicatedWorker, params, WTFMove(origin), thread, WTFMove(topOrigin), connectionProxy, socketProvider)
</del><ins>+    : WorkerGlobalScope(params, WTFMove(origin), thread, WTFMove(topOrigin), connectionProxy, socketProvider)
</ins><span class="cx">     , m_name(params.name)
</span><span class="cx"> {
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerGlobalScopecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.cpp (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerGlobalScope.cpp       2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.cpp  2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -59,8 +59,8 @@
</span><span class="cx"> 
</span><span class="cx"> WTF_MAKE_ISO_ALLOCATED_IMPL(WorkerGlobalScope);
</span><span class="cx"> 
</span><del>-WorkerGlobalScope::WorkerGlobalScope(WorkerThreadType type, const WorkerParameters& params, Ref<SecurityOrigin>&& origin, WorkerThread& thread, Ref<SecurityOrigin>&& topOrigin, IDBClient::IDBConnectionProxy* connectionProxy, SocketProvider* socketProvider)
-    : WorkerOrWorkletGlobalScope(type, JSC::VM::create(), &thread)
</del><ins>+WorkerGlobalScope::WorkerGlobalScope(const WorkerParameters& params, Ref<SecurityOrigin>&& origin, WorkerThread& thread, Ref<SecurityOrigin>&& topOrigin, IDBClient::IDBConnectionProxy* connectionProxy, SocketProvider* socketProvider)
+    : WorkerOrWorkletGlobalScope(JSC::VM::create(), &thread)
</ins><span class="cx">     , m_url(params.scriptURL)
</span><span class="cx">     , m_identifier(params.identifier)
</span><span class="cx">     , m_userAgent(params.userAgent)
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerGlobalScopeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerGlobalScope.h (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerGlobalScope.h 2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/workers/WorkerGlobalScope.h    2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -126,7 +126,7 @@
</span><span class="cx">     bool webGLEnabled() const { return m_webGLEnabled; }
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><del>-    WorkerGlobalScope(WorkerThreadType, const WorkerParameters&, Ref<SecurityOrigin>&&, WorkerThread&, Ref<SecurityOrigin>&& topOrigin, IDBClient::IDBConnectionProxy*, SocketProvider*);
</del><ins>+    WorkerGlobalScope(const WorkerParameters&, Ref<SecurityOrigin>&&, WorkerThread&, Ref<SecurityOrigin>&& topOrigin, IDBClient::IDBConnectionProxy*, SocketProvider*);
</ins><span class="cx"> 
</span><span class="cx">     void applyContentSecurityPolicyResponseHeaders(const ContentSecurityPolicyResponseHeaders&);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerOrWorkletGlobalScopecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerOrWorkletGlobalScope.cpp (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerOrWorkletGlobalScope.cpp      2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/workers/WorkerOrWorkletGlobalScope.cpp 2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -37,8 +37,8 @@
</span><span class="cx"> 
</span><span class="cx"> WTF_MAKE_ISO_ALLOCATED_IMPL(WorkerOrWorkletGlobalScope);
</span><span class="cx"> 
</span><del>-WorkerOrWorkletGlobalScope::WorkerOrWorkletGlobalScope(WorkerThreadType type, Ref<JSC::VM>&& vm, WorkerOrWorkletThread* thread)
-    : m_script(makeUnique<WorkerOrWorkletScriptController>(type, WTFMove(vm), this))
</del><ins>+WorkerOrWorkletGlobalScope::WorkerOrWorkletGlobalScope(Ref<JSC::VM>&& vm, WorkerOrWorkletThread* thread)
+    : m_script(makeUnique<WorkerOrWorkletScriptController>(WTFMove(vm), this))
</ins><span class="cx">     , m_thread(thread)
</span><span class="cx">     , m_inspectorController(makeUnique<WorkerInspectorController>(*this))
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerOrWorkletGlobalScopeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerOrWorkletGlobalScope.h (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerOrWorkletGlobalScope.h        2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/workers/WorkerOrWorkletGlobalScope.h   2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -27,7 +27,6 @@
</span><span class="cx"> 
</span><span class="cx"> #include "EventTarget.h"
</span><span class="cx"> #include "ScriptExecutionContext.h"
</span><del>-#include "WorkerThreadType.h"
</del><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -68,7 +67,7 @@
</span><span class="cx">     virtual void resume() { }
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><del>-    WorkerOrWorkletGlobalScope(WorkerThreadType, Ref<JSC::VM>&&, WorkerOrWorkletThread*);
</del><ins>+    WorkerOrWorkletGlobalScope(Ref<JSC::VM>&&, WorkerOrWorkletThread*);
</ins><span class="cx"> 
</span><span class="cx">     // ScriptExecutionContext.
</span><span class="cx">     bool isJSExecutionForbidden() const final;
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerOrWorkletScriptControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerOrWorkletScriptController.cpp (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerOrWorkletScriptController.cpp 2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/workers/WorkerOrWorkletScriptController.cpp    2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -50,17 +50,17 @@
</span><span class="cx"> 
</span><span class="cx"> using namespace JSC;
</span><span class="cx"> 
</span><del>-WorkerOrWorkletScriptController::WorkerOrWorkletScriptController(WorkerThreadType type, Ref<VM>&& vm, WorkerOrWorkletGlobalScope* globalScope)
</del><ins>+WorkerOrWorkletScriptController::WorkerOrWorkletScriptController(Ref<VM>&& vm, WorkerOrWorkletGlobalScope* globalScope)
</ins><span class="cx">     : m_vm(WTFMove(vm))
</span><span class="cx">     , m_globalScope(globalScope)
</span><span class="cx">     , m_globalScopeWrapper(*m_vm)
</span><span class="cx"> {
</span><span class="cx">     m_vm->heap.acquireAccess(); // It's not clear that we have good discipline for heap access, so turn it on permanently.
</span><del>-    JSVMClientData::initNormalWorld(m_vm.get(), type);
</del><ins>+    JSVMClientData::initNormalWorld(m_vm.get());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-WorkerOrWorkletScriptController::WorkerOrWorkletScriptController(WorkerThreadType type, WorkerOrWorkletGlobalScope* globalScope)
-    : WorkerOrWorkletScriptController(type, JSC::VM::create(), globalScope)
</del><ins>+WorkerOrWorkletScriptController::WorkerOrWorkletScriptController(WorkerOrWorkletGlobalScope* globalScope)
+    : WorkerOrWorkletScriptController(JSC::VM::create(), globalScope)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerOrWorkletScriptControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerOrWorkletScriptController.h (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerOrWorkletScriptController.h   2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/workers/WorkerOrWorkletScriptController.h      2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -26,7 +26,6 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><del>-#include "WorkerThreadType.h"
</del><span class="cx"> #include <JavaScriptCore/Debugger.h>
</span><span class="cx"> #include <JavaScriptCore/JSRunLoopTimer.h>
</span><span class="cx"> #include <wtf/Forward.h>
</span><span class="lines">@@ -52,8 +51,8 @@
</span><span class="cx">     WTF_MAKE_NONCOPYABLE(WorkerOrWorkletScriptController);
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>-    WorkerOrWorkletScriptController(WorkerThreadType, Ref<JSC::VM>&&, WorkerOrWorkletGlobalScope*);
-    explicit WorkerOrWorkletScriptController(WorkerThreadType, WorkerOrWorkletGlobalScope*);
</del><ins>+    WorkerOrWorkletScriptController(Ref<JSC::VM>&&, WorkerOrWorkletGlobalScope*);
+    explicit WorkerOrWorkletScriptController(WorkerOrWorkletGlobalScope*);
</ins><span class="cx">     ~WorkerOrWorkletScriptController();
</span><span class="cx"> 
</span><span class="cx">     void releaseHeapAccess();
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerThreadTypeh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/workers/WorkerThreadType.h (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerThreadType.h  2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/workers/WorkerThreadType.h     2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -1,37 +0,0 @@
</span><del>-/*
- * Copyright (C) 2020 Apple Inc. All rights reserved.
- *
- * 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 WorkerThreadType : uint8_t {
-    Main,
-    Worklet,
-    DedicatedWorker,
-    ServiceWorker,
-};
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWebCoreworkersserviceServiceWorkerGlobalScopecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp        2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp   2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ServiceWorkerGlobalScope::ServiceWorkerGlobalScope(const ServiceWorkerContextData& data, const WorkerParameters& params, Ref<SecurityOrigin>&& origin, ServiceWorkerThread& thread, Ref<SecurityOrigin>&& topOrigin, IDBClient::IDBConnectionProxy* connectionProxy, SocketProvider* socketProvider)
</span><del>-    : WorkerGlobalScope(WorkerThreadType::ServiceWorker, params, WTFMove(origin), thread, WTFMove(topOrigin), connectionProxy, socketProvider)
</del><ins>+    : WorkerGlobalScope(params, WTFMove(origin), thread, WTFMove(topOrigin), connectionProxy, socketProvider)
</ins><span class="cx">     , m_contextData(crossThreadCopy(data))
</span><span class="cx">     , m_registration(ServiceWorkerRegistration::getOrCreate(*this, navigator().serviceWorker(), WTFMove(m_contextData.registration)))
</span><span class="cx">     , m_clients(ServiceWorkerClients::create())
</span></span></pre></div>
<a id="trunkSourceWebCoreworkletsWorkletGlobalScopecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/worklets/WorkletGlobalScope.cpp (269949 => 269950)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/worklets/WorkletGlobalScope.cpp     2020-11-18 10:44:41 UTC (rev 269949)
+++ trunk/Source/WebCore/worklets/WorkletGlobalScope.cpp        2020-11-18 10:55:25 UTC (rev 269950)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx"> static std::atomic<unsigned> gNumberOfWorkletGlobalScopes { 0 };
</span><span class="cx"> 
</span><span class="cx"> WorkletGlobalScope::WorkletGlobalScope(WorkerOrWorkletThread& thread, const WorkletParameters& parameters)
</span><del>-    : WorkerOrWorkletGlobalScope(WorkerThreadType::Worklet, JSC::VM::create(), &thread)
</del><ins>+    : WorkerOrWorkletGlobalScope(JSC::VM::create(), &thread)
</ins><span class="cx">     , m_topOrigin(SecurityOrigin::createUnique())
</span><span class="cx">     , m_url(parameters.windowURL)
</span><span class="cx">     , m_jsRuntimeFlags(parameters.jsRuntimeFlags)
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WorkletGlobalScope::WorkletGlobalScope(Document& document, Ref<JSC::VM>&& vm, ScriptSourceCode&& code)
</span><del>-    : WorkerOrWorkletGlobalScope(WorkerThreadType::Worklet, WTFMove(vm), nullptr)
</del><ins>+    : WorkerOrWorkletGlobalScope(WTFMove(vm), nullptr)
</ins><span class="cx">     , m_document(makeWeakPtr(document))
</span><span class="cx">     , m_topOrigin(SecurityOrigin::createUnique())
</span><span class="cx">     , m_url(code.url())
</span></span></pre>
</div>
</div>

</body>
</html>