diff options
| author | Keyhan Vakil <kvakil@sylph.kvakil.me> | 2022-08-02 23:45:45 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-03 06:45:45 +0000 |
| commit | 8c35a4e4e63d5c384b9ff5a4e9afdc903d242f72 (patch) | |
| tree | dfda48b58f93ad161e66a3f77f054b2ecae341ad /src/node_process_methods.cc | |
| parent | 4dedd81c1bd2ef1afb1183d515ca74b427349779 (diff) | |
| download | node-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.cc | 6 |
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; |
