Bug 1526694 [wpt PR 15276] - [wasm] update js-api test runner and expectations, a=testonly
authorSven Sauleau <ssauleau@igalia.com>
Tue, 05 Mar 2019 12:19:31 +0000
changeset 522212 64cc60d52a04d0c97162b18b4c3c744a11684e41
parent 522211 a5181637d09ecc371117bdd300632c192802c7a8
child 522213 0ce1a5521d6f2bb1a93331eedda0f3542dde4f15
push id10871
push usercbrindusan@mozilla.com
push dateMon, 18 Mar 2019 15:49:32 +0000
treeherdermozilla-beta@018abdd16060 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1526694, 15276, 926311, 1458099, 633121
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1526694 [wpt PR 15276] - [wasm] update js-api test runner and expectations, a=testonly Automatic update from web-platform-tests [wasm] update js-api test runner and expectations wasm-module-builder: - consistently adds the end opcode in function bodies (using addBody). - add missing setTableLength method table/get-set: - Avoid unrelated errors like: Cannot destructure property `fn` of 'undefined' or 'null'. Bug: 926311, v8:8319 Change-Id: Ia7db1ee5c3a9b1c1d6092cdce8885ddee4dd9b0e Reviewed-on: https://chromium-review.googlesource.com/c/1458099 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Sven Sauleau <ssauleau@igalia.com> Cr-Commit-Position: refs/heads/master@{#633121} -- wpt-commits: 22400f9755a49a50632a8f2067cb06bca74efff8 wpt-pr: 15276
testing/web-platform/tests/wasm/jsapi/table/get-set.any.js
testing/web-platform/tests/wasm/jsapi/wasm-module-builder.js
--- a/testing/web-platform/tests/wasm/jsapi/table/get-set.any.js
+++ b/testing/web-platform/tests/wasm/jsapi/table/get-set.any.js
@@ -1,14 +1,14 @@
 // META: global=jsshell
 // META: script=/wasm/jsapi/wasm-constants.js
 // META: script=/wasm/jsapi/wasm-module-builder.js
 // META: script=assertions.js
 
-let functions;
+let functions = {};
 setup(() => {
   const builder = new WasmModuleBuilder();
 
   builder
     .addFunction("fn", kSig_v_d)
     .addBody([])
     .exportFunc();
   builder
--- a/testing/web-platform/tests/wasm/jsapi/wasm-module-builder.js
+++ b/testing/web-platform/tests/wasm/jsapi/wasm-module-builder.js
@@ -93,16 +93,22 @@ class WasmFunctionBuilder {
   }
 
   exportFunc() {
     this.exportAs(this.name);
     return this;
   }
 
   addBody(body) {
+    const bodyCopy = body.slice();
+    bodyCopy.push(kExprEnd);
+    return this.addBodyWithEnd(bodyCopy);
+  }
+
+  addBodyWithEnd(body) {
     this.body = body;
     return this;
   }
 
   addLocals(locals) {
     this.locals = locals;
     return this;
   }
@@ -257,16 +263,21 @@ class WasmModuleBuilder {
     return this;
   }
 
   // TODO(ssauleau): legacy, remove this
   setFunctionTableLength(length) {
     return this.setTableBounds(length);
   }
 
+  // TODO(ssauleau): legacy, remove this
+  setTableLength(min, max = undefined) {
+    return this.setTableBounds(min, max);
+  }
+
   toArray(debug = false) {
     let binary = new Binary;
     let wasm = this;
 
     // Add header
     binary.emit_header();
 
     // Add type section