Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Unified Diff: src/wasm/wasm-module.cc

Issue 2388303008: [wasm] Remove dangerous ByteArray::data accessor. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-module.cc
diff --git a/src/wasm/wasm-module.cc b/src/wasm/wasm-module.cc
index f4cf505f5a910761dda7ba846dcc2f4ee630be89..f32b2c2f78ed1aff3b1c31b9ee0c2cbd3d46a67b 100644
--- a/src/wasm/wasm-module.cc
+++ b/src/wasm/wasm-module.cc
@@ -514,8 +514,8 @@ Handle<Code> CompileImportWrapper(Isolate* isolate,
ByteArray::cast(func->GetInternalField(kInternalSignature)));
if (exported_param_count == param_count &&
exportedSig->length() == sig_data->length() &&
- memcmp(exportedSig->data(), sig_data->data(),
- exportedSig->length()) == 0) {
+ memcmp(exportedSig->GetDataStartAddress(),
+ sig_data->GetDataStartAddress(), exportedSig->length()) == 0) {
isMatch = true;
}
}
@@ -540,7 +540,7 @@ Handle<Code> CompileImportWrapper(Isolate* isolate,
Zone zone(isolate->allocator());
MachineRepresentation* reps =
zone.NewArray<MachineRepresentation>(sig_data_size);
- memcpy(reps, sig_data->data(),
+ memcpy(reps, sig_data->GetDataStartAddress(),
sizeof(MachineRepresentation) * sig_data_size);
FunctionSig sig(ret_count, param_count, reps);
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698