summaryrefslogtreecommitdiff
path: root/src/node_api.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/node_api.cc')
-rw-r--r--src/node_api.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/node_api.cc b/src/node_api.cc
index 20b591747d..0f7981cd56 100644
--- a/src/node_api.cc
+++ b/src/node_api.cc
@@ -24,6 +24,14 @@ struct node_napi_env__ : public napi_env__ {
bool can_call_into_js() const override {
return node_env()->can_call_into_js();
}
+
+ v8::Maybe<bool> mark_arraybuffer_as_untransferable(
+ v8::Local<v8::ArrayBuffer> ab) const {
+ return ab->SetPrivate(
+ context(),
+ node_env()->arraybuffer_untransferable_private_symbol(),
+ v8::True(isolate));
+ }
};
typedef node_napi_env__* node_napi_env;