Skip to content
This repository was archived by the owner on Nov 12, 2022. It is now read-only.

Regenerate bindings using the latest bindgen++ - #198

Merged
bors-servo merged 2 commits into
servo:masterfrom
michaelwu:update-bindings
Oct 8, 2015
Merged

bors-servo merged 2 commits into
servo:masterfrom
michaelwu:update-bindings

Conversation

@michaelwu

Copy link
Copy Markdown
Contributor

Need to test this a bit more, but it's structured roughly the way I want it and no manual edits of jsapi_*.rs are required.

Fixes #158

Review on Reviewable

@michaelwu

Copy link
Copy Markdown
Contributor Author

Tested and working on 64 bit OSX and 64 bit Linux. Had to fix an issue with the mangled names on OSX where an extra underscore was being prefixed to the mangled name.

@michaelwu

Copy link
Copy Markdown
Contributor Author

Tested and working on Gonk. Android is the only one left to check, I think.

@michaelwu

Copy link
Copy Markdown
Contributor Author

Adjusted the bindings generation a bit after @larsbergstrom found missing symbols on Android. Need to test once more, but I think this is ready for review. r? @jdm

@michaelwu

Copy link
Copy Markdown
Contributor Author

Works on Android.

@jdm

jdm commented Oct 8, 2015

Copy link
Copy Markdown
Member
<jdm> but yeah, I'd be inclined to rewrite all of the generated transmutes to be pointer casts instead
<jdm> let raw = &mut self._bindgen_data_1_ as *mut _ as *mut u8; raw.offset(0) as *mut _

Comment thread src/rust.rs Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use NullHandleValue.

@jdm

jdm commented Oct 8, 2015

Copy link
Copy Markdown
Member
* jdm is curious why FunctionClassPtr is a Class, while Int8ArrayClassPtr is a *const Class
 <mwu> jdm: looks like a bug. I think they should all be *const Class
<mwu> though.. this code is pretty clever, so I dunno
<mwu> probably a bug.

Comment thread src/rust.rs Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could just be unsafe { assert!(JS_Init()); } now.

@jdm

jdm commented Oct 8, 2015

Copy link
Copy Markdown
Member

Ok, I've pointed out all of the things in the generated output for linux32 that made me scratch my head, and the stuff in the non-generated files that could be improved, so I think my part here is complete.

@jdm

jdm commented Oct 8, 2015

Copy link
Copy Markdown
Member

@bors-servo: r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 9e76ea6 has been approved by jdm

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 9e76ea6 with merge 01ff3cb...

bors-servo pushed a commit that referenced this pull request Oct 8, 2015
Regenerate bindings using the latest bindgen++

Need to test this a bit more, but it's structured roughly the way I want it and no manual edits of jsapi_*.rs are required.

Fixes #158

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/rust-mozjs/198)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - travis

@bors-servo
bors-servo merged commit 9e76ea6 into servo:master Oct 8, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants