summaryrefslogtreecommitdiff
path: root/src/node_process_methods.cc
diff options
context:
space:
mode:
authorKeyhan Vakil <kvakil@sylph.kvakil.me>2022-08-02 23:45:45 -0700
committerGitHub <noreply@github.com>2022-08-03 06:45:45 +0000
commit8c35a4e4e63d5c384b9ff5a4e9afdc903d242f72 (patch)
treedfda48b58f93ad161e66a3f77f054b2ecae341ad /src/node_process_methods.cc
parent4dedd81c1bd2ef1afb1183d515ca74b427349779 (diff)
downloadnode-new-8c35a4e4e63d5c384b9ff5a4e9afdc903d242f72.tar.gz
src: remove unowned usages of GetBackingStore
This removes all usages of GetBackingStore without any entries in the `CODEOWNERS` file. For the most part this is a pretty straightforward review; except `SPREAD_BUFFER_ARG` and the changes to `CopyArrayBuffer`. See the linked issue for an explanation. Refs: https://github.com/nodejs/node/issues/32226 Refs: https://github.com/nodejs/node/pull/43921 PR-URL: https://github.com/nodejs/node/pull/44080 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'src/node_process_methods.cc')
-rw-r--r--src/node_process_methods.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/node_process_methods.cc b/src/node_process_methods.cc
index 024212132f..9d4a5abb01 100644
--- a/src/node_process_methods.cc
+++ b/src/node_process_methods.cc
@@ -116,7 +116,7 @@ static void CPUUsage(const FunctionCallbackInfo<Value>& args) {
// Get the double array pointer from the Float64Array argument.
Local<ArrayBuffer> ab = get_fields_array_buffer(args, 0, 2);
- double* fields = static_cast<double*>(ab->GetBackingStore()->Data());
+ double* fields = static_cast<double*>(ab->Data());
// Set the Float64Array elements to be user / system values in microseconds.
fields[0] = MICROS_PER_SEC * rusage.ru_utime.tv_sec + rusage.ru_utime.tv_usec;
@@ -189,7 +189,7 @@ static void MemoryUsage(const FunctionCallbackInfo<Value>& args) {
// Get the double array pointer from the Float64Array argument.
Local<ArrayBuffer> ab = get_fields_array_buffer(args, 0, 5);
- double* fields = static_cast<double*>(ab->GetBackingStore()->Data());
+ double* fields = static_cast<double*>(ab->Data());
size_t rss;
int err = uv_resident_set_memory(&rss);
@@ -311,7 +311,7 @@ static void ResourceUsage(const FunctionCallbackInfo<Value>& args) {
return env->ThrowUVException(err, "uv_getrusage");
Local<ArrayBuffer> ab = get_fields_array_buffer(args, 0, 16);
- double* fields = static_cast<double*>(ab->GetBackingStore()->Data());
+ double* fields = static_cast<double*>(ab->Data());
fields[0] = MICROS_PER_SEC * rusage.ru_utime.tv_sec + rusage.ru_utime.tv_usec;
fields[1] = MICROS_PER_SEC * rusage.ru_stime.tv_sec + rusage.ru_stime.tv_usec;