Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upWebIDL callbacks should root themselves #14447
Closed
Labels
Comments
bors-servo
added a commit
that referenced
this issue
Jan 12, 2017
Make WebIDL callbacks permanently rooted This replicates the same model that Promise uses right now, because it requires less thinking than coming up with something else. - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #14447 - [ ] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14994) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Jan 13, 2017
Make WebIDL callbacks permanently rooted This replicates the same model that Promise uses right now, because it requires less thinking than coming up with something else. - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #14447 - [ ] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14994) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Jan 16, 2017
Make WebIDL callbacks permanently rooted This replicates the same model that Promise uses right now, because it requires less thinking than coming up with something else. - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #14447 - [ ] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14994) <!-- Reviewable:end -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The codegen for a WebIDL callback yields
Rc<CallbackType>. This value isn't safe because its reflector doesn't get added to any stack root list. We should make this behave like promises, which include a permanent root that only is removed when the final Rust promise object is destroyed.