feat(js) Support exception on WebAssembly::validate.

This commit is contained in:
Ivan Enderlin
2018-07-04 15:51:55 +02:00
parent fe25a9a268
commit c450fbf237
2 changed files with 3 additions and 3 deletions

View File

@ -1148,8 +1148,8 @@ extern "C" {
/// form a valid wasm module (`true`) or not (`false`).
///
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/validate
#[wasm_bindgen(static_method_of = WebAssembly)]
pub fn validate(bufferSource: JsValue) -> bool;
#[wasm_bindgen(static_method_of = WebAssembly, catch)]
pub fn validate(bufferSource: JsValue) -> Result<bool, JsValue>;
}
// JsString