Skip to content

Update SpiderMonkey#130

Closed
jdm wants to merge 124 commits intomasterfrom
smup
Closed

Update SpiderMonkey#130
jdm wants to merge 124 commits intomasterfrom
smup

Conversation

@jdm
Copy link
Member

@jdm 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 December 18, 2017 16:47
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.

@atouchet
Copy link
Contributor

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.