Closed Bug 1280872 Opened 4 years ago Closed 4 years ago

Fix WasmLoop code to use RootedWasmInstanceObject

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: decoder, Assigned: decoder)

Details

(Keywords: sec-want, Whiteboard: [adv-main50-])

Attachments

(1 file)

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: 4 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.