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 <[email protected]> Reviewed-By: Feng Yu <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
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

+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
@@ -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)