diff --git a/cli/args/mod.rs b/cli/args/mod.rs index 203ceec50b..7d885295e0 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -1596,18 +1596,6 @@ impl CliOptions { } }); - // TODO(2.0): remove this code and enable these features in `99_main.js` by default. - let future_features = [ - deno_runtime::deno_ffi::UNSTABLE_FEATURE_NAME.to_string(), - deno_runtime::deno_fs::UNSTABLE_FEATURE_NAME.to_string(), - deno_runtime::deno_webgpu::UNSTABLE_FEATURE_NAME.to_string(), - ]; - future_features.iter().for_each(|future_feature| { - if !from_config_file.contains(future_feature) { - from_config_file.push(future_feature.to_string()); - } - }); - if !from_config_file.is_empty() { // collect unstable granular flags let mut all_valid_unstable_flags: Vec<&str> = diff --git a/cli/tsc/99_main_compiler.js b/cli/tsc/99_main_compiler.js index 03729b8928..42bf1055f2 100644 --- a/cli/tsc/99_main_compiler.js +++ b/cli/tsc/99_main_compiler.js @@ -36,17 +36,11 @@ delete Object.prototype.__proto__; "Kv", "KvListIterator", "KvU64", - "UnsafeCallback", - "UnsafePointer", - "UnsafePointerView", - "UnsafeFnPointer", "UnixConnectOptions", "UnixListenOptions", - "dlopen", "listen", "listenDatagram", "openKv", - "umask", ]); const unstableMsgSuggestion = "If not, try changing the 'lib' compiler option to include 'deno.unstable' " + diff --git a/ext/ffi/call.rs b/ext/ffi/call.rs index 9165972935..380fc03a13 100644 --- a/ext/ffi/call.rs +++ b/ext/ffi/call.rs @@ -1,7 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. use crate::callback::PtrSymbol; -use crate::check_unstable; use crate::dlfcn::DynamicLibraryResource; use crate::ir::*; use crate::symbol::NativeType; @@ -285,7 +284,6 @@ pub fn op_ffi_call_ptr_nonblocking( where FP: FfiPermissions + 'static, { - check_unstable(&state.borrow(), "Deno.UnsafeFnPointer#call"); { let mut state = state.borrow_mut(); let permissions = state.borrow_mut::(); @@ -383,7 +381,6 @@ pub fn op_ffi_call_ptr( where FP: FfiPermissions + 'static, { - check_unstable(&state.borrow(), "Deno.UnsafeFnPointer#call"); { let mut state = state.borrow_mut(); let permissions = state.borrow_mut::(); diff --git a/ext/ffi/callback.rs b/ext/ffi/callback.rs index 281208322b..7d0114131a 100644 --- a/ext/ffi/callback.rs +++ b/ext/ffi/callback.rs @@ -1,6 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -use crate::check_unstable; use crate::symbol::NativeType; use crate::FfiPermissions; use crate::ForeignFunction; @@ -557,7 +556,6 @@ pub fn op_ffi_unsafe_callback_create( where FP: FfiPermissions + 'static, { - check_unstable(state, "Deno.UnsafeCallback"); let permissions = state.borrow_mut::(); permissions.check_partial(None)?; diff --git a/ext/ffi/dlfcn.rs b/ext/ffi/dlfcn.rs index 261a62cd30..2bae5d2239 100644 --- a/ext/ffi/dlfcn.rs +++ b/ext/ffi/dlfcn.rs @@ -1,6 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -use crate::check_unstable; use crate::ir::out_buffer_as_ptr; use crate::symbol::NativeType; use crate::symbol::Symbol; @@ -124,7 +123,6 @@ where { let path = args.path; - check_unstable(state, "Deno.dlopen"); let permissions = state.borrow_mut::(); permissions.check_partial(Some(&PathBuf::from(&path)))?; diff --git a/ext/ffi/lib.rs b/ext/ffi/lib.rs index 26b06d98fb..59d241c5a2 100644 --- a/ext/ffi/lib.rs +++ b/ext/ffi/lib.rs @@ -1,7 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. use deno_core::error::AnyError; -use deno_core::OpState; use std::mem::size_of; use std::os::raw::c_char; @@ -41,14 +40,6 @@ const _: () = { pub const UNSTABLE_FEATURE_NAME: &str = "ffi"; -fn check_unstable(state: &OpState, api_name: &str) { - // TODO(bartlomieju): replace with `state.feature_checker.check_or_exit` - // once we phase out `check_or_exit_with_legacy_fallback` - state - .feature_checker - .check_or_exit_with_legacy_fallback(UNSTABLE_FEATURE_NAME, api_name) -} - pub trait FfiPermissions { fn check_partial(&mut self, path: Option<&Path>) -> Result<(), AnyError>; } diff --git a/ext/ffi/repr.rs b/ext/ffi/repr.rs index c3656f0fec..f565374755 100644 --- a/ext/ffi/repr.rs +++ b/ext/ffi/repr.rs @@ -1,6 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -use crate::check_unstable; use crate::FfiPermissions; use deno_core::error::range_error; use deno_core::error::type_error; @@ -21,7 +20,6 @@ pub fn op_ffi_ptr_create( where FP: FfiPermissions + 'static, { - check_unstable(state, "Deno.UnsafePointer#create"); let permissions = state.borrow_mut::(); permissions.check_partial(None)?; @@ -37,7 +35,6 @@ pub fn op_ffi_ptr_equals( where FP: FfiPermissions + 'static, { - check_unstable(state, "Deno.UnsafePointer#equals"); let permissions = state.borrow_mut::(); permissions.check_partial(None)?; @@ -52,7 +49,6 @@ pub fn op_ffi_ptr_of( where FP: FfiPermissions + 'static, { - check_unstable(state, "Deno.UnsafePointer#of"); let permissions = state.borrow_mut::(); permissions.check_partial(None)?; @@ -67,7 +63,6 @@ pub fn op_ffi_ptr_of_exact( where FP: FfiPermissions + 'static, { - check_unstable(state, "Deno.UnsafePointer#of"); let permissions = state.borrow_mut::(); permissions.check_partial(None)?; @@ -89,7 +84,6 @@ pub fn op_ffi_ptr_offset( where FP: FfiPermissions + 'static, { - check_unstable(state, "Deno.UnsafePointer#offset"); let permissions = state.borrow_mut::(); permissions.check_partial(None)?; @@ -120,7 +114,6 @@ pub fn op_ffi_ptr_value( where FP: FfiPermissions + 'static, { - check_unstable(state, "Deno.UnsafePointer#value"); let permissions = state.borrow_mut::(); permissions.check_partial(None)?; @@ -138,8 +131,6 @@ pub fn op_ffi_get_buf( where FP: FfiPermissions + 'static, { - check_unstable(state, "Deno.UnsafePointerView#getArrayBuffer"); - let permissions = state.borrow_mut::(); permissions.check_partial(None)?; @@ -172,8 +163,6 @@ pub fn op_ffi_buf_copy_into( where FP: FfiPermissions + 'static, { - check_unstable(state, "Deno.UnsafePointerView#copyInto"); - let permissions = state.borrow_mut::(); permissions.check_partial(None)?; @@ -205,8 +194,6 @@ pub fn op_ffi_cstr_read( where FP: FfiPermissions + 'static, { - check_unstable(state, "Deno.UnsafePointerView#getCString"); - let permissions = state.borrow_mut::(); permissions.check_partial(None)?; @@ -233,8 +220,6 @@ pub fn op_ffi_read_bool( where FP: FfiPermissions + 'static, { - check_unstable(state, "Deno.UnsafePointerView#getBool"); - let permissions = state.borrow_mut::(); permissions.check_partial(None)?; @@ -255,8 +240,6 @@ pub fn op_ffi_read_u8( where FP: FfiPermissions + 'static, { - check_unstable(state, "Deno.UnsafePointerView#getUint8"); - let permissions = state.borrow_mut::(); permissions.check_partial(None)?; @@ -279,8 +262,6 @@ pub fn op_ffi_read_i8( where FP: FfiPermissions + 'static, { - check_unstable(state, "Deno.UnsafePointerView#getInt8"); - let permissions = state.borrow_mut::(); permissions.check_partial(None)?; @@ -303,8 +284,6 @@ pub fn op_ffi_read_u16( where FP: FfiPermissions + 'static, { - check_unstable(state, "Deno.UnsafePointerView#getUint16"); - let permissions = state.borrow_mut::(); permissions.check_partial(None)?; @@ -327,8 +306,6 @@ pub fn op_ffi_read_i16( where FP: FfiPermissions + 'static, { - check_unstable(state, "Deno.UnsafePointerView#getInt16"); - let permissions = state.borrow_mut::(); permissions.check_partial(None)?; @@ -351,8 +328,6 @@ pub fn op_ffi_read_u32( where FP: FfiPermissions + 'static, { - check_unstable(state, "Deno.UnsafePointerView#getUint32"); - let permissions = state.borrow_mut::(); permissions.check_partial(None)?; @@ -373,8 +348,6 @@ pub fn op_ffi_read_i32( where FP: FfiPermissions + 'static, { - check_unstable(state, "Deno.UnsafePointerView#getInt32"); - let permissions = state.borrow_mut::(); permissions.check_partial(None)?; @@ -398,8 +371,6 @@ pub fn op_ffi_read_u64( where FP: FfiPermissions + 'static, { - check_unstable(state, "Deno.UnsafePointerView#getBigUint64"); - let permissions = state.borrow_mut::(); permissions.check_partial(None)?; @@ -426,8 +397,6 @@ pub fn op_ffi_read_i64( where FP: FfiPermissions + 'static, { - check_unstable(state, "Deno.UnsafePointerView#getBigInt64"); - let permissions = state.borrow_mut::(); permissions.check_partial(None)?; @@ -451,8 +420,6 @@ pub fn op_ffi_read_f32( where FP: FfiPermissions + 'static, { - check_unstable(state, "Deno.UnsafePointerView#getFloat32"); - let permissions = state.borrow_mut::(); permissions.check_partial(None)?; @@ -473,8 +440,6 @@ pub fn op_ffi_read_f64( where FP: FfiPermissions + 'static, { - check_unstable(state, "Deno.UnsafePointerView#getFloat64"); - let permissions = state.borrow_mut::(); permissions.check_partial(None)?; @@ -495,8 +460,6 @@ pub fn op_ffi_read_ptr( where FP: FfiPermissions + 'static, { - check_unstable(state, "Deno.UnsafePointerView#getPointer"); - let permissions = state.borrow_mut::(); permissions.check_partial(None)?; diff --git a/ext/fs/lib.rs b/ext/fs/lib.rs index f4815fd29d..a6f273323a 100644 --- a/ext/fs/lib.rs +++ b/ext/fs/lib.rs @@ -21,7 +21,6 @@ pub use crate::sync::MaybeSync; use crate::ops::*; use deno_core::error::AnyError; -use deno_core::OpState; use deno_io::fs::FsError; use std::borrow::Cow; use std::path::Path; @@ -167,15 +166,6 @@ impl FsPermissions for deno_permissions::PermissionsContainer { pub const UNSTABLE_FEATURE_NAME: &str = "fs"; -/// Helper for checking unstable features. Used for sync ops. -fn check_unstable(state: &OpState, api_name: &str) { - // TODO(bartlomieju): replace with `state.feature_checker.check_or_exit` - // once we phase out `check_or_exit_with_legacy_fallback` - state - .feature_checker - .check_or_exit_with_legacy_fallback(UNSTABLE_FEATURE_NAME, api_name); -} - deno_core::extension!(deno_fs, deps = [ deno_web ], parameters = [P: FsPermissions], diff --git a/ext/fs/ops.rs b/ext/fs/ops.rs index 8af2f00450..f25cd944de 100644 --- a/ext/fs/ops.rs +++ b/ext/fs/ops.rs @@ -26,7 +26,6 @@ use rand::thread_rng; use rand::Rng; use serde::Serialize; -use crate::check_unstable; use crate::interface::AccessCheckFn; use crate::interface::FileSystemRc; use crate::interface::FsDirEntry; @@ -121,7 +120,6 @@ pub fn op_fs_umask( ) -> Result where { - check_unstable(state, "Deno.umask"); state.borrow::().umask(mask).context("umask") } diff --git a/ext/webgpu/lib.rs b/ext/webgpu/lib.rs index df01c5ff97..df2ab323af 100644 --- a/ext/webgpu/lib.rs +++ b/ext/webgpu/lib.rs @@ -403,13 +403,6 @@ pub fn op_webgpu_request_adapter( ) -> Result { let mut state = state.borrow_mut(); - // TODO(bartlomieju): replace with `state.feature_checker.check_or_exit` - // once we phase out `check_or_exit_with_legacy_fallback` - state.feature_checker.check_or_exit_with_legacy_fallback( - UNSTABLE_FEATURE_NAME, - "navigator.gpu.requestAdapter", - ); - let backends = std::env::var("DENO_WEBGPU_BACKEND").map_or_else( |_| wgpu_types::Backends::all(), |s| wgpu_core::instance::parse_backends_from_comma_list(&s), diff --git a/runtime/js/90_deno_ns.js b/runtime/js/90_deno_ns.js index 51b00fa023..35378da4d3 100644 --- a/runtime/js/90_deno_ns.js +++ b/runtime/js/90_deno_ns.js @@ -126,6 +126,12 @@ const denoNs = { uid: os.uid, Command: process.Command, ChildProcess: process.ChildProcess, + dlopen: ffi.dlopen, + UnsafeCallback: ffi.UnsafeCallback, + UnsafePointer: ffi.UnsafePointer, + UnsafePointerView: ffi.UnsafePointerView, + UnsafeFnPointer: ffi.UnsafeFnPointer, + umask: fs.umask, httpClient: httpClient.httpClient, createHttpClient: httpClient.createHttpClient, }; @@ -154,17 +160,9 @@ denoNsUnstableById[unstableIds.cron] = { cron: cron.cron, }; -denoNsUnstableById[unstableIds.ffi] = { - dlopen: ffi.dlopen, - UnsafeCallback: ffi.UnsafeCallback, - UnsafePointer: ffi.UnsafePointer, - UnsafePointerView: ffi.UnsafePointerView, - UnsafeFnPointer: ffi.UnsafeFnPointer, -}; +denoNsUnstableById[unstableIds.ffi] = {}; -denoNsUnstableById[unstableIds.fs] = { - umask: fs.umask, -}; +denoNsUnstableById[unstableIds.fs] = {}; denoNsUnstableById[unstableIds.http] = { HttpClient: httpClient.HttpClient, diff --git a/runtime/js/98_global_scope_shared.js b/runtime/js/98_global_scope_shared.js index 41df35c609..7a27238996 100644 --- a/runtime/js/98_global_scope_shared.js +++ b/runtime/js/98_global_scope_shared.js @@ -145,6 +145,148 @@ const windowOrWorkerGlobalScope = { structuredClone: core.propWritable(messagePort.structuredClone), // Branding as a WebIDL object [webidl.brand]: core.propNonEnumerable(webidl.brand), + GPU: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPU, loadWebGPU), + GPUAdapter: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUAdapter, + loadWebGPU, + ), + GPUAdapterInfo: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUAdapterInfo, + loadWebGPU, + ), + GPUBuffer: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUBuffer, + loadWebGPU, + ), + GPUBufferUsage: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUBufferUsage, + loadWebGPU, + ), + GPUCanvasContext: core.propNonEnumerable(webgpuSurface.GPUCanvasContext), + GPUColorWrite: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUColorWrite, + loadWebGPU, + ), + GPUCommandBuffer: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUCommandBuffer, + loadWebGPU, + ), + GPUCommandEncoder: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUCommandEncoder, + loadWebGPU, + ), + GPUComputePassEncoder: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUComputePassEncoder, + loadWebGPU, + ), + GPUComputePipeline: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUComputePipeline, + loadWebGPU, + ), + GPUDevice: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUDevice, + loadWebGPU, + ), + GPUDeviceLostInfo: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUDeviceLostInfo, + loadWebGPU, + ), + GPUError: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUError, + loadWebGPU, + ), + GPUBindGroup: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUBindGroup, + loadWebGPU, + ), + GPUBindGroupLayout: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUBindGroupLayout, + loadWebGPU, + ), + GPUInternalError: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUInternalError, + loadWebGPU, + ), + GPUPipelineError: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUPipelineError, + loadWebGPU, + ), + GPUUncapturedErrorEvent: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUUncapturedErrorEvent, + loadWebGPU, + ), + GPUPipelineLayout: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUPipelineLayout, + loadWebGPU, + ), + GPUQueue: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUQueue, + loadWebGPU, + ), + GPUQuerySet: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUQuerySet, + loadWebGPU, + ), + GPUMapMode: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUMapMode, + loadWebGPU, + ), + GPUOutOfMemoryError: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUOutOfMemoryError, + loadWebGPU, + ), + GPURenderBundle: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPURenderBundle, + loadWebGPU, + ), + GPURenderBundleEncoder: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPURenderBundleEncoder, + loadWebGPU, + ), + GPURenderPassEncoder: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPURenderPassEncoder, + loadWebGPU, + ), + GPURenderPipeline: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPURenderPipeline, + loadWebGPU, + ), + GPUSampler: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUSampler, + loadWebGPU, + ), + GPUShaderModule: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUShaderModule, + loadWebGPU, + ), + GPUShaderStage: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUShaderStage, + loadWebGPU, + ), + GPUSupportedFeatures: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUSupportedFeatures, + loadWebGPU, + ), + GPUSupportedLimits: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUSupportedLimits, + loadWebGPU, + ), + GPUTexture: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUTexture, + loadWebGPU, + ), + GPUTextureView: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUTextureView, + loadWebGPU, + ), + GPUTextureUsage: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUTextureUsage, + loadWebGPU, + ), + GPUValidationError: core.propNonEnumerableLazyLoaded( + (webgpu) => webgpu.GPUValidationError, + loadWebGPU, + ), }; const unstableForWindowOrWorkerGlobalScope = { __proto__: null }; @@ -155,42 +297,7 @@ unstableForWindowOrWorkerGlobalScope[unstableIds.net] = { WebSocketStream: core.propNonEnumerable(webSocketStream.WebSocketStream), WebSocketError: core.propNonEnumerable(webSocketStream.WebSocketError), }; -// deno-fmt-ignore -unstableForWindowOrWorkerGlobalScope[unstableIds.webgpu] = { - GPU: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPU, loadWebGPU), - GPUAdapter: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUAdapter, loadWebGPU), - GPUAdapterInfo: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUAdapterInfo, loadWebGPU), - GPUSupportedLimits: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUSupportedLimits, loadWebGPU), - GPUSupportedFeatures: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUSupportedFeatures, loadWebGPU), - GPUDeviceLostInfo: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUDeviceLostInfo, loadWebGPU), - GPUDevice: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUDevice, loadWebGPU), - GPUQueue: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUQueue, loadWebGPU), - GPUBuffer: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUBuffer, loadWebGPU), - GPUBufferUsage: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUBufferUsage, loadWebGPU), - GPUMapMode: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUMapMode, loadWebGPU), - GPUTextureUsage: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUTextureUsage, loadWebGPU), - GPUTexture: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUTexture, loadWebGPU), - GPUTextureView: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUTextureView, loadWebGPU), - GPUSampler: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUSampler, loadWebGPU), - GPUBindGroupLayout: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUBindGroupLayout, loadWebGPU), - GPUPipelineLayout: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUPipelineLayout, loadWebGPU), - GPUBindGroup: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUBindGroup, loadWebGPU), - GPUShaderModule: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUShaderModule, loadWebGPU), - GPUShaderStage: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUShaderStage, loadWebGPU), - GPUComputePipeline: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUComputePipeline, loadWebGPU), - GPURenderPipeline: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPURenderPipeline, loadWebGPU), - GPUColorWrite: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUColorWrite, loadWebGPU), - GPUCommandEncoder: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUCommandEncoder, loadWebGPU), - GPURenderPassEncoder: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPURenderPassEncoder, loadWebGPU), - GPUComputePassEncoder: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUComputePassEncoder, loadWebGPU), - GPUCommandBuffer: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUCommandBuffer, loadWebGPU), - GPURenderBundleEncoder: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPURenderBundleEncoder, loadWebGPU), - GPURenderBundle: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPURenderBundle, loadWebGPU), - GPUQuerySet: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUQuerySet, loadWebGPU), - GPUError: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUError, loadWebGPU), - GPUValidationError: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUValidationError, loadWebGPU), - GPUOutOfMemoryError: core.propNonEnumerableLazyLoaded((webgpu) => webgpu.GPUOutOfMemoryError, loadWebGPU), - GPUCanvasContext: core.propNonEnumerable(webgpuSurface.GPUCanvasContext), -}; + +unstableForWindowOrWorkerGlobalScope[unstableIds.webgpu] = {}; export { unstableForWindowOrWorkerGlobalScope, windowOrWorkerGlobalScope };