diff options
author | Michaël Zasso <targos@protonmail.com> | 2019-03-12 09:01:49 +0100 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2019-03-14 18:49:21 +0100 |
commit | 7b48713334469818661fe276cf571de9c7899f2d (patch) | |
tree | 4dbda49ac88db76ce09dc330a0cb587e68e139ba /deps/v8/src/runtime/runtime-typedarray.cc | |
parent | 8549ac09b256666cf5275224ec58fab9939ff32e (diff) | |
download | node-new-7b48713334469818661fe276cf571de9c7899f2d.tar.gz |
deps: update V8 to 7.3.492.25
PR-URL: https://github.com/nodejs/node/pull/25852
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Diffstat (limited to 'deps/v8/src/runtime/runtime-typedarray.cc')
-rw-r--r-- | deps/v8/src/runtime/runtime-typedarray.cc | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/deps/v8/src/runtime/runtime-typedarray.cc b/deps/v8/src/runtime/runtime-typedarray.cc index 8a9d6fe366..850a68e28f 100644 --- a/deps/v8/src/runtime/runtime-typedarray.cc +++ b/deps/v8/src/runtime/runtime-typedarray.cc @@ -3,10 +3,11 @@ // found in the LICENSE file. #include "src/arguments-inl.h" +#include "src/counters.h" #include "src/elements.h" #include "src/heap/factory.h" #include "src/heap/heap-inl.h" -#include "src/messages.h" +#include "src/message-template.h" #include "src/objects-inl.h" #include "src/objects/js-array-buffer-inl.h" #include "src/runtime/runtime-utils.h" @@ -15,7 +16,7 @@ namespace v8 { namespace internal { -RUNTIME_FUNCTION(Runtime_ArrayBufferNeuter) { +RUNTIME_FUNCTION(Runtime_ArrayBufferDetach) { HandleScope scope(isolate); DCHECK_EQ(1, args.length()); Handle<Object> argument = args.at(0); @@ -26,21 +27,21 @@ RUNTIME_FUNCTION(Runtime_ArrayBufferNeuter) { isolate, NewTypeError(MessageTemplate::kNotTypedArray)); } Handle<JSArrayBuffer> array_buffer = Handle<JSArrayBuffer>::cast(argument); - if (!array_buffer->is_neuterable()) { + if (!array_buffer->is_detachable()) { return ReadOnlyRoots(isolate).undefined_value(); } if (array_buffer->backing_store() == nullptr) { CHECK_EQ(0, array_buffer->byte_length()); return ReadOnlyRoots(isolate).undefined_value(); } - // Shared array buffers should never be neutered. + // Shared array buffers should never be detached. CHECK(!array_buffer->is_shared()); DCHECK(!array_buffer->is_external()); void* backing_store = array_buffer->backing_store(); size_t byte_length = array_buffer->byte_length(); array_buffer->set_is_external(true); isolate->heap()->UnregisterArrayBuffer(*array_buffer); - array_buffer->Neuter(); + array_buffer->Detach(); isolate->array_buffer_allocator()->Free(backing_store, byte_length); return ReadOnlyRoots(isolate).undefined_value(); } @@ -66,10 +67,10 @@ RUNTIME_FUNCTION(Runtime_TypedArrayGetLength) { return holder->length(); } -RUNTIME_FUNCTION(Runtime_ArrayBufferViewWasNeutered) { +RUNTIME_FUNCTION(Runtime_ArrayBufferViewWasDetached) { HandleScope scope(isolate); DCHECK_EQ(1, args.length()); - return isolate->heap()->ToBoolean(JSTypedArray::cast(args[0])->WasNeutered()); + return isolate->heap()->ToBoolean(JSTypedArray::cast(args[0])->WasDetached()); } RUNTIME_FUNCTION(Runtime_TypedArrayGetBuffer) { @@ -115,8 +116,8 @@ RUNTIME_FUNCTION(Runtime_TypedArraySortFast) { isolate, array, JSTypedArray::Validate(isolate, target_obj, method)); // This line can be removed when JSTypedArray::Validate throws - // if array.[[ViewedArrayBuffer]] is neutered(v8:4648) - if (V8_UNLIKELY(array->WasNeutered())) return *array; + // if array.[[ViewedArrayBuffer]] is detached(v8:4648) + if (V8_UNLIKELY(array->WasDetached())) return *array; size_t length = array->length_value(); if (length <= 1) return *array; @@ -155,7 +156,7 @@ RUNTIME_FUNCTION(Runtime_TypedArraySet) { Handle<Object> obj = args.at(1); Handle<Smi> offset = args.at<Smi>(2); - DCHECK(!target->WasNeutered()); // Checked in TypedArrayPrototypeSet. + DCHECK(!target->WasDetached()); // Checked in TypedArrayPrototypeSet. DCHECK(!obj->IsJSTypedArray()); // Should be handled by CSA. DCHECK_LE(0, offset->value()); |