Chromium Code Reviews

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

Issue 2105013004: Explicitly Disallow heap allocation when wasm memory references are updated (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: src/wasm/wasm-module.cc
diff --git a/src/wasm/wasm-module.cc b/src/wasm/wasm-module.cc
index 620e59c6aa32595b31ce2bb77bb54194277142c4..9d379fd5207a80205ef50a809fb463e275abaa96 100644
--- a/src/wasm/wasm-module.cc
+++ b/src/wasm/wasm-module.cc
@@ -1268,10 +1268,11 @@ WasmDebugInfo* GetDebugInfo(JSObject* wasm) {
return *new_info;
}
-bool UpdateWasmModuleMemory(JSObject* object, Address old_start,
+bool UpdateWasmModuleMemory(Handle<JSObject> object, Address old_start,
Address new_start, uint32_t old_size,
uint32_t new_size) {
- if (!IsWasmObject(object)) {
+ DisallowHeapAllocation no_allocation;
+ if (!IsWasmObject(*object)) {
return false;
}

Powered by Google App Engine