Skip to content

Commit cddf3ed

Browse files
kvakilruyadorno
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 a54e4d4 commit cddf3ed

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/module_wrap.cc

+2-2
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

+2-4
Original file line numberDiff line numberDiff line change
@@ -746,8 +746,7 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
746746

747747
ScriptCompiler::CachedData* cached_data = nullptr;
748748
if (!cached_data_buf.IsEmpty()) {
749-
uint8_t* data = static_cast<uint8_t*>(
750-
cached_data_buf->Buffer()->GetBackingStore()->Data());
749+
uint8_t* data = static_cast<uint8_t*>(cached_data_buf->Buffer()->Data());
751750
cached_data = new ScriptCompiler::CachedData(
752751
data + cached_data_buf->ByteOffset(), cached_data_buf->ByteLength());
753752
}
@@ -1068,8 +1067,7 @@ void ContextifyContext::CompileFunction(
10681067
// Read cache from cached data buffer
10691068
ScriptCompiler::CachedData* cached_data = nullptr;
10701069
if (!cached_data_buf.IsEmpty()) {
1071-
uint8_t* data = static_cast<uint8_t*>(
1072-
cached_data_buf->Buffer()->GetBackingStore()->Data());
1070+
uint8_t* data = static_cast<uint8_t*>(cached_data_buf->Buffer()->Data());
10731071
cached_data = new ScriptCompiler::CachedData(
10741072
data + cached_data_buf->ByteOffset(), cached_data_buf->ByteLength());
10751073
}

0 commit comments

Comments
 (0)