Closed Bug 1280872 Opened 4 years ago Closed 4 years ago
Loop code to use Rooted Wasm Instance Object
58 bytes, text/x-review-board-request
Apparently the API for wasm::Eval changed to require RootedWasmInstanceObject for the export object. I'll attach a patch that fixes this issue and unbreaks fuzzing builds.
Review commit: https://reviewboard.mozilla.org/r/59678/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/59678/
Attachment #8763500 - Flags: review?(bbouvier)
Attachment #8763500 - Flags: review?(bbouvier) → review+
Comment on attachment 8763500 [details] Bug 1280872 - Fix WasmLoop code to use RootedWasmInstanceObject. https://reviewboard.mozilla.org/r/59678/#review56714 Thanks ::: js/src/shell/js.cpp:5225 (Diff revision 1) > Rooted<JSObject*> ret(cx, FileAsTypedArray(cx, filename.ptr())); > if (!ret) > return false; > > Rooted<TypedArrayObject*> typedArray(cx, &ret->as<TypedArrayObject>()); > - RootedObject exportObj(cx); > + RootedWasmInstanceObject exportObj(cx); Can you rename exportObj to instanceObj, please?
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/de10fb9ec9e5 Fix WasmLoop code to use RootedWasmInstanceObject. r=bbouvier
Sorry; I just noticed I had introduced this bug recently. While looking at this I was wondering: could we allow WasmLoop to call an exported function by giving WasmLoop an additional parameter which was a callback function that would be passed the exportObj (and then the callback function could invoke any exports)? Then it seems like we could have an outer loop that generates interesting imports/exports and an inner loop that tries those on different modules. (Just an idea.)
You need to log in before you can comment on or make changes to this bug.