Closed KiChjang closed 7 years ago
Doesn't compile
Uhh right, stupid me.
These implementations crash if handed the wrong type of value. Is that intentional?
I essentially copied the implementation from JSVal. Shall I instead check that it is an object first, and if not, return an Err(()) or a ConversionResult::Failure?
Let's take a step back. Why did you make this PR?
MessagePort contains a WebIDL method that looks like this:
void postMessage(any message, optional sequence<object> transfer = []);
And so CodegenRust.py is trying to convert a JS HandleValue to a JS object, which currently doesn't exist in rust-mozjs bindings.
Given that this is only needed because of codegen for a feature we don't support yet (transferrable objects), I propose we use optional any transfer
and close this PR.
r? @Ms2ger or @nox
This change is