diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/01_core.js | 2 | ||||
-rw-r--r-- | core/Cargo.toml | 2 | ||||
-rw-r--r-- | core/bindings.rs | 16 |
3 files changed, 4 insertions, 16 deletions
diff --git a/core/01_core.js b/core/01_core.js index ddd3ac82d..08f839c98 100644 --- a/core/01_core.js +++ b/core/01_core.js @@ -312,7 +312,7 @@ deserialize: (buffer, options) => ops.op_deserialize(buffer, options), getPromiseDetails: (promise) => ops.op_get_promise_details(promise), getProxyDetails: (proxy) => ops.op_get_proxy_details(proxy), - isProxy: (value) => ops.op_is_proxy.fast(value), + isProxy: (value) => ops.op_is_proxy(value), memoryUsage: () => ops.op_memory_usage(), setWasmStreamingCallback: (fn) => ops.op_set_wasm_streaming_callback(fn), abortWasmStreaming: ( diff --git a/core/Cargo.toml b/core/Cargo.toml index 32b9e5e59..4c9a23d17 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -33,7 +33,7 @@ serde_json = { version = "1.0.79", features = ["preserve_order"] } serde_v8 = { version = "0.62.0", path = "../serde_v8" } sourcemap = "6.1" url = { version = "2.3.1", features = ["serde", "expose_internals"] } -v8 = { version = "0.50.0", default-features = false } +v8 = { version = "0.51.0", default-features = false } [[example]] name = "http_bench_json_ops" diff --git a/core/bindings.rs b/core/bindings.rs index 3d7a7098a..52ecf7bac 100644 --- a/core/bindings.rs +++ b/core/bindings.rs @@ -140,33 +140,21 @@ fn initialize_ops( op_ctxs: &[OpCtx], snapshot_loaded: bool, ) { - let object_template = v8::ObjectTemplate::new(scope); - assert!(object_template.set_internal_field_count( - (crate::runtime::V8_WRAPPER_OBJECT_INDEX + 1) as usize - )); - for ctx in op_ctxs { let ctx_ptr = ctx as *const OpCtx as *const c_void; // If this is a fast op, we don't want it to be in the snapshot. // Only initialize once snapshot is loaded. if ctx.decl.fast_fn.is_some() && snapshot_loaded { - let method_obj = object_template.new_instance(scope).unwrap(); - method_obj.set_aligned_pointer_in_internal_field( - crate::runtime::V8_WRAPPER_OBJECT_INDEX, - ctx_ptr, - ); set_func_raw( scope, - method_obj, - "fast", + ops_obj, + ctx.decl.name, ctx.decl.v8_fn_ptr, ctx_ptr, &ctx.decl.fast_fn, snapshot_loaded, ); - let method_key = v8::String::new(scope, ctx.decl.name).unwrap(); - ops_obj.set(scope, method_key.into(), method_obj.into()); } else { set_func_raw( scope, |