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

Unified Diff: test/mjsunit/wasm/instantiate-module-basic.js

Issue 2587913005: [wasm] Freeze exports object (Closed)
Patch Set: No IfDebug<T> type :( Created 4 years 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 | « test/mjsunit/wasm/add-getters.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/instantiate-module-basic.js
diff --git a/test/mjsunit/wasm/instantiate-module-basic.js b/test/mjsunit/wasm/instantiate-module-basic.js
index 493bf7acd8da81ba2d9217e88092c142048f6b3d..d3a70dcda85d24a3a617bddffc8ae4222147a66f 100644
--- a/test/mjsunit/wasm/instantiate-module-basic.js
+++ b/test/mjsunit/wasm/instantiate-module-basic.js
@@ -25,6 +25,10 @@ function CheckInstance(instance) {
assertFalse(instance === 0);
assertEquals("object", typeof instance);
+ // Check the exports object is frozen.
+ assertFalse(Object.isExtensible(instance.exports));
+ assertTrue(Object.isFrozen(instance.exports));
+
// Check the memory is an ArrayBuffer.
var mem = instance.exports.memory;
assertFalse(mem === undefined);
« no previous file with comments | « test/mjsunit/wasm/add-getters.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698