Skip to content

Commit bdc2ea4

Browse files
committed
src: update use of ExternalArrayType constants
Continuation of 4809c7a to update the use of v8::ExternalArrayType. Signed-off-by: Trevor Norris <[email protected]>
1 parent 573e6af commit bdc2ea4

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/node.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ using v8::TryCatch;
120120
using v8::Uint32;
121121
using v8::V8;
122122
using v8::Value;
123-
using v8::kExternalUnsignedIntArray;
123+
using v8::kExternalUint32Array;
124124

125125
// FIXME(bnoordhuis) Make these per-context?
126126
QUEUE handle_wrap_queue = { &handle_wrap_queue, &handle_wrap_queue };
@@ -928,7 +928,7 @@ void SetupAsyncListener(const FunctionCallbackInfo<Value>& args) {
928928
Environment::AsyncListener* async_listener = env->async_listener();
929929
async_listener_flag_obj->SetIndexedPropertiesToExternalArrayData(
930930
async_listener->fields(),
931-
kExternalUnsignedIntArray,
931+
kExternalUint32Array,
932932
async_listener->fields_count());
933933

934934
// Do a little housekeeping.
@@ -968,7 +968,7 @@ void SetupDomainUse(const FunctionCallbackInfo<Value>& args) {
968968
Environment::DomainFlag* domain_flag = env->domain_flag();
969969
domain_flag_obj->SetIndexedPropertiesToExternalArrayData(
970970
domain_flag->fields(),
971-
kExternalUnsignedIntArray,
971+
kExternalUint32Array,
972972
domain_flag->fields_count());
973973

974974
// Do a little housekeeping.
@@ -993,7 +993,7 @@ void SetupNextTick(const FunctionCallbackInfo<Value>& args) {
993993
Local<Object> tick_info_obj = args[0].As<Object>();
994994
tick_info_obj->SetIndexedPropertiesToExternalArrayData(
995995
env->tick_info()->fields(),
996-
kExternalUnsignedIntArray,
996+
kExternalUint32Array,
997997
env->tick_info()->fields_count());
998998

999999
env->set_tick_callback_function(args[1].As<Function>());

src/node_buffer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ bool HasInstance(Handle<Object> obj) {
8787
if (!obj->HasIndexedPropertiesInExternalArrayData())
8888
return false;
8989
v8::ExternalArrayType type = obj->GetIndexedPropertiesExternalArrayDataType();
90-
return type == v8::kExternalUnsignedByteArray;
90+
return type == v8::kExternalUint8Array;
9191
}
9292

9393

src/smalloc.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ using v8::RetainedObjectInfo;
5151
using v8::Uint32;
5252
using v8::Value;
5353
using v8::WeakCallbackData;
54-
using v8::kExternalUnsignedByteArray;
54+
using v8::kExternalUint8Array;
5555

5656

5757
class CallbackInfo {
@@ -304,7 +304,7 @@ void Alloc(const FunctionCallbackInfo<Value>& args) {
304304

305305
// it's faster to not pass the default argument then use Uint32Value
306306
if (args[2]->IsUndefined()) {
307-
array_type = kExternalUnsignedByteArray;
307+
array_type = kExternalUint8Array;
308308
} else {
309309
array_type = static_cast<ExternalArrayType>(args[2]->Uint32Value());
310310
size_t type_length = ExternalArraySize(array_type);
@@ -385,7 +385,7 @@ void AllocDispose(Environment* env, Handle<Object> obj) {
385385

386386
if (data != NULL) {
387387
obj->SetIndexedPropertiesToExternalArrayData(NULL,
388-
kExternalUnsignedByteArray,
388+
kExternalUint8Array,
389389
0);
390390
free(data);
391391
}

0 commit comments

Comments
 (0)