| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3239,7 +3239,7 @@ napi_status NAPI_CDECL napi_detach_arraybuffer(napi_env env, | |||
| 3239 | 3239 | RETURN_STATUS_IF_FALSE( | |
| 3240 | 3240 | env, it->IsDetachable(), napi_detachable_arraybuffer_expected); | |
| 3241 | 3241 | ||
| 3242 | - it->Detach(); | ||
| 3242 | + it->Detach(v8::Local<v8::Value>()).Check(); | ||
| 3243 | 3243 | ||
| 3244 | 3244 | return napi_clear_last_error(env); | |
| 3245 | 3245 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -107,7 +107,9 @@ void Blob::New(const FunctionCallbackInfo<Value>& args) { | |||
| 107 | 107 | CHECK_EQ(view->ByteOffset(), 0); | |
| 108 | 108 | std::shared_ptr<BackingStore> store = view->Buffer()->GetBackingStore(); | |
| 109 | 109 | size_t byte_length = view->ByteLength(); | |
| 110 | - view->Buffer()->Detach(); // The Blob will own the backing store now. | ||
| 110 | + view->Buffer() | ||
| 111 | + ->Detach(Local<Value>()) | ||
| 112 | + .Check(); // The Blob will own the backing store now. | ||
| 111 | 113 | entries.emplace_back(BlobEntry{std::move(store), byte_length, 0}); | |
| 112 | 114 | len += byte_length; | |
| 113 | 115 | } else { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -125,7 +125,7 @@ Local<ArrayBuffer> CallbackInfo::CreateTrackedArrayBuffer( | |||
| 125 | 125 | // V8 simply ignores the BackingStore deleter callback if data == nullptr, | |
| 126 | 126 | // but our API contract requires it being called. | |
| 127 | 127 | if (data == nullptr) { | |
| 128 | - ab->Detach(); | ||
| 128 | + ab->Detach(Local<Value>()).Check(); | ||
| 129 | 129 | self->OnBackingStoreFree(); // This calls `callback` asynchronously. | |
| 130 | 130 | } else { | |
| 131 | 131 | // Store the ArrayBuffer so that we can detach it later. | |
@@ -156,7 +156,7 @@ void CallbackInfo::CleanupHook(void* data) { | |||
| 156 | 156 | HandleScope handle_scope(self->env_->isolate()); | |
| 157 | 157 | Local<ArrayBuffer> ab = self->persistent_.Get(self->env_->isolate()); | |
| 158 | 158 | if (!ab.IsEmpty() && ab->IsDetachable()) { | |
| 159 | - ab->Detach(); | ||
| 159 | + ab->Detach(Local<Value>()).Check(); | ||
| 160 | 160 | self->persistent_.Reset(); | |
| 161 | 161 | } | |
| 162 | 162 | } | |
@@ -1256,7 +1256,7 @@ void DetachArrayBuffer(const FunctionCallbackInfo<Value>& args) { | |||
| 1256 | 1256 | Local<ArrayBuffer> buf = args[0].As<ArrayBuffer>(); | |
| 1257 | 1257 | if (buf->IsDetachable()) { | |
| 1258 | 1258 | std::shared_ptr<BackingStore> store = buf->GetBackingStore(); | |
| 1259 | - buf->Detach(); | ||
| 1259 | + buf->Detach(Local<Value>()).Check(); | ||
| 1260 | 1260 | args.GetReturnValue().Set(ArrayBuffer::New(env->isolate(), store)); | |
| 1261 | 1261 | } | |
| 1262 | 1262 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -516,7 +516,7 @@ Maybe<bool> Message::Serialize(Environment* env, | |||
| 516 | 516 | for (Local<ArrayBuffer> ab : array_buffers) { | |
| 517 | 517 | // If serialization succeeded, we render it inaccessible in this Isolate. | |
| 518 | 518 | std::shared_ptr<BackingStore> backing_store = ab->GetBackingStore(); | |
| 519 | - ab->Detach(); | ||
| 519 | + ab->Detach(Local<Value>()).Check(); | ||
| 520 | 520 | ||
| 521 | 521 | array_buffers_.emplace_back(std::move(backing_store)); | |
| 522 | 522 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments