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

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

Issue 2396433008: [wasm] Add guard regions to end of WebAssembly.Memory buffers (Closed)
Patch Set: Cleanup 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 62f4285af4ddc2d60c5d32458ed8e44e86b6c7cc..9ae1cc2aa81b7fb7e81b80517ef1e99d4c2c06d5 100644
--- a/src/wasm/wasm-module.h
+++ b/src/wasm/wasm-module.h
@@ -36,6 +36,10 @@ const uint32_t kWasmVersion = 0x0c;
const uint8_t kWasmFunctionTypeForm = 0x40;
const uint8_t kWasmAnyFunctionTypeForm = 0x20;
+#if V8_HOST_ARCH_64_BIT
+const size_t kWasmMaxHeapOffset = static_cast<size_t>(8) << 30; // 8GB
+#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,
« src/objects-inl.h ('K') | « src/wasm/wasm-js.cc ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698