summaryrefslogtreecommitdiff
path: root/src/node_file.cc
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2019-04-21 13:47:30 +0800
committerJoyee Cheung <joyeec9h3@gmail.com>2019-04-26 14:23:31 +0800
commit0ae46a7a862e26ccd611aed4d189a5e480639a4c (patch)
tree9b37a35a1e512b1c09c6e8f45ab3a45d3e67c43b /src/node_file.cc
parent5fe4d5966fd9c2b30b3da3ec7cb47132aa8cdfdd (diff)
downloadandroid-node-v8-0ae46a7a862e26ccd611aed4d189a5e480639a4c.tar.gz
android-node-v8-0ae46a7a862e26ccd611aed4d189a5e480639a4c.tar.bz2
android-node-v8-0ae46a7a862e26ccd611aed4d189a5e480639a4c.zip
src: use predefined AliasedBuffer types in the code base
Instead of allowing the callers to instantiate the template with any numeric types (such as aliasing a Uint8Array to double[]), predefine types that make sense and use those instead. PR-URL: https://github.com/nodejs/node/pull/27334 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_file.cc')
-rw-r--r--src/node_file.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/node_file.cc b/src/node_file.cc
index acdf01a5fe..85691a4ed1 100644
--- a/src/node_file.cc
+++ b/src/node_file.cc
@@ -756,9 +756,9 @@ inline FSReqBase* GetReqWrap(Environment* env, Local<Value> value,
return Unwrap<FSReqBase>(value.As<Object>());
} else if (value->StrictEquals(env->fs_use_promises_symbol())) {
if (use_bigint) {
- return FSReqPromise<uint64_t, BigUint64Array>::New(env, use_bigint);
+ return FSReqPromise<AliasedBigUint64Array>::New(env, use_bigint);
} else {
- return FSReqPromise<double, Float64Array>::New(env, use_bigint);
+ return FSReqPromise<AliasedFloat64Array>::New(env, use_bigint);
}
}
return nullptr;