mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
node-api: remove unused mark_arraybuffer_as_untransferable
napi_create_external_arraybuffer creates the arraybuffer with node::Buffer, which already marks the buffer as untransferable. The napi_env__::mark_arraybuffer_as_untransferable is not used anymore. PR-URL: https://github.com/nodejs/node/pull/47557 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
e8ea83416a
commit
12f0fa386d
3 files changed
-13
No files matched your search
@@ -66,10 +66,6 @@ struct napi_env__ {
|
||||
}
|
||||
|
||||
virtual bool can_call_into_js() const { return true; }
|
||||
virtual v8::Maybe<bool> mark_arraybuffer_as_untransferable(
|
||||
v8::Local<v8::ArrayBuffer> ab) const {
|
||||
return v8::Just(true);
|
||||
}
|
||||
|
||||
static inline void HandleThrow(napi_env env, v8::Local<v8::Value> value) {
|
||||
if (env->terminatedOrTerminating()) {
|
||||
|
||||
@@ -35,13 +35,6 @@ bool node_napi_env__::can_call_into_js() const {
|
||||
return node_env()->can_call_into_js();
|
||||
}
|
||||
|
||||
v8::Maybe<bool> node_napi_env__::mark_arraybuffer_as_untransferable(
|
||||
v8::Local<v8::ArrayBuffer> ab) const {
|
||||
return ab->SetPrivate(context(),
|
||||
node_env()->untransferable_object_private_symbol(),
|
||||
v8::True(isolate));
|
||||
}
|
||||
|
||||
void node_napi_env__::CallFinalizer(napi_finalize cb, void* data, void* hint) {
|
||||
CallFinalizer<true>(cb, data, hint);
|
||||
}
|
||||
|
||||
@@ -13,8 +13,6 @@ struct node_napi_env__ : public napi_env__ {
|
||||
const std::string& module_filename);
|
||||
|
||||
bool can_call_into_js() const override;
|
||||
v8::Maybe<bool> mark_arraybuffer_as_untransferable(
|
||||
v8::Local<v8::ArrayBuffer> ab) const override;
|
||||
void CallFinalizer(napi_finalize cb, void* data, void* hint) override;
|
||||
template <bool enforceUncaughtExceptionPolicy>
|
||||
void CallFinalizer(napi_finalize cb, void* data, void* hint);
|
||||
|
||||
Reference in new issue
Block a user