Skip to content

Commit 34a92d1

Browse files
kvakildanielleadams
authored andcommitted
src: remove usages of GetBackingStore in modules
This removes all usages of GetBackingStore in modules. See the linked issue for an explanation. Refs: #32226 Refs: #43921 PR-URL: #44076 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Feng Yu <F3n67u@outlook.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
1 parent ddf9c16 commit 34a92d1

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/module_wrap.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ void ModuleWrap::New(const FunctionCallbackInfo<Value>& args) {
178178
if (!args[5]->IsUndefined()) {
179179
CHECK(args[5]->IsArrayBufferView());
180180
Local<ArrayBufferView> cached_data_buf = args[5].As<ArrayBufferView>();
181-
uint8_t* data = static_cast<uint8_t*>(
182-
cached_data_buf->Buffer()->GetBackingStore()->Data());
181+
uint8_t* data =
182+
static_cast<uint8_t*>(cached_data_buf->Buffer()->Data());
183183
cached_data =
184184
new ScriptCompiler::CachedData(data + cached_data_buf->ByteOffset(),
185185
cached_data_buf->ByteLength());

src/node_contextify.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -742,8 +742,7 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
742742

743743
ScriptCompiler::CachedData* cached_data = nullptr;
744744
if (!cached_data_buf.IsEmpty()) {
745-
uint8_t* data = static_cast<uint8_t*>(
746-
cached_data_buf->Buffer()->GetBackingStore()->Data());
745+
uint8_t* data = static_cast<uint8_t*>(cached_data_buf->Buffer()->Data());
747746
cached_data = new ScriptCompiler::CachedData(
748747
data + cached_data_buf->ByteOffset(), cached_data_buf->ByteLength());
749748
}
@@ -1064,8 +1063,7 @@ void ContextifyContext::CompileFunction(
10641063
// Read cache from cached data buffer
10651064
ScriptCompiler::CachedData* cached_data = nullptr;
10661065
if (!cached_data_buf.IsEmpty()) {
1067-
uint8_t* data = static_cast<uint8_t*>(
1068-
cached_data_buf->Buffer()->GetBackingStore()->Data());
1066+
uint8_t* data = static_cast<uint8_t*>(cached_data_buf->Buffer()->Data());
10691067
cached_data = new ScriptCompiler::CachedData(
10701068
data + cached_data_buf->ByteOffset(), cached_data_buf->ByteLength());
10711069
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy