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

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

Issue 2636173002: [wasm] Enforce memory and table limits during instantiation. (Closed)
Patch Set: [wasm] Enforce memory and table limits during instantiation. Created 3 years, 11 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/wasm/wasm-module.cc ('k') | src/wasm/wasm-objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-objects.h
diff --git a/src/wasm/wasm-objects.h b/src/wasm/wasm-objects.h
index 8c22ca3893de989147493e57f6b29a226bc76f59..23cebe082ee16f8820c13da88d67dafd74b022fe 100644
--- a/src/wasm/wasm-objects.h
+++ b/src/wasm/wasm-objects.h
@@ -9,6 +9,7 @@
#include "src/objects-inl.h"
#include "src/trap-handler/trap-handler.h"
#include "src/wasm/managed.h"
+#include "src/wasm/wasm-limits.h"
namespace v8 {
namespace internal {
@@ -60,10 +61,11 @@ class WasmTableObject : public JSObject {
FixedArray* dispatch_tables();
uint32_t current_length();
- uint32_t maximum_length();
+ bool has_maximum_length();
+ int64_t maximum_length(); // Returns < 0 if no maximum.
static Handle<WasmTableObject> New(Isolate* isolate, uint32_t initial,
- uint32_t maximum,
+ int64_t maximum,
Handle<FixedArray>* js_functions);
static void Grow(Isolate* isolate, Handle<WasmTableObject> table,
uint32_t count);
@@ -86,11 +88,12 @@ class WasmMemoryObject : public JSObject {
void AddInstance(Isolate* isolate, Handle<WasmInstanceObject> object);
void ResetInstancesLink(Isolate* isolate);
uint32_t current_pages();
- int32_t maximum_pages(); // returns < 0 if there is no maximum
+ bool has_maximum_pages();
+ int32_t maximum_pages(); // Returns < 0 if there is no maximum.
static Handle<WasmMemoryObject> New(Isolate* isolate,
Handle<JSArrayBuffer> buffer,
- int maximum);
+ int32_t maximum);
static bool Grow(Isolate* isolate, Handle<WasmMemoryObject> memory,
uint32_t count);
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | src/wasm/wasm-objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698