Bring back compile_to_stencil_offthread - #500
Conversation
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com>
|
It would be great to have this working again, is the remaining work just on the servo side? |
|
IIRC new test does not work in debugmozjs, meaning that something is wrong and we need to fix this first. |
|
I've tried to rebase and test it, resulting in |
|
I remember MOZ_ASSERT(*stackLimitThreadId_ == GetTid());, that's the one I've been trying to debug. |
|
With debugmozjs it seems C++ ends up receiving corrupted data: Rust side: Inside |
|
Huh, TIL rust-lang/rust-bindgen#778. |
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
- Don't call `PrepareForInstantiate` with a null stencil - Provide FrontendContext to allow retrieving errors - Provide options used for compilation, `ConvertFrontendErrorsToRuntimeErrors` needs the same ones Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
|
My changes are at https://github.com/Gae24/mozjs/tree/offthread, do I push them here or should I open a new PR that supersede this one? |
|
You should be able to push them here. |
As discussed in #474 (comment), this brings it back. For each offthread compilation we create a new thread that does the compilation. In servo this can be replaced by custom thread pool.
WIP because of debugmozjs, error reporting and needs companion PR in servo.