Unreviewed, rolling out r247397, r247378, r247366.

Broke watchOS builds.

Reverted changesets:

"[WebGPU] Implement GPUError and error scopes"
https://bugs.webkit.org/show_bug.cgi?id=199655
https://trac.webkit.org/changeset/247366/webkit

"[WebGPU] Move error scopes out of GPUDevice for more portable error generation"
https://bugs.webkit.org/show_bug.cgi?id=199740
https://trac.webkit.org/changeset/247397/webkit

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@247442 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index be022e0..18db31c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2019-07-15  Ryan Haddad  <ryanhaddad@apple.com>
+
+        Unreviewed, rolling out r247397, r247378, r247366.
+
+        Broke watchOS builds.
+
+        Reverted changesets:
+
+        "[WebGPU] Implement GPUError and error scopes"
+        https://bugs.webkit.org/show_bug.cgi?id=199655
+        https://trac.webkit.org/changeset/247366/webkit
+
+        "[WebGPU] Move error scopes out of GPUDevice for more portable error generation"
+        https://bugs.webkit.org/show_bug.cgi?id=199740
+        https://trac.webkit.org/changeset/247397/webkit
+
 2019-07-15  Rob Buis  <rbuis@igalia.com>
 
         MathML WPT test for RadicalDegreeBottomRaisePercent fails
diff --git a/LayoutTests/webgpu/error-scopes-test-expected.txt b/LayoutTests/webgpu/error-scopes-test-expected.txt
deleted file mode 100644
index 4eba67f..0000000
--- a/LayoutTests/webgpu/error-scopes-test-expected.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-
-PASS Capture a single GPUValidation error. 
-PASS Capture a single GPUOutOfMemory error. 
-PASS Ignore errors past the first. 
-PASS Captured errors match error scope filter. 
-PASS Reject popErrorScope if no scope exists. 
-PASS Filter 'none' should capture but not report errors. 
-PASS Push and pop many error scopes with no rejections. 
-PASS Catch many errors in nested scopes. 
-
diff --git a/LayoutTests/webgpu/error-scopes-test.html b/LayoutTests/webgpu/error-scopes-test.html
deleted file mode 100644
index 5cfcca1..0000000
--- a/LayoutTests/webgpu/error-scopes-test.html
+++ /dev/null
@@ -1,122 +0,0 @@
-<!DOCTYPE html>
-<meta charset=utf-8>
-<title>Test Error Scopes.</title>
-<body>
-<script src="js/webgpu-functions.js"></script>
-<script src="../resources/testharness.js"></script>
-<script src="../resources/testharnessreport.js"></script>
-<script>
-let tests = {};
-
-tests["Capture a single GPUValidation error."] = async device => {
-    device.pushErrorScope("validation");
-    causeValidationError(device);
-    return popValidationError(device);
-};
-
-tests["Capture a single GPUOutOfMemory error."] = async device => {
-    device.pushErrorScope("out-of-memory");
-    causeMemoryError(device);
-    return popMemoryError(device);
-};
-
-tests["Ignore errors past the first."] = async device => {
-    device.pushErrorScope("validation");
-    device.pushErrorScope("validation");
-    causeValidationError(device);
-    causeValidationError(device);
-    
-    const error = await device.popErrorScope();
-    assertValidationError(error);
-
-    return popNullError(device);
-};
-
-tests["Captured errors match error scope filter."] = async device => {
-    device.pushErrorScope("validation");
-    device.pushErrorScope("out-of-memory");
-    causeValidationError(device);
-
-    const shouldBeNull = await device.popErrorScope();
-    assertNull(shouldBeNull);
-
-    return popValidationError(device);
-};
-
-tests["Reject popErrorScope if no scope exists."] = async device => {
-    const promise = device.popErrorScope().then(() => assert_unreached(), async e => {
-        assert_false(e === undefined);
-        // Pop the extra 'none' scope.
-        await popNullError(device);
-    });
-    // 'promise' should still reject if a scope is pushed here.
-    device.pushErrorScope("none");
-    return promise;
-};
-
-tests["Filter 'none' should capture but not report errors."] = async device => {
-    device.pushErrorScope("out-of-memory");
-    device.pushErrorScope("none");
-    causeMemoryError(device);
-
-    const shouldBeNull = await device.popErrorScope();
-    assertNull(shouldBeNull);
-
-    return popNullError(device);
-};
-
-tests["Push and pop many error scopes with no rejections."] = async device => {
-    const numIterations = 128;
-    for (let i = 0; i < numIterations; ++i)
-        device.pushErrorScope("out-of-memory");
-    
-    for (let i = 0; i < numIterations - 1; ++i)
-        await popNullError(device);
-
-    return popNullError(device);
-};
-
-tests["Catch many errors in nested scopes."] = async device => {
-    const numIterations = 128;
-    for (let i = 0; i < numIterations; ++i) {
-        device.pushErrorScope("validation");
-        causeValidationError(device);
-    }
-
-    for (let i = 0; i < numIterations - 1; ++i)
-        await popValidationError(device);
-
-    return popValidationError(device);
-};
-
-const init = async () => {
-    try {
-        var device = await getBasicDevice();
-    } catch (e) { /* WebGPU is not supported. */ }
-
-    for (let name in tests)
-        devicePromiseTest(device, name);
-};
-
-window.addEventListener("load", init);
-
-/* Helper Functions */
-
-const causeValidationError = device => device.createBuffer({ size: 4, usage: GPUBufferUsage.MAP_READ | GPUBufferUsage.MAP_WRITE });
-const causeMemoryError = device => device.createBuffer({ size: 99999999999, usage: GPUBufferUsage.NONE });
-const popValidationError = device => device.popErrorScope().then(error => assertValidationError(error));
-const popMemoryError = device => device.popErrorScope().then(error => assertMemoryError(error));
-const popNullError = device => device.popErrorScope().then(error => assertNull(error));
-const assertNull = error => assert_true(error === null, "No error expected!");
-const assertValidationError = error => assert_true(error instanceof GPUValidationError, "Expected validation error!");
-const assertMemoryError = error => assert_true(error instanceof GPUOutOfMemoryError, "Expected out-of-memory error!");
-
-const devicePromiseTest = (device, name) => {
-    promise_test(async () => {
-        if (device === undefined)
-            return Promise.resolve();
-        return tests[name](device);
-    }, name);
-};
-</script>
-</body>
\ No newline at end of file
diff --git a/Source/WebCore/CMakeLists.txt b/Source/WebCore/CMakeLists.txt
index 84d84ac..3ce5166 100644
--- a/Source/WebCore/CMakeLists.txt
+++ b/Source/WebCore/CMakeLists.txt
@@ -480,11 +480,9 @@
     Modules/webgpu/GPUColorWriteBits.idl
     Modules/webgpu/GPUCompareFunction.idl
     Modules/webgpu/GPUDepthStencilStateDescriptor.idl
-    Modules/webgpu/GPUErrorFilter.idl
     Modules/webgpu/GPUExtent3D.idl
     Modules/webgpu/GPULoadOp.idl
     Modules/webgpu/GPUOrigin3D.idl
-    Modules/webgpu/GPUOutOfMemoryError.idl
     Modules/webgpu/GPURequestAdapterOptions.idl
     Modules/webgpu/GPUSamplerDescriptor.idl
     Modules/webgpu/GPUShaderStageBit.idl
@@ -492,7 +490,6 @@
     Modules/webgpu/GPUTextureDescriptor.idl
     Modules/webgpu/GPUTextureFormat.idl
     Modules/webgpu/GPUTextureUsage.idl
-    Modules/webgpu/GPUValidationError.idl
     Modules/webgpu/GPUVertexAttributeDescriptor.idl
     Modules/webgpu/GPUVertexBufferDescriptor.idl
     Modules/webgpu/GPUVertexInputDescriptor.idl
@@ -511,7 +508,6 @@
     Modules/webgpu/WebGPUComputePipeline.idl
     Modules/webgpu/WebGPUComputePipelineDescriptor.idl
     Modules/webgpu/WebGPUDevice.idl
-    Modules/webgpu/WebGPUDeviceErrorScopes.idl
     Modules/webgpu/WebGPUPipelineDescriptorBase.idl
     Modules/webgpu/WebGPUPipelineLayout.idl
     Modules/webgpu/WebGPUPipelineLayoutDescriptor.idl
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 4086c19..4ad89de 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2019-07-15  Ryan Haddad  <ryanhaddad@apple.com>
+
+        Unreviewed, rolling out r247397, r247378, r247366.
+
+        Broke watchOS builds.
+
+        Reverted changesets:
+
+        "[WebGPU] Implement GPUError and error scopes"
+        https://bugs.webkit.org/show_bug.cgi?id=199655
+        https://trac.webkit.org/changeset/247366/webkit
+
+        "[WebGPU] Move error scopes out of GPUDevice for more portable error generation"
+        https://bugs.webkit.org/show_bug.cgi?id=199740
+        https://trac.webkit.org/changeset/247397/webkit
+
 2019-07-15  Rob Buis  <rbuis@igalia.com>
 
         MathML WPT test for RadicalDegreeBottomRaisePercent fails
diff --git a/Source/WebCore/DerivedSources-input.xcfilelist b/Source/WebCore/DerivedSources-input.xcfilelist
index a681376..c69d3dd 100644
--- a/Source/WebCore/DerivedSources-input.xcfilelist
+++ b/Source/WebCore/DerivedSources-input.xcfilelist
@@ -330,12 +330,10 @@
 $(PROJECT_DIR)/Modules/webgpu/GPUColorWriteBits.idl
 $(PROJECT_DIR)/Modules/webgpu/GPUCompareFunction.idl
 $(PROJECT_DIR)/Modules/webgpu/GPUDepthStencilStateDescriptor.idl
-$(PROJECT_DIR)/Modules/webgpu/GPUErrorFilter.idl
 $(PROJECT_DIR)/Modules/webgpu/GPUExtent3D.idl
 $(PROJECT_DIR)/Modules/webgpu/GPUInputStateDescriptor.idl
 $(PROJECT_DIR)/Modules/webgpu/GPULoadOp.idl
 $(PROJECT_DIR)/Modules/webgpu/GPUOrigin3D.idl
-$(PROJECT_DIR)/Modules/webgpu/GPUOutOfMemoryError.idl
 $(PROJECT_DIR)/Modules/webgpu/GPURequestAdapterOptions.idl
 $(PROJECT_DIR)/Modules/webgpu/GPUSamplerDescriptor.idl
 $(PROJECT_DIR)/Modules/webgpu/GPUShaderStageBit.idl
@@ -343,7 +341,6 @@
 $(PROJECT_DIR)/Modules/webgpu/GPUTextureDescriptor.idl
 $(PROJECT_DIR)/Modules/webgpu/GPUTextureFormat.idl
 $(PROJECT_DIR)/Modules/webgpu/GPUTextureUsage.idl
-$(PROJECT_DIR)/Modules/webgpu/GPUValidationError.idl
 $(PROJECT_DIR)/Modules/webgpu/GPUVertexAttributeDescriptor.idl
 $(PROJECT_DIR)/Modules/webgpu/GPUVertexBufferDescriptor.idl
 $(PROJECT_DIR)/Modules/webgpu/GPUVertexInputDescriptor.idl
@@ -364,7 +361,6 @@
 $(PROJECT_DIR)/Modules/webgpu/WebGPUComputePipeline.idl
 $(PROJECT_DIR)/Modules/webgpu/WebGPUComputePipelineDescriptor.idl
 $(PROJECT_DIR)/Modules/webgpu/WebGPUDevice.idl
-$(PROJECT_DIR)/Modules/webgpu/WebGPUDeviceErrorScopes.idl
 $(PROJECT_DIR)/Modules/webgpu/WebGPUPipelineDescriptorBase.idl
 $(PROJECT_DIR)/Modules/webgpu/WebGPUPipelineLayout.idl
 $(PROJECT_DIR)/Modules/webgpu/WebGPUPipelineLayoutDescriptor.idl
diff --git a/Source/WebCore/DerivedSources-output.xcfilelist b/Source/WebCore/DerivedSources-output.xcfilelist
index 4a26d29..37c3c8b 100644
--- a/Source/WebCore/DerivedSources-output.xcfilelist
+++ b/Source/WebCore/DerivedSources-output.xcfilelist
@@ -609,8 +609,6 @@
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUCompareFunction.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUDepthStencilStateDescriptor.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUDepthStencilStateDescriptor.h
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUErrorFilter.cpp
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUErrorFilter.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUExtent3D.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUExtent3D.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUInputStateDescriptor.cpp
@@ -619,8 +617,6 @@
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPULoadOp.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUOrigin3D.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUOrigin3D.h
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUOutOfMemoryError.cpp
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUOutOfMemoryError.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPURequestAdapterOptions.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPURequestAdapterOptions.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUSamplerDescriptor.cpp
@@ -635,8 +631,6 @@
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUTextureFormat.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUTextureUsage.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUTextureUsage.h
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUValidationError.cpp
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUValidationError.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUVertexAttributeDescriptor.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUVertexAttributeDescriptor.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSGPUVertexBufferDescriptor.cpp
@@ -1949,8 +1943,6 @@
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebGPUComputePipelineDescriptor.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebGPUDevice.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebGPUDevice.h
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebGPUDeviceErrorScopes.cpp
-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebGPUDeviceErrorScopes.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebGPUPipelineDescriptorBase.cpp
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebGPUPipelineDescriptorBase.h
 $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSWebGPUPipelineLayout.cpp
diff --git a/Source/WebCore/DerivedSources.make b/Source/WebCore/DerivedSources.make
index c617716..7eeb427 100644
--- a/Source/WebCore/DerivedSources.make
+++ b/Source/WebCore/DerivedSources.make
@@ -386,11 +386,9 @@
     $(WebCore)/Modules/webgpu/GPUBufferUsage.idl \
     $(WebCore)/Modules/webgpu/GPUCompareFunction.idl \
     $(WebCore)/Modules/webgpu/GPUDepthStencilStateDescriptor.idl \
-    $(WebCore)/Modules/webgpu/GPUErrorFilter.idl \
     $(WebCore)/Modules/webgpu/GPUExtent3D.idl \
     $(WebCore)/Modules/webgpu/GPULoadOp.idl \
     $(WebCore)/Modules/webgpu/GPUOrigin3D.idl \
-    $(WebCore)/Modules/webgpu/GPUOutOfMemoryError.idl \
     $(WebCore)/Modules/webgpu/GPURequestAdapterOptions.idl \
     $(WebCore)/Modules/webgpu/GPUSamplerDescriptor.idl \
     $(WebCore)/Modules/webgpu/GPUShaderStageBit.idl \
@@ -398,7 +396,6 @@
     $(WebCore)/Modules/webgpu/GPUTextureDescriptor.idl \
     $(WebCore)/Modules/webgpu/GPUTextureFormat.idl \
     $(WebCore)/Modules/webgpu/GPUTextureUsage.idl \
-    $(WebCore)/Modules/webgpu/GPUValidationError.idl \
     $(WebCore)/Modules/webgpu/GPUVertexAttributeDescriptor.idl \
     $(WebCore)/Modules/webgpu/GPUVertexBufferDescriptor.idl \
 	$(WebCore)/Modules/webgpu/GPUVertexInputDescriptor.idl \
@@ -417,7 +414,6 @@
     $(WebCore)/Modules/webgpu/WebGPUComputePipeline.idl \
     $(WebCore)/Modules/webgpu/WebGPUComputePipelineDescriptor.idl \
     $(WebCore)/Modules/webgpu/WebGPUDevice.idl \
-	$(WebCore)/Modules/webgpu/WebGPUDeviceErrorScopes.idl \
     $(WebCore)/Modules/webgpu/WebGPUQueue.idl \
     $(WebCore)/Modules/webgpu/WebGPUPipelineDescriptorBase.idl \
     $(WebCore)/Modules/webgpu/WebGPUPipelineLayout.idl \
diff --git a/Source/WebCore/Modules/webgpu/GPUErrorFilter.idl b/Source/WebCore/Modules/webgpu/GPUErrorFilter.idl
deleted file mode 100644
index 1d6acbb..0000000
--- a/Source/WebCore/Modules/webgpu/GPUErrorFilter.idl
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2019 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.
- */
-// https://gpuweb.github.io/gpuweb
-
-[
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] enum GPUErrorFilter {
-    "none",
-    "out-of-memory",
-    "validation"
-};
diff --git a/Source/WebCore/Modules/webgpu/GPUOutOfMemoryError.idl b/Source/WebCore/Modules/webgpu/GPUOutOfMemoryError.idl
deleted file mode 100644
index d4d3d00..0000000
--- a/Source/WebCore/Modules/webgpu/GPUOutOfMemoryError.idl
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2019 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.
- */
-// https://gpuweb.github.io/gpuweb
-
-[
-    Conditional=WEBGPU,
-    Constructor(),
-    EnabledAtRuntime=WebGPU,
-    ImplementationLacksVTable
-] interface GPUOutOfMemoryError {};
diff --git a/Source/WebCore/Modules/webgpu/GPUValidationError.idl b/Source/WebCore/Modules/webgpu/GPUValidationError.idl
deleted file mode 100644
index 5e13c18..0000000
--- a/Source/WebCore/Modules/webgpu/GPUValidationError.idl
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2019 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.
- */
-// https://gpuweb.github.io/gpuweb
-
-[
-    Conditional=WEBGPU,
-    Constructor(DOMString message),
-    EnabledAtRuntime=WebGPU,
-    ImplementationLacksVTable
-] interface GPUValidationError {
-    readonly attribute DOMString message;
-};
diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.cpp b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.cpp
index 7386b10..c02db89 100644
--- a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.cpp
+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.cpp
@@ -26,14 +26,9 @@
 #include "config.h"
 #include "WHLSLCheckTextureReferences.h"
 
-#if ENABLE(WEBGPU)
-
-#include "WHLSLArrayReferenceType.h"
-#include "WHLSLArrayType.h"
 #include "WHLSLInferTypes.h"
-#include "WHLSLNativeTypeDeclaration.h"
-#include "WHLSLPointerType.h"
-#include "WHLSLVisitor.h"
+
+#if ENABLE(WEBGPU)
 
 namespace WebCore {
 
diff --git a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp
index ba497b3..6af88fe 100644
--- a/Source/WebCore/Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp
+++ b/Source/WebCore/Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp
@@ -30,7 +30,6 @@
 
 #include "WHLSLCallExpression.h"
 #include "WHLSLFunctionDefinition.h"
-#include "WHLSLProgram.h"
 #include "WHLSLVisitor.h"
 #include <wtf/HashSet.h>
 
diff --git a/Source/WebCore/Modules/webgpu/WebGPUDevice.cpp b/Source/WebCore/Modules/webgpu/WebGPUDevice.cpp
index d394276..f059ad8 100644
--- a/Source/WebCore/Modules/webgpu/WebGPUDevice.cpp
+++ b/Source/WebCore/Modules/webgpu/WebGPUDevice.cpp
@@ -28,7 +28,6 @@
 
 #if ENABLE(WEBGPU)
 
-#include "Exception.h"
 #include "GPUBindGroup.h"
 #include "GPUBindGroupBinding.h"
 #include "GPUBindGroupDescriptor.h"
@@ -43,8 +42,6 @@
 #include "GPUShaderModuleDescriptor.h"
 #include "GPUTextureDescriptor.h"
 #include "JSDOMConvertBufferSource.h"
-#include "JSGPUOutOfMemoryError.h"
-#include "JSGPUValidationError.h"
 #include "JSWebGPUBuffer.h"
 #include "Logging.h"
 #include "WebGPUBindGroup.h"
@@ -66,8 +63,6 @@
 #include "WebGPUShaderModuleDescriptor.h"
 #include "WebGPUSwapChain.h"
 #include "WebGPUTexture.h"
-#include <wtf/Optional.h>
-#include <wtf/text/WTFString.h>
 
 namespace WebCore {
 
@@ -81,13 +76,12 @@
 WebGPUDevice::WebGPUDevice(Ref<const WebGPUAdapter>&& adapter, Ref<GPUDevice>&& device)
     : m_adapter(WTFMove(adapter))
     , m_device(WTFMove(device))
-    , m_errorScopes(GPUErrorScopes::create())
 {
 }
 
 Ref<WebGPUBuffer> WebGPUDevice::createBuffer(const GPUBufferDescriptor& descriptor) const
 {
-    auto buffer = m_device->tryCreateBuffer(descriptor, GPUBufferMappedOption::NotMapped, m_errorScopes.copyRef());
+    auto buffer = m_device->tryCreateBuffer(descriptor);
     return WebGPUBuffer::create(WTFMove(buffer));
 }
 
@@ -95,7 +89,7 @@
 {
     JSC::JSValue wrappedArrayBuffer = JSC::jsNull();
 
-    auto buffer = m_device->tryCreateBuffer(descriptor, GPUBufferMappedOption::IsMapped, m_errorScopes.copyRef());
+    auto buffer = m_device->tryCreateBuffer(descriptor, true);
     if (buffer) {
         auto arrayBuffer = buffer->mapOnCreation();
         wrappedArrayBuffer = toJS(&state, JSC::jsCast<JSDOMGlobalObject*>(state.lexicalGlobalObject()), arrayBuffer);
@@ -186,16 +180,6 @@
     return makeRef(*m_queue.get());
 }
 
-void WebGPUDevice::popErrorScope(ErrorPromise&& promise)
-{
-    String failMessage;
-    Optional<GPUError> error = m_errorScopes->popErrorScope(failMessage);
-    if (failMessage.isEmpty())
-        promise.resolve(error);
-    else
-        promise.reject(Exception { OperationError, "GPUDevice::popErrorScope(): " + failMessage });
-}
-
 } // namespace WebCore
 
 #endif // ENABLE(WEBGPU)
diff --git a/Source/WebCore/Modules/webgpu/WebGPUDevice.h b/Source/WebCore/Modules/webgpu/WebGPUDevice.h
index f4e43f2..21d371a 100644
--- a/Source/WebCore/Modules/webgpu/WebGPUDevice.h
+++ b/Source/WebCore/Modules/webgpu/WebGPUDevice.h
@@ -28,8 +28,6 @@
 #if ENABLE(WEBGPU)
 
 #include "GPUDevice.h"
-#include "GPUErrorScopes.h"
-#include "JSDOMPromiseDeferred.h"
 #include "WebGPUAdapter.h"
 #include "WebGPUQueue.h"
 #include "WebGPUSwapChainDescriptor.h"
@@ -45,8 +43,6 @@
 
 namespace WebCore {
 
-class GPUOutOfMemoryError;
-class GPUValidationError;
 class ScriptExecutionContext;
 class WebGPUBindGroup;
 class WebGPUBindGroupLayout;
@@ -70,11 +66,6 @@
 struct WebGPURenderPipelineDescriptor;
 struct WebGPUShaderModuleDescriptor;
 
-enum class GPUErrorFilter;
-
-using ErrorIDLUnion = IDLUnion<IDLInterface<GPUOutOfMemoryError>, IDLInterface<GPUValidationError>>;
-using ErrorPromise = DOMPromiseDeferred<IDLNullable<ErrorIDLUnion>>;
-
 class WebGPUDevice : public RefCounted<WebGPUDevice> {
 public:
     static RefPtr<WebGPUDevice> tryCreate(Ref<const WebGPUAdapter>&&);
@@ -100,17 +91,12 @@
 
     Ref<WebGPUQueue> getQueue() const;
 
-    void pushErrorScope(GPUErrorFilter filter) { m_errorScopes->pushErrorScope(filter); }
-    void popErrorScope(ErrorPromise&&);
-
 private:
     WebGPUDevice(Ref<const WebGPUAdapter>&&, Ref<GPUDevice>&&);
 
     Ref<const WebGPUAdapter> m_adapter;
     Ref<GPUDevice> m_device;
     mutable RefPtr<WebGPUQueue> m_queue;
-
-    Ref<GPUErrorScopes> m_errorScopes;
 };
 
 } // namespace WebCore
diff --git a/Source/WebCore/Modules/webgpu/WebGPUDeviceErrorScopes.cpp b/Source/WebCore/Modules/webgpu/WebGPUDeviceErrorScopes.cpp
deleted file mode 100644
index 7931100d..0000000
--- a/Source/WebCore/Modules/webgpu/WebGPUDeviceErrorScopes.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2019 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.
- */
-
-#include "config.h"
-#include "WebGPUDeviceErrorScopes.h"
-
-#if ENABLE(WEBGPU)
-
-#include "GPUErrorFilter.h"
-
-namespace WebCore {
-
-void WebGPUDeviceErrorScopes::pushErrorScope(WebGPUDevice& device, GPUErrorFilter filter)
-{
-    device.pushErrorScope(filter);
-}
-
-void WebGPUDeviceErrorScopes::popErrorScope(WebGPUDevice& device, ErrorPromise&& promise)
-{
-    device.popErrorScope(WTFMove(promise));
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(WEBGPU)
diff --git a/Source/WebCore/Modules/webgpu/WebGPUDeviceErrorScopes.h b/Source/WebCore/Modules/webgpu/WebGPUDeviceErrorScopes.h
deleted file mode 100644
index f20f07a..0000000
--- a/Source/WebCore/Modules/webgpu/WebGPUDeviceErrorScopes.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2019 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
-
-#if ENABLE(WEBGPU)
-
-#include "WebGPUDevice.h"
-
-namespace WebCore {
-
-enum class GPUErrorFilter;
-
-class WebGPUDeviceErrorScopes {
-public:
-    static void pushErrorScope(WebGPUDevice&, GPUErrorFilter);
-    static void popErrorScope(WebGPUDevice&, ErrorPromise&&);
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(WEBGPU)
diff --git a/Source/WebCore/Modules/webgpu/WebGPUDeviceErrorScopes.idl b/Source/WebCore/Modules/webgpu/WebGPUDeviceErrorScopes.idl
deleted file mode 100644
index ec78527..0000000
--- a/Source/WebCore/Modules/webgpu/WebGPUDeviceErrorScopes.idl
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2019 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.
- */
-// https://gpuweb.github.io/gpuweb
-
-typedef (GPUOutOfMemoryError or GPUValidationError) GPUError;
-
-[
-    Conditional=WEBGPU,
-    EnabledAtRuntime=WebGPU
-] partial interface WebGPUDevice {
-    void pushErrorScope(GPUErrorFilter filter);
-    Promise<GPUError?> popErrorScope();
-};
diff --git a/Source/WebCore/Sources.txt b/Source/WebCore/Sources.txt
index 68fe54c..d80f02e 100644
--- a/Source/WebCore/Sources.txt
+++ b/Source/WebCore/Sources.txt
@@ -367,7 +367,6 @@
 Modules/webgpu/WebGPUComputePipeline.cpp
 Modules/webgpu/WebGPUComputePipelineDescriptor.cpp
 Modules/webgpu/WebGPUDevice.cpp
-Modules/webgpu/WebGPUDeviceErrorScopes.cpp
 Modules/webgpu/WebGPUQueue.cpp
 Modules/webgpu/WebGPUPipelineLayout.cpp
 Modules/webgpu/WebGPUPipelineLayoutDescriptor.cpp
@@ -1828,9 +1827,6 @@
 platform/graphics/filters/SpotLightSource.cpp
 
 platform/graphics/gpu/GPUDevice.cpp
-platform/graphics/gpu/GPUError.cpp
-platform/graphics/gpu/GPUErrorScopes.cpp
-platform/graphics/gpu/GPUValidationError.cpp
 platform/graphics/gpu/GPUPipelineLayout.cpp
 platform/graphics/gpu/GPUProgrammablePassEncoder.cpp
 
@@ -2760,11 +2756,9 @@
 JSGPUBufferUsage.cpp
 JSGPUCompareFunction.cpp
 JSGPUDepthStencilStateDescriptor.cpp
-JSGPUErrorFilter.cpp
 JSGPUExtent3D.cpp
 JSGPULoadOp.cpp
 JSGPUOrigin3D.cpp
-JSGPUOutOfMemoryError.cpp
 JSGPURequestAdapterOptions.cpp
 JSGPUSamplerDescriptor.cpp
 JSGPUShaderStageBit.cpp
@@ -2772,7 +2766,6 @@
 JSGPUTextureDescriptor.cpp
 JSGPUTextureFormat.cpp
 JSGPUTextureUsage.cpp
-JSGPUValidationError.cpp
 JSGPUVertexAttributeDescriptor.cpp
 JSGPUVertexBufferDescriptor.cpp
 JSGPUVertexInputDescriptor.cpp
@@ -3325,7 +3318,6 @@
 JSWebGPUComputePipeline.cpp
 JSWebGPUComputePipelineDescriptor.cpp
 JSWebGPUDevice.cpp
-JSWebGPUDeviceErrorScopes.cpp
 JSWebGPUQueue.cpp
 JSWebGPUPipelineDescriptorBase.cpp
 JSWebGPUPipelineLayout.cpp
diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
index 2bc809a..9a8ef93 100644
--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -13954,8 +13954,6 @@
 		D03211CE21AC954E00763CF2 /* GPURenderPassEncoder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPURenderPassEncoder.h; sourceTree = "<group>"; };
 		D03211CF21AC954E00763CF2 /* GPUProgrammablePassEncoder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUProgrammablePassEncoder.h; sourceTree = "<group>"; };
 		D03211D021AC954F00763CF2 /* GPURenderPassDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPURenderPassDescriptor.h; sourceTree = "<group>"; };
-		D03586B122D7F2EA00DA0284 /* GPUErrorScopes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUErrorScopes.h; sourceTree = "<group>"; };
-		D03586B222D7F2EA00DA0284 /* GPUErrorScopes.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GPUErrorScopes.cpp; sourceTree = "<group>"; };
 		D036DD8D208FFC0C00F9F4B2 /* WebGLCompressedTextureASTC.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGLCompressedTextureASTC.idl; sourceTree = "<group>"; };
 		D03C849A21FFC6670002227F /* GPUDepthStencilStateDescriptor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUDepthStencilStateDescriptor.h; sourceTree = "<group>"; };
 		D03C849C21FFC7FC0002227F /* GPUCompareFunction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUCompareFunction.h; sourceTree = "<group>"; };
@@ -14020,20 +14018,6 @@
 		D093D225217951D400329217 /* GPUCanvasContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUCanvasContext.h; sourceTree = "<group>"; };
 		D093D227217951D400329217 /* GPUCanvasContext.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUCanvasContext.idl; sourceTree = "<group>"; };
 		D093D2292179541600329217 /* GPUCanvasContext.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GPUCanvasContext.cpp; sourceTree = "<group>"; };
-		D09AFAFF22D02E5300C4538C /* WebGPUDeviceErrorScopes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebGPUDeviceErrorScopes.h; sourceTree = "<group>"; };
-		D09AFB0122D02E5300C4538C /* WebGPUDeviceErrorScopes.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebGPUDeviceErrorScopes.cpp; sourceTree = "<group>"; };
-		D09AFB0222D0471900C4538C /* GPUErrorFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GPUErrorFilter.h; sourceTree = "<group>"; };
-		D09AFB0322D40CC500C4538C /* WebGPUDeviceErrorScopes.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPUDeviceErrorScopes.idl; sourceTree = "<group>"; };
-		D09AFB0622D417B300C4538C /* GPUErrorFilter.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUErrorFilter.idl; sourceTree = "<group>"; };
-		D09AFB0722D5391B00C4538C /* GPUError.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUError.h; sourceTree = "<group>"; };
-		D09AFB0822D5542800C4538C /* GPUError.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GPUError.cpp; sourceTree = "<group>"; };
-		D09AFB0C22D55E9000C4538C /* GPUValidationError.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUValidationError.idl; sourceTree = "<group>"; };
-		D09AFB0D22D55F3B00C4538C /* GPUValidationError.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUValidationError.h; sourceTree = "<group>"; };
-		D09AFB0E22D55FF500C4538C /* GPUValidationError.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GPUValidationError.cpp; sourceTree = "<group>"; };
-		D09AFB1722D6694E00C4538C /* GPUOutOfMemoryError.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = GPUOutOfMemoryError.idl; sourceTree = "<group>"; };
-		D09AFB1922D6698A00C4538C /* GPUOutOfMemoryError.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUOutOfMemoryError.h; sourceTree = "<group>"; };
-		D09AFB2D22D6C01400C4538C /* GPUError.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GPUError.cpp; sourceTree = "<group>"; };
-		D09AFB3722D7D5C600C4538C /* GPUObjectBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUObjectBase.h; sourceTree = "<group>"; };
 		D0A20D542092A0A600E0C259 /* WebGLCompressedTextureASTC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGLCompressedTextureASTC.h; sourceTree = "<group>"; };
 		D0A20D562092A0A600E0C259 /* WebGLCompressedTextureASTC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebGLCompressedTextureASTC.cpp; sourceTree = "<group>"; };
 		D0A3A7301405A39800FB8ED3 /* ResourceLoaderOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceLoaderOptions.h; sourceTree = "<group>"; };
@@ -18336,17 +18320,9 @@
 				D03C849A21FFC6670002227F /* GPUDepthStencilStateDescriptor.h */,
 				312FF8BF21A4C2F100EB199D /* GPUDevice.cpp */,
 				312FF8BE21A4C2F100EB199D /* GPUDevice.h */,
-				D09AFB0822D5542800C4538C /* GPUError.cpp */,
-				D09AFB2D22D6C01400C4538C /* GPUError.cpp */,
-				D09AFB0722D5391B00C4538C /* GPUError.h */,
-				D09AFB0222D0471900C4538C /* GPUErrorFilter.h */,
-				D03586B222D7F2EA00DA0284 /* GPUErrorScopes.cpp */,
-				D03586B122D7F2EA00DA0284 /* GPUErrorScopes.h */,
 				D026F47D220A2AC600AC5F49 /* GPUExtent3D.h */,
 				D0F7559F2203BA1400118058 /* GPULimits.h */,
 				D08AA02F220D0BD50058C502 /* GPULoadOp.h */,
-				D09AFB3722D7D5C600C4538C /* GPUObjectBase.h */,
-				D09AFB1922D6698A00C4538C /* GPUOutOfMemoryError.h */,
 				312FF8C421A4C2F400EB199D /* GPUPipelineDescriptorBase.h */,
 				D003288721C9A4E500622AA6 /* GPUPipelineLayout.cpp */,
 				D003288621C9A4E500622AA6 /* GPUPipelineLayout.h */,
@@ -18372,8 +18348,6 @@
 				312FF8C321A4C2F300EB199D /* GPUTextureFormat.h */,
 				D026F485220A477200AC5F49 /* GPUTextureUsage.h */,
 				D06EF552220BA26A0018724E /* GPUUtils.h */,
-				D09AFB0E22D55FF500C4538C /* GPUValidationError.cpp */,
-				D09AFB0D22D55F3B00C4538C /* GPUValidationError.h */,
 				D0D8649B21BA1C2D003C983C /* GPUVertexAttributeDescriptor.h */,
 				D0D8649C21BA1CE8003C983C /* GPUVertexBufferDescriptor.h */,
 				D0D8649921BA1B1F003C983C /* GPUVertexInputDescriptor.h */,
@@ -25963,12 +25937,10 @@
 				D0B56EAE224ECE200061049C /* GPUColorWriteBits.idl */,
 				D03C849E21FFCF000002227F /* GPUCompareFunction.idl */,
 				D03C84A221FFD7230002227F /* GPUDepthStencilStateDescriptor.idl */,
-				D09AFB0622D417B300C4538C /* GPUErrorFilter.idl */,
 				D026F480220A2B7000AC5F49 /* GPUExtent3D.idl */,
 				D08AA02D220D0B9C0058C502 /* GPULoadOp.idl */,
 				D0CCA94922299F97006979B6 /* GPUOrigin3D.h */,
 				D0CCA94A22299F97006979B6 /* GPUOrigin3D.idl */,
-				D09AFB1722D6694E00C4538C /* GPUOutOfMemoryError.idl */,
 				D02C26922181416D00D818E4 /* GPURequestAdapterOptions.idl */,
 				D0ADB26322309D7600A22935 /* GPUSamplerDescriptor.idl */,
 				D0DE8FB8222E09E200882550 /* GPUShaderStageBit.h */,
@@ -25977,7 +25949,6 @@
 				D026F48B220A5B0B00AC5F49 /* GPUTextureDescriptor.idl */,
 				D0EACFAE219E30FD000FA75C /* GPUTextureFormat.idl */,
 				D026F483220A472F00AC5F49 /* GPUTextureUsage.idl */,
-				D09AFB0C22D55E9000C4538C /* GPUValidationError.idl */,
 				D0D8649621BA18F4003C983C /* GPUVertexAttributeDescriptor.idl */,
 				D0D8649821BA19A7003C983C /* GPUVertexBufferDescriptor.idl */,
 				D0D8649421BA173D003C983C /* GPUVertexInputDescriptor.idl */,
@@ -26024,9 +25995,6 @@
 				D00F595321701D8C000D71DB /* WebGPUDevice.cpp */,
 				D00F595221701D8C000D71DB /* WebGPUDevice.h */,
 				D00F595421701D8C000D71DB /* WebGPUDevice.idl */,
-				D09AFB0122D02E5300C4538C /* WebGPUDeviceErrorScopes.cpp */,
-				D09AFAFF22D02E5300C4538C /* WebGPUDeviceErrorScopes.h */,
-				D09AFB0322D40CC500C4538C /* WebGPUDeviceErrorScopes.idl */,
 				D0C419F02183EB31009EC1DE /* WebGPUPipelineDescriptorBase.h */,
 				D0C419F12183EB31009EC1DE /* WebGPUPipelineDescriptorBase.idl */,
 				D05A99E521C9BF2C00032B75 /* WebGPUPipelineLayout.cpp */,
@@ -28432,7 +28400,6 @@
 				A5A7AA43132F0ECC00D3A3C2 /* AutocapitalizeTypes.h in Headers */,
 				7C1843FE1C8B7283002EB973 /* Autofill.h in Headers */,
 				7C1E97281A9F9834007BF0FB /* AutoFillButtonElement.h in Headers */,
-				5CCC270922D5483A00964FA0 /* AutofillElements.h in Headers */,
 				C9D467051E60C465008195FB /* AutoplayEvent.h in Headers */,
 				45830D4E1679B4F800ACF8C3 /* AutoscrollController.h in Headers */,
 				A8CFF04E0A154F09000A4234 /* AutoTableLayout.h in Headers */,
@@ -30077,6 +30044,7 @@
 				7C7761AA1F878AA500F869FD /* JSImageBitmapRenderingContextSettings.h in Headers */,
 				A77979290D6B9E64003851B9 /* JSImageData.h in Headers */,
 				7C193C011F5E11050088F3E6 /* JSImageSmoothingQuality.h in Headers */,
+				5CCC270922D5483A00964FA0 /* AutofillElements.h in Headers */,
 				A86629D309DA2B48009633A6 /* JSInputEvent.h in Headers */,
 				9175CE5E21E281ED00DF2C28 /* JSInspectorAuditAccessibilityObject.h in Headers */,
 				9175CE5C21E281ED00DF2C28 /* JSInspectorAuditDOMObject.h in Headers */,
diff --git a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h
index 46f53e1..f5b5322 100644
--- a/Source/WebCore/bindings/js/WebCoreBuiltinNames.h
+++ b/Source/WebCore/bindings/js/WebCoreBuiltinNames.h
@@ -94,7 +94,6 @@
     macro(GPUComputePassEncoder) \
     macro(GPUComputePipeline) \
     macro(GPUDevice) \
-    macro(GPUOutOfMemoryError) \
     macro(GPUPipelineLayout) \
     macro(GPUProgrammablePassEncoder) \
     macro(GPUQueue) \
@@ -107,7 +106,6 @@
     macro(GPUTexture) \
     macro(GPUTextureUsage) \
     macro(GPUTextureView) \
-    macro(GPUValidationError) \
     macro(HTMLAttachmentElement) \
     macro(HTMLAudioElement) \
     macro(HTMLDataListElement) \
diff --git a/Source/WebCore/platform/graphics/gpu/GPUBuffer.h b/Source/WebCore/platform/graphics/gpu/GPUBuffer.h
index 92baa21..42508bc 100644
--- a/Source/WebCore/platform/graphics/gpu/GPUBuffer.h
+++ b/Source/WebCore/platform/graphics/gpu/GPUBuffer.h
@@ -29,7 +29,6 @@
 
 #include "DeferrableTask.h"
 #include "GPUBufferUsage.h"
-#include "GPUObjectBase.h"
 #include <wtf/Function.h>
 #include <wtf/OptionSet.h>
 #include <wtf/Ref.h>
@@ -52,8 +51,6 @@
 
 struct GPUBufferDescriptor;
 
-enum class GPUBufferMappedOption;
-
 #if USE(METAL)
 using PlatformBuffer = MTLBuffer;
 #else
@@ -61,7 +58,7 @@
 #endif
 using PlatformBufferSmartPtr = RetainPtr<PlatformBuffer>;
 
-class GPUBuffer : public GPUObjectBase {
+class GPUBuffer : public RefCounted<GPUBuffer> {
 public:
     enum class State {
         Mapped,
@@ -71,7 +68,7 @@
 
     ~GPUBuffer();
 
-    static RefPtr<GPUBuffer> tryCreate(Ref<GPUDevice>&&, const GPUBufferDescriptor&, GPUBufferMappedOption, Ref<GPUErrorScopes>&&);
+    static RefPtr<GPUBuffer> tryCreate(Ref<GPUDevice>&&, const GPUBufferDescriptor&, bool isMappedOnCreation);
 
     PlatformBuffer *platformBuffer() const { return m_platformBuffer.get(); }
     size_t byteLength() const { return m_byteLength; }
@@ -110,8 +107,8 @@
         PendingMappingCallback(MappingCallback&&);
     };
 
-    GPUBuffer(PlatformBufferSmartPtr&&, Ref<GPUDevice>&&, size_t, OptionSet<GPUBufferUsage::Flags>, GPUBufferMappedOption, Ref<GPUErrorScopes>&&);
-    static bool validateBufferUsage(GPUDevice&, OptionSet<GPUBufferUsage::Flags>, GPUErrorScopes&);
+    GPUBuffer(PlatformBufferSmartPtr&&, Ref<GPUDevice>&&, size_t, OptionSet<GPUBufferUsage::Flags>, bool);
+    static bool validateBufferUsage(const GPUDevice&, OptionSet<GPUBufferUsage::Flags>);
 
     JSC::ArrayBuffer* stagingBufferForRead();
     JSC::ArrayBuffer* stagingBufferForWrite();
diff --git a/Source/WebCore/platform/graphics/gpu/GPUBufferDescriptor.h b/Source/WebCore/platform/graphics/gpu/GPUBufferDescriptor.h
index 32072d9..ff5c5ab 100644
--- a/Source/WebCore/platform/graphics/gpu/GPUBufferDescriptor.h
+++ b/Source/WebCore/platform/graphics/gpu/GPUBufferDescriptor.h
@@ -36,11 +36,6 @@
     GPUBufferUsageFlags usage;
 };
 
-enum class GPUBufferMappedOption {
-    IsMapped,
-    NotMapped
-};
-
 } // namespace WebCore
 
 #endif // ENABLE(WEBGPU)
diff --git a/Source/WebCore/platform/graphics/gpu/GPUDevice.cpp b/Source/WebCore/platform/graphics/gpu/GPUDevice.cpp
index a61af60..a649a60 100644
--- a/Source/WebCore/platform/graphics/gpu/GPUDevice.cpp
+++ b/Source/WebCore/platform/graphics/gpu/GPUDevice.cpp
@@ -35,7 +35,6 @@
 #include "GPUCommandBuffer.h"
 #include "GPUComputePipeline.h"
 #include "GPUComputePipelineDescriptor.h"
-#include "GPUErrorScopes.h"
 #include "GPUPipelineLayout.h"
 #include "GPUPipelineLayoutDescriptor.h"
 #include "GPURenderPipeline.h"
@@ -47,14 +46,13 @@
 #include "GPUSwapChainDescriptor.h"
 #include "GPUTexture.h"
 #include "GPUTextureDescriptor.h"
-#include <algorithm>
 #include <wtf/Optional.h>
 
 namespace WebCore {
 
-RefPtr<GPUBuffer> GPUDevice::tryCreateBuffer(const GPUBufferDescriptor& descriptor, GPUBufferMappedOption isMapped, Ref<GPUErrorScopes>&& errorScopes)
+RefPtr<GPUBuffer> GPUDevice::tryCreateBuffer(const GPUBufferDescriptor& descriptor, bool isMappedOnCreation)
 {
-    return GPUBuffer::tryCreate(makeRef(*this), descriptor, isMapped, WTFMove(errorScopes));
+    return GPUBuffer::tryCreate(makeRef(*this), descriptor, isMappedOnCreation);
 }
 
 RefPtr<GPUTexture> GPUDevice::tryCreateTexture(const GPUTextureDescriptor& descriptor) const
diff --git a/Source/WebCore/platform/graphics/gpu/GPUDevice.h b/Source/WebCore/platform/graphics/gpu/GPUDevice.h
index 3eba344..a713954 100644
--- a/Source/WebCore/platform/graphics/gpu/GPUDevice.h
+++ b/Source/WebCore/platform/graphics/gpu/GPUDevice.h
@@ -29,8 +29,6 @@
 
 #include "GPUQueue.h"
 #include "GPUSwapChain.h"
-#include <wtf/Function.h>
-#include <wtf/Optional.h>
 #include <wtf/RefCounted.h>
 #include <wtf/RetainPtr.h>
 #include <wtf/WeakPtr.h>
@@ -43,7 +41,6 @@
 class GPUBuffer;
 class GPUCommandBuffer;
 class GPUComputePipeline;
-class GPUErrorScopes;
 class GPUPipelineLayout;
 class GPURenderPipeline;
 class GPUSampler;
@@ -60,9 +57,7 @@
 struct GPUShaderModuleDescriptor;
 struct GPUSwapChainDescriptor;
 struct GPUTextureDescriptor;
-
-enum class GPUBufferMappedOption;
-
+    
 using PlatformDevice = MTLDevice;
 using PlatformDeviceSmartPtr = RetainPtr<MTLDevice>;
 
@@ -70,7 +65,7 @@
 public:
     static RefPtr<GPUDevice> tryCreate(const Optional<GPURequestAdapterOptions>&);
 
-    RefPtr<GPUBuffer> tryCreateBuffer(const GPUBufferDescriptor&, GPUBufferMappedOption, Ref<GPUErrorScopes>&&);
+    RefPtr<GPUBuffer> tryCreateBuffer(const GPUBufferDescriptor&, bool isMappedOnCreation = false);
     RefPtr<GPUTexture> tryCreateTexture(const GPUTextureDescriptor&) const;
     RefPtr<GPUSampler> tryCreateSampler(const GPUSamplerDescriptor&) const;
 
diff --git a/Source/WebCore/platform/graphics/gpu/GPUError.cpp b/Source/WebCore/platform/graphics/gpu/GPUError.cpp
deleted file mode 100644
index e864a3d..0000000
--- a/Source/WebCore/platform/graphics/gpu/GPUError.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2019 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.
- */
-
-#include "config.h"
-#include "GPUError.h"
-
-#if ENABLE(WEBGPU)
-
-#include "GPUErrorFilter.h"
-
-namespace WebCore {
-
-Optional<GPUError> createError(GPUErrorFilter filter, const String& message)
-{
-    switch (filter) {
-    case GPUErrorFilter::OutOfMemory:
-        return GPUError(RefPtr<GPUOutOfMemoryError>(GPUOutOfMemoryError::create()));
-    case GPUErrorFilter::Validation:
-        return GPUError(RefPtr<GPUValidationError>(GPUValidationError::create(message)));
-    default:
-        ASSERT_NOT_REACHED();
-        return WTF::nullopt;
-    }
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(WEBGPU)
diff --git a/Source/WebCore/platform/graphics/gpu/GPUError.h b/Source/WebCore/platform/graphics/gpu/GPUError.h
deleted file mode 100644
index e67c35a..0000000
--- a/Source/WebCore/platform/graphics/gpu/GPUError.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2019 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
-
-#if ENABLE(WEBGPU)
-
-#include "GPUOutOfMemoryError.h"
-#include "GPUValidationError.h"
-#include <wtf/Optional.h>
-#include <wtf/RefPtr.h>
-#include <wtf/Variant.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebCore {
-
-enum class GPUErrorFilter;
-
-using GPUError = Variant<RefPtr<GPUOutOfMemoryError>, RefPtr<GPUValidationError>>;
-
-Optional<GPUError> createError(GPUErrorFilter, const String&);
-
-} // namespace WebCore
-
-#endif
diff --git a/Source/WebCore/platform/graphics/gpu/GPUErrorFilter.h b/Source/WebCore/platform/graphics/gpu/GPUErrorFilter.h
deleted file mode 100644
index d569fef..0000000
--- a/Source/WebCore/platform/graphics/gpu/GPUErrorFilter.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2019 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
-
-#if ENABLE(WEBGPU)
-
-namespace WebCore {
-    
-enum class GPUErrorFilter {
-    None,
-    OutOfMemory,
-    Validation,
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(WEBGPU)
diff --git a/Source/WebCore/platform/graphics/gpu/GPUErrorScopes.cpp b/Source/WebCore/platform/graphics/gpu/GPUErrorScopes.cpp
deleted file mode 100644
index fa03d79..0000000
--- a/Source/WebCore/platform/graphics/gpu/GPUErrorScopes.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2019 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.
- */
-
-#include "config.h"
-#include "GPUErrorScopes.h"
-
-#if ENABLE(WEBGPU)
-
-namespace WebCore {
-
-void GPUErrorScopes::pushErrorScope(GPUErrorFilter filter)
-{
-    m_errorScopes.append(ErrorScope { filter, WTF::nullopt });
-}
-
-Optional<GPUError> GPUErrorScopes::popErrorScope(String& failMessage)
-{
-    if (m_errorScopes.isEmpty()) {
-        failMessage = "No error scope exists!";
-        return WTF::nullopt;
-    }
-
-    auto scope = m_errorScopes.takeLast();
-    return scope.filter == GPUErrorFilter::None ? WTF::nullopt : scope.error;
-}
-
-void GPUErrorScopes::generateError(const String& message, GPUErrorFilter filter)
-{
-    auto iterator = std::find_if(m_errorScopes.rbegin(), m_errorScopes.rend(), [filter](const ErrorScope& scope) {
-        return scope.filter == GPUErrorFilter::None || scope.filter == filter;
-    });
-
-    // FIXME: https://webkit.org/b/199676 Uncaptured errors need to be fired as GPUUncapturedErrorEvents.
-    if (iterator == m_errorScopes.rend())
-        return;
-
-    // If the scope has already captured an error, ignore this new one.
-    if (iterator->error)
-        return;
-
-    iterator->error = createError(filter, message);
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(WEBGPU)
diff --git a/Source/WebCore/platform/graphics/gpu/GPUErrorScopes.h b/Source/WebCore/platform/graphics/gpu/GPUErrorScopes.h
deleted file mode 100644
index e161f70..0000000
--- a/Source/WebCore/platform/graphics/gpu/GPUErrorScopes.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2019 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
-
-#if ENABLE(WEBGPU)
-
-#include "GPUError.h"
-#include "GPUErrorFilter.h"
-#include <wtf/Optional.h>
-#include <wtf/Ref.h>
-#include <wtf/RefCounted.h>
-#include <wtf/Vector.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebCore {
-
-class GPUErrorScopes : public RefCounted<GPUErrorScopes> {
-public:
-    static Ref<GPUErrorScopes> create() { return adoptRef(*new GPUErrorScopes); }
-
-    void pushErrorScope(GPUErrorFilter);
-    Optional<GPUError> popErrorScope(String& failMessage);
-    void generateError(const String&, GPUErrorFilter = GPUErrorFilter::Validation);
-
-private:
-    struct ErrorScope {
-        const GPUErrorFilter filter;
-        Optional<GPUError> error;
-    };
-
-    GPUErrorScopes() = default;
-
-    Vector<ErrorScope> m_errorScopes;
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(WEBGPU)
diff --git a/Source/WebCore/platform/graphics/gpu/GPUObjectBase.h b/Source/WebCore/platform/graphics/gpu/GPUObjectBase.h
deleted file mode 100644
index 6653bcf..0000000
--- a/Source/WebCore/platform/graphics/gpu/GPUObjectBase.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2019 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
-
-#if ENABLE(WEBGPU)
-
-#include "GPUErrorScopes.h"
-#include <wtf/RefCounted.h>
-
-namespace WebCore {
-
-class GPUObjectBase : public RefCounted<GPUObjectBase> {
-public:
-    void generateError(const String& message, GPUErrorFilter filter = GPUErrorFilter::Validation)
-    {
-        m_errorScopes->generateError(message, filter);
-    }
-
-protected:
-    GPUObjectBase(Ref<GPUErrorScopes>&& reporter)
-        : m_errorScopes(WTFMove(reporter)) { }
-
-private:
-    Ref<GPUErrorScopes> m_errorScopes;
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(WEBGPU)
diff --git a/Source/WebCore/platform/graphics/gpu/GPUOutOfMemoryError.h b/Source/WebCore/platform/graphics/gpu/GPUOutOfMemoryError.h
deleted file mode 100644
index 9f420e9..0000000
--- a/Source/WebCore/platform/graphics/gpu/GPUOutOfMemoryError.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2019 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
-
-#if ENABLE(WEBGPU)
-
-#include <wtf/Ref.h>
-#include <wtf/RefCounted.h>
-
-namespace WebCore {
-
-class GPUOutOfMemoryError : public RefCounted<GPUOutOfMemoryError> {
-public:
-    static Ref<GPUOutOfMemoryError> create() { return adoptRef(*new GPUOutOfMemoryError); }
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(WEBGPU)
diff --git a/Source/WebCore/platform/graphics/gpu/GPUValidationError.cpp b/Source/WebCore/platform/graphics/gpu/GPUValidationError.cpp
deleted file mode 100644
index 397e545..0000000
--- a/Source/WebCore/platform/graphics/gpu/GPUValidationError.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2019 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.
- */
-
-#include "config.h"
-#include "GPUValidationError.h"
-
-#if ENABLE(WEBGPU)
-
-namespace WebCore {
-
-Ref<GPUValidationError> GPUValidationError::create(const String& message)
-{
-    return adoptRef(*new GPUValidationError(message));
-}
-
-GPUValidationError::GPUValidationError(const String& message)
-    : m_message(message)
-{
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(WEBGPU)
diff --git a/Source/WebCore/platform/graphics/gpu/GPUValidationError.h b/Source/WebCore/platform/graphics/gpu/GPUValidationError.h
deleted file mode 100644
index 7225ac2..0000000
--- a/Source/WebCore/platform/graphics/gpu/GPUValidationError.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2019 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
-
-#if ENABLE(WEBGPU)
-
-#include <wtf/Ref.h>
-#include <wtf/RefCounted.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebCore {
-
-class GPUValidationError : public RefCounted<GPUValidationError> {
-public:
-    static Ref<GPUValidationError> create(const String& message);
-
-    String message() const { return m_message; }
-
-private:
-    explicit GPUValidationError(const String& message);
-
-    String m_message;
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(WEBGPU)
diff --git a/Source/WebCore/platform/graphics/gpu/cocoa/GPUBufferMetal.mm b/Source/WebCore/platform/graphics/gpu/cocoa/GPUBufferMetal.mm
index d26473b..59a07ff 100644
--- a/Source/WebCore/platform/graphics/gpu/cocoa/GPUBufferMetal.mm
+++ b/Source/WebCore/platform/graphics/gpu/cocoa/GPUBufferMetal.mm
@@ -42,7 +42,7 @@
 static constexpr auto readOnlyFlags = OptionSet<GPUBufferUsage::Flags> { GPUBufferUsage::Flags::Index, GPUBufferUsage::Flags::Vertex, GPUBufferUsage::Flags::Uniform, GPUBufferUsage::Flags::TransferSource };
 
 
-bool GPUBuffer::validateBufferUsage(GPUDevice& device, OptionSet<GPUBufferUsage::Flags> usage, GPUErrorScopes& errorScopes)
+bool GPUBuffer::validateBufferUsage(const GPUDevice& device, OptionSet<GPUBufferUsage::Flags> usage)
 {
     if (!device.platformDevice()) {
         LOG(WebGPU, "GPUBuffer::tryCreate(): Invalid GPUDevice!");
@@ -50,7 +50,7 @@
     }
 
     if (usage.containsAll({ GPUBufferUsage::Flags::MapWrite, GPUBufferUsage::Flags::MapRead })) {
-        errorScopes.generateError("GPUBuffer::tryCreate(): Buffer cannot have both MAP_READ and MAP_WRITE usage!");
+        LOG(WebGPU, "GPUBuffer::tryCreate(): Buffer cannot have both MAP_READ and MAP_WRITE usage!");
         return false;
     }
 
@@ -62,23 +62,23 @@
     return true;
 }
 
-RefPtr<GPUBuffer> GPUBuffer::tryCreate(Ref<GPUDevice>&& device, const GPUBufferDescriptor& descriptor, GPUBufferMappedOption isMapped, Ref<GPUErrorScopes>&& errorScopes)
+RefPtr<GPUBuffer> GPUBuffer::tryCreate(Ref<GPUDevice>&& device, const GPUBufferDescriptor& descriptor, bool isMappedOnCreation)
 {
     // MTLBuffer size (NSUInteger) is 32 bits on some platforms.
     NSUInteger size = 0;
     if (!WTF::convertSafely(descriptor.size, size)) {
-        errorScopes->generateError("", GPUErrorFilter::OutOfMemory);
+        LOG(WebGPU, "GPUBuffer::tryCreate(): Buffer size is too large!");
         return nullptr;
     }
 
     auto usage = OptionSet<GPUBufferUsage::Flags>::fromRaw(descriptor.usage);
-    if (!validateBufferUsage(device.get(), usage, errorScopes))
+    if (!validateBufferUsage(device.get(), usage))
         return nullptr;
 
 #if PLATFORM(MAC)
     // copyBufferToBuffer calls require 4-byte alignment. "Unmapping" a mapped-on-creation GPUBuffer
     // that is otherwise unmappable requires such a copy to upload data.
-    if (isMapped == GPUBufferMappedOption::IsMapped
+    if (isMappedOnCreation
         && !usage.containsAny({ GPUBufferUsage::Flags::MapWrite, GPUBufferUsage::Flags::MapRead })
         && descriptor.size % 4) {
         LOG(WebGPU, "GPUBuffer::tryCreate(): Data must be aligned to a multiple of 4 bytes!");
@@ -102,20 +102,19 @@
     END_BLOCK_OBJC_EXCEPTIONS;
 
     if (!mtlBuffer) {
-        errorScopes->generateError("", GPUErrorFilter::OutOfMemory);
+        LOG(WebGPU, "GPUBuffer::tryCreate(): Unable to create MTLBuffer!");
         return nullptr;
     }
 
-    return adoptRef(*new GPUBuffer(WTFMove(mtlBuffer), WTFMove(device), size, usage, isMapped, WTFMove(errorScopes)));
+    return adoptRef(*new GPUBuffer(WTFMove(mtlBuffer), WTFMove(device), size, usage, isMappedOnCreation));
 }
 
-GPUBuffer::GPUBuffer(RetainPtr<MTLBuffer>&& buffer, Ref<GPUDevice>&& device, size_t size, OptionSet<GPUBufferUsage::Flags> usage, GPUBufferMappedOption isMapped, Ref<GPUErrorScopes>&& errorScopes)
-    : GPUObjectBase(WTFMove(errorScopes))
-    , m_platformBuffer(WTFMove(buffer))
+GPUBuffer::GPUBuffer(RetainPtr<MTLBuffer>&& buffer, Ref<GPUDevice>&& device, size_t size, OptionSet<GPUBufferUsage::Flags> usage, bool isMapped)
+    : m_platformBuffer(WTFMove(buffer))
     , m_device(WTFMove(device))
     , m_byteLength(size)
     , m_usage(usage)
-    , m_isMappedFromCreation(isMapped == GPUBufferMappedOption::IsMapped)
+    , m_isMappedFromCreation(isMapped)
 {
 }
 
diff --git a/Source/WebCore/platform/graphics/gpu/cocoa/GPUQueueMetal.mm b/Source/WebCore/platform/graphics/gpu/cocoa/GPUQueueMetal.mm
index 174d864..a9ea3cb 100644
--- a/Source/WebCore/platform/graphics/gpu/cocoa/GPUQueueMetal.mm
+++ b/Source/WebCore/platform/graphics/gpu/cocoa/GPUQueueMetal.mm
@@ -96,7 +96,7 @@
         END_BLOCK_OBJC_EXCEPTIONS;
     }
 
-    if (m_presentTask.hasPendingTask() || !m_device || !m_device->swapChain())
+    if (m_presentTask.hasPendingTask() || !m_device->swapChain())
         return;
 
     // If a GPUSwapChain exists, ensure that a present is scheduled after all command buffers.