Skip to content

Commit 7da38b1

Browse files
committed
fixup
1 parent 68bf482 commit 7da38b1

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

deps/v8/include/v8-array-buffer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,8 @@ class V8_EXPORT ArrayBufferView : public Object {
462462
* CopyContents, this method handles both source and destination, supports
463463
* byte offsets, and requires no HandleScope.
464464
*/
465-
static void FastCopy(const ArrayBufferView* source, size_t source_start,
466-
ArrayBufferView* target, size_t target_start,
465+
static void FastCopy(Local<ArrayBufferView> source, size_t source_start,
466+
Local<ArrayBufferView> target, size_t target_start,
467467
size_t count);
468468

469469
V8_INLINE static ArrayBufferView* Cast(Value* value) {

deps/v8/src/api/api.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9045,13 +9045,13 @@ size_t v8::ArrayBufferView::CopyContents(void* dest, size_t byte_length) {
90459045
}
90469046

90479047
// static
9048-
void v8::ArrayBufferView::FastCopy(const ArrayBufferView* source,
9048+
void v8::ArrayBufferView::FastCopy(Local<ArrayBufferView> source,
90499049
size_t source_start,
9050-
ArrayBufferView* target,
9050+
Local<ArrayBufferView> target,
90519051
size_t target_start, size_t count) {
90529052
i::DisallowGarbageCollection no_gc;
9053-
auto src = Utils::OpenDirectHandle(source);
9054-
auto dst = Utils::OpenDirectHandle(target);
9053+
auto src = Utils::OpenDirectHandle(*source);
9054+
auto dst = Utils::OpenDirectHandle(*target);
90559055

90569056
if (V8_UNLIKELY(src->IsDetachedOrOutOfBounds() ||
90579057
dst->IsDetachedOrOutOfBounds())) {

src/node_buffer.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -591,9 +591,9 @@ void SlowCopy(const FunctionCallbackInfo<Value>& args) {
591591
const uint32_t source_start = args[3].As<Uint32>()->Value();
592592
const uint32_t to_copy = args[4].As<Uint32>()->Value();
593593

594-
ArrayBufferView::FastCopy(ArrayBufferView::Cast(*args[0]),
594+
ArrayBufferView::FastCopy(args[0].As<ArrayBufferView>(),
595595
source_start,
596-
ArrayBufferView::Cast(*args[1]),
596+
args[1].As<ArrayBufferView>(),
597597
target_start,
598598
to_copy);
599599

@@ -610,9 +610,9 @@ uint32_t FastCopy(Local<Value> receiver,
610610
// NOLINTNEXTLINE(runtime/references)
611611
FastApiCallbackOptions& options) {
612612
TRACK_V8_FAST_API_CALL("buffer.copy");
613-
ArrayBufferView::FastCopy(ArrayBufferView::Cast(*source_obj),
613+
ArrayBufferView::FastCopy(source_obj.As<ArrayBufferView>(),
614614
source_start,
615-
ArrayBufferView::Cast(*target_obj),
615+
target_obj.As<ArrayBufferView>(),
616616
target_start,
617617
to_copy);
618618
return to_copy;

0 commit comments

Comments
 (0)