Skip to content

Commit

Permalink
src: remove use of deprecated IsNeuterable and Neuter APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
targos authored and ryzokuken committed Mar 15, 2019
1 parent 90b3de6 commit 3ba72b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node_messaging.cc
Expand Up @@ -302,7 +302,7 @@ Maybe<bool> Message::Serialize(Environment* env,
Local<ArrayBuffer> ab = entry.As<ArrayBuffer>();
// If we cannot render the ArrayBuffer unusable in this Isolate and
// take ownership of its memory, copying the buffer will have to do.
if (!ab->IsNeuterable() || ab->IsExternal() ||
if (!ab->IsDetachable() || ab->IsExternal() ||
!env->isolate_data()->uses_node_allocator()) {
continue;
}
Expand Down Expand Up @@ -368,7 +368,7 @@ Maybe<bool> Message::Serialize(Environment* env,
// (a.k.a. externalize) the underlying memory region and render
// it inaccessible in this Isolate.
ArrayBuffer::Contents contents = ab->Externalize();
ab->Neuter();
ab->Detach();

CHECK(env->isolate_data()->uses_node_allocator());
env->isolate_data()->node_allocator()->UnregisterPointer(
Expand Down

0 comments on commit 3ba72b5

Please sign in to comment.