Fix WasmLoop code to use RootedWasmInstanceObject

RESOLVED FIXED in Firefox 50

Status

()

defect
--
critical
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: decoder, Assigned: decoder)

Tracking

(Blocks 1 bug, {sec-want})

Trunk
mozilla50
x86_64
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox50 fixed)

Details

(Whiteboard: [adv-main50-])

Attachments

(1 attachment)

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.
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 choller@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/de10fb9ec9e5
Fix WasmLoop code to use RootedWasmInstanceObject. r=bbouvier
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/de10fb9ec9e5
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
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.)
Whiteboard: [adv-main50-]
You need to log in before you can comment on or make changes to this bug.