servo / rust-mozjs

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

Add glue methods to get JSValue of a private reference #515

Closed CYBAI closed 4 years ago

CYBAI commented 4 years ago

While working on servo/servo#27026, we've noticed calling GetScriptPrivate will hit a CRASH consistently in Windows. jdm noticed that this is caused by "can't return JSValue by value on Windows"; thus, we need to expose these 2 glue methods so that we can handle the GetScriptPrivate and GetModulePrivate correctly.


This will help servo/servo#27026.

We might want to handle the ModulePrivate much more correctly in the future so it might be worth adding it here as well?

CYBAI commented 4 years ago

Btw, I just noticed the Microsoft documentation link in line 1072 is 404 now.

I tried to search it but looks like I can't find exactly same one.

But found 2 links might be related; ☝️ is any of them I should update to the comment?

jdm commented 4 years ago

Please file an issue about the broken doc link.

jdm commented 4 years ago

@bors-servo r+

bors-servo commented 4 years ago

:pushpin: Commit cc7aeda has been approved by jdm

bors-servo commented 4 years ago

:hourglass: Testing commit cc7aeda0e37f7757960c2a29c7d249398233b5da with merge 716dede8811ed525d9aab1e44cea392609b35d0a...

bors-servo commented 4 years ago

:sunny: Test successful - checks-travis, status-appveyor Approved by: jdm Pushing 716dede8811ed525d9aab1e44cea392609b35d0a to master...