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

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

Issue 2396433008: [wasm] Add guard regions to end of WebAssembly.Memory buffers (Closed)
Patch Set: Code review feedback 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
Index: src/wasm/wasm-module.h
diff --git a/src/wasm/wasm-module.h b/src/wasm/wasm-module.h
index 2376a5feba889b33edd3e41e3b67dd93dfb37e94..1b2708a1c3efc21e033d57bddfa54b2f1b618f8e 100644
--- a/src/wasm/wasm-module.h
+++ b/src/wasm/wasm-module.h
@@ -36,6 +36,10 @@ const uint32_t kWasmVersion = 0x0d;
const uint8_t kWasmFunctionTypeForm = 0x60;
const uint8_t kWasmAnyFunctionTypeForm = 0x70;
+#if V8_HOST_ARCH_64_BIT
titzer 2016/10/28 16:24:57 Any reason not to just define this on all architec
Eric Holk 2016/10/28 18:44:40 I was having a hard time finding the right incanta
+const size_t kWasmMaxHeapOffset = static_cast<size_t>(8) << 30; // 8GB
Mircea Trofin 2016/10/28 22:16:29 I wonder if there is a more self-explanatory calcu
Eric Holk 2016/10/29 00:04:30 Done
+#endif
+
enum WasmSectionCode {
kUnknownSectionCode = 0, // code for unknown sections
kTypeSectionCode = 1, // Function signature declarations
@@ -557,6 +561,8 @@ int32_t GetInstanceMemorySize(Isolate* isolate, Handle<JSObject> instance);
int32_t GrowInstanceMemory(Isolate* isolate, Handle<JSObject> instance,
uint32_t pages);
+Handle<JSArrayBuffer> NewArrayBuffer(Isolate* isolate, size_t size, bool guard);
+
namespace testing {
void ValidateInstancesChain(Isolate* isolate, Handle<JSObject> wasm_module,

Powered by Google App Engine
This is Rietveld 408576698