servo / rust-mozjs

DEPRECATED - moved to servo/mozjs instead.
Mozilla Public License 2.0
293 stars 122 forks source link

Updated pub/priv #234

Closed ghost closed 8 years ago

ghost commented 8 years ago

If you try to wrap the <js::jsapi::Handle<T>> class. You can't actually do this because the T type is platform specific, AND private.

The example use case can be seen here: https://github.com/valarauca/lib_js/blob/feda0234c91901a606fcbccdef6b386374955a21/src/lib.rs#L21-L28

Review on Reviewable

emilio commented 8 years ago

I think you can use jsapi::JSObject in that specific use case (or HandleObject directly).

Note that all public symbols from the platform-specific jsapi module are re-exported here: https://github.com/servo/rust-mozjs/blob/master/src/lib.rs#L41

ghost commented 8 years ago

Well that's my mistake sorry.

emilio commented 8 years ago

Heh, no problem, I had a similar mistake not so long ago... https://github.com/servo/rust-mozjs/pull/216 :P

Close this if you can please :-)

Ms2ger commented 8 years ago

This works fine.