Skip to content

unblock using JS_GC_ZEAL - #8226

Merged
bors-servo merged 2 commits into
servo:masterfrom
froydnj:gc-zeal
Oct 28, 2015
Merged

bors-servo merged 2 commits into
servo:masterfrom
froydnj:gc-zeal

Conversation

@froydnj

@froydnj froydnj commented Oct 27, 2015

Copy link
Copy Markdown
Contributor

I think these patches move the JS_SetReservedSlot call to the right place for #6057. I'm not sure that the interface to create_dom_global is the best; passing a JSVal or a *libc::c_void seemed about equal, so I'd welcome feedback there.

Review on Reviewable

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Oct 27, 2015
@jdm

jdm commented Oct 27, 2015

Copy link
Copy Markdown
Member

-S-awaiting-review +S-needs-code-changes


Reviewed 1 of 1 files at r1, 2 of 2 files at r2.
Review status: all files reviewed at latest revision, 4 unresolved discussions, some commit checks pending.


components/script/dom/bindings/codegen/CodegenRust.py, line 2168 [r1] (raw file):
Let's merge these two.


components/script/dom/bindings/codegen/CodegenRust.py, line 2180 [r1] (raw file):
Let's merge these two.


components/script/dom/bindings/utils.rs, line 10 [r2] (raw file):
Add this to an existing import line.


components/script/dom/bindings/utils.rs, line 629 [r2] (raw file):
I'm inclined towards create_dom_global<T: Reflectable>(implementation: *mut T) and call PrivateValue when calling JS_SetReservedSlot.


Comments from the review on Reviewable.io

@jdm jdm added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Oct 27, 2015
@froydnj

froydnj commented Oct 27, 2015

Copy link
Copy Markdown
Contributor Author

I'm inclined towards create_dom_global<T: Reflectable>(implementation: *mut T) and call PrivateValue when calling JS_SetReservedSlot.

I didn't see much benefit to templating the function over T when we didn't really use T for anything. Do you prefer the templating for consistency with the Gecko implementation, or are there deeper issues here?

@jdm

jdm commented Oct 27, 2015

Copy link
Copy Markdown
Member

There's no deeper issue, it's just slightly more type-safe than accepting a *const libc::c_void. I'm ok with that choice, though.

We're going to wind up tacking on different pieces of code for the
global vs. non-global case once we move the JS_SetReservedSlot call into
create_dom_global.  We might as well separate the indentation changes
into a separate commit.
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Oct 27, 2015
@froydnj

froydnj commented Oct 27, 2015

Copy link
Copy Markdown
Contributor Author

There's no deeper issue, it's just slightly more type-safe than accepting a*const libc::c_void. I'm ok with that choice, though.

OK, thanks. I went with that option.

@jdm

jdm commented Oct 27, 2015

Copy link
Copy Markdown
Member

-S-awaiting-review +S-needs-code-changes


Reviewed 2 of 2 files at r3.
Review status: all files reviewed at latest revision, 1 unresolved discussion, some commit checks pending.


Comments from the review on Reviewable.io

@jdm jdm added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Oct 27, 2015
Moving this slot setting prior to initializing standard classes and
other initialization tasks means that we can effectively use JS_GC_ZEAL.

Fixes servo#6057.
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Oct 27, 2015
@Ms2ger

Ms2ger commented Oct 28, 2015

Copy link
Copy Markdown
Contributor

@bors-servo r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit c82b6ce has been approved by Ms2ger

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Oct 28, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit c82b6ce with merge 9abcc10...

bors-servo pushed a commit that referenced this pull request Oct 28, 2015
unblock using JS_GC_ZEAL

I think these patches move the `JS_SetReservedSlot` call to the right place for #6057.  I'm not sure that the interface to `create_dom_global` is the best; passing a `JSVal` or a `*libc::c_void` seemed about equal, so I'd welcome feedback there.

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

Copy link
Copy Markdown
Contributor

💔 Test failed - mac-rel-wpt

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Oct 28, 2015
@jdm

jdm commented Oct 28, 2015

Copy link
Copy Markdown
Member

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit c82b6ce with merge 3efa749...

bors-servo pushed a commit that referenced this pull request Oct 28, 2015
unblock using JS_GC_ZEAL

I think these patches move the `JS_SetReservedSlot` call to the right place for #6057.  I'm not sure that the interface to `create_dom_global` is the best; passing a `JSVal` or a `*libc::c_void` seemed about equal, so I'd welcome feedback there.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8226)
<!-- Reviewable:end -->
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Oct 28, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Oct 28, 2015
@jdm

jdm commented Oct 28, 2015

Copy link
Copy Markdown
Member

@bors-servo: retry

  • infra

@bors-servo

Copy link
Copy Markdown
Contributor

⚡ Previous build results for android, gonk, linux-dev, mac-dev-ref-unit, mac-rel-css, mac-rel-wpt are reusable. Rebuilding only linux-rel...

@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Oct 28, 2015
@jdm

jdm commented Oct 28, 2015

Copy link
Copy Markdown
Member

@bors-servo: retry

  • infra

@bors-servo

Copy link
Copy Markdown
Contributor

⚡ Previous build results for android, gonk, linux-dev, mac-dev-ref-unit, mac-rel-css, mac-rel-wpt are reusable. Rebuilding only linux-rel...

@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, gonk, linux-dev, linux-rel, mac-dev-ref-unit, mac-rel-css, mac-rel-wpt

@bors-servo
bors-servo merged commit c82b6ce into servo:master Oct 28, 2015
@SimonSapin SimonSapin removed the S-tests-failed The changes caused existing tests to fail. label Jan 27, 2016
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.

6 participants