Bug 1573409: Use Strings for Cranelift unsupported error messages; r=lth
authorBenjamin Bouvier <benj@benj.me>
Tue, 13 Aug 2019 11:56:15 +0000
changeset 487673 1f41441af67b1d21919a75ecb22405062570e9b7
parent 487672 9f71be9fa5d59bb35cff28821640484d2d5397e3
child 487674 55701d6c8bfaa34389a97aed748944d9338da5f2
push id36429
push userdvarga@mozilla.com
push dateTue, 13 Aug 2019 21:52:12 +0000
treeherdermozilla-central@eff8c62bdeb7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslth
bugs1573409
milestone70.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 1573409: Use Strings for Cranelift unsupported error messages; r=lth Differential Revision: https://phabricator.services.mozilla.com/D41722
js/src/wasm/cranelift/src/wasm2clif.rs
--- a/js/src/wasm/cranelift/src/wasm2clif.rs
+++ b/js/src/wasm/cranelift/src/wasm2clif.rs
@@ -433,17 +433,17 @@ impl<'a, 'b, 'c> FuncEnvironment for Tra
             ty: mem_ty,
             offset,
         })
     }
 
     fn make_heap(&mut self, func: &mut ir::Function, index: MemoryIndex) -> WasmResult<ir::Heap> {
         // Currently, Baldrdash doesn't support multiple memories.
         if index.index() != 0 {
-            return Err(WasmError::Unsupported("only one wasm memory supported"));
+            return Err(WasmError::Unsupported("only one wasm memory supported".to_string()));
         }
 
         // Get the address of the `TlsData::memoryBase` field.
         let base_addr = self.get_vmctx_gv(func);
         // Get the `TlsData::memoryBase` field. We assume this is never modified during execution
         // of the function.
         let base = func.create_global_value(ir::GlobalValueData::Load {
             base: base_addr,
@@ -553,17 +553,17 @@ impl<'a, 'b, 'c> FuncEnvironment for Tra
         sig_ref: ir::SigRef,
         callee: ir::Value,
         call_args: &[ir::Value],
     ) -> WasmResult<ir::Inst> {
         let wsig = self.env.signature(sig_index);
 
         // Currently, Baldrdash doesn't support multiple tables.
         if table_index.index() != 0 {
-            return Err(WasmError::Unsupported("only one wasm table supported"));
+            return Err(WasmError::Unsupported("only one wasm table supported".to_string()));
         }
         let wtable = self.get_table(pos.func, table_index);
 
         // Follows `MacroAssembler::wasmCallIndirect`:
 
         // 1. Materialize the signature ID.
         let sigid_value = match wsig.id_kind() {
             bindings::FuncTypeIdDescKind::None => None,