Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SpiderMonkey #130

Closed
wants to merge 124 commits into from
Closed

Update SpiderMonkey #130

wants to merge 124 commits into from

Conversation

@jdm
Copy link
Member

jdm commented Dec 18, 2017

Rebased from #119. Does not incorporate any newer changes from rust-mozjs.


This change is Reviewable

fitzgen and others added 30 commits May 10, 2017
This needs to make its way upstream
This needs to be ported over to the m-c patch queue.
This fixes safe_extern_statics warnings; see
<rust-lang/rust#36247>.
by changing it to use pointers instead.

Fixes #311
We should be able to create a default value for any Heap<*mut T> where *mut T implements
GCMethods<*mut T> and Copy, not just for Heap<*mut JSObject>.
Currently, to create a Heap<T>, one first has to create a Heap<T>::default, and then call
Heap<T>::set. This is a common pattern and therefore should be abstracted behind a method.
We expose several JSAPI functions that are used for tracing. By abstracting these functions behind
a trait we can overload them on the type to be traced.
This is what's required for catch_unwind; there's no need to be stricter.
The only remaining OOL calls are ToWindowIfWindowProxy and JS_WrapValue,
like in the equivalent Gecko function.
Rust-mozjs currently does not define any methods to create instances of HandleValueArray.
Consequently, consumers have to create these instances manually. This is unnecessary boilerplate,
and therefore should be abstracted behind a function.
This should make it harder to use Rooted in an unsound way
(when not using the rooted!() macro).
This ensures no unrooted values linger in the Rooted when it is no longer
rooted.

It should be impossible to access the value after that, but Handles currently
lack the lifetime to prevent that (#153).
@jdm
Copy link
Member Author

jdm commented Dec 18, 2017

The configure script now complains that GCC needs to be >=4.9.

jdm added 4 commits Dec 19, 2017
This reverts commit ae893a2.
@atouchet
Copy link

atouchet commented Aug 21, 2018

Can this be closed now?

@jdm jdm closed this Aug 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

You can’t perform that action at this time.