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 upMake unrooted_must_root understand promises #22504
Closed
Labels
Comments
Manishearth
added a commit
to Manishearth/servo
that referenced
this issue
Jan 4, 2019
fixes servo#22504
Manishearth
added a commit
to Manishearth/servo
that referenced
this issue
Jan 4, 2019
fixes servo#22504
bors-servo
added a commit
that referenced
this issue
Jan 4, 2019
Make unrooted_must_root ignore Rc<Promise> fixes #22504 r? @jdm @nox <!-- 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/22608) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Jan 4, 2019
Make unrooted_must_root ignore Rc<Promise> fixes #22504 r? @jdm @nox <!-- 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/22608) <!-- Reviewable:end -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently methods returning an
Rc<Promise>need to be marked asallow(unrooted_must_root), becauseRc<Promise>is transitivelymust_root. Almost all the new APIs use promises, which means we opt out of our soundness checks a lot.Perhaps we can instead use a thin wrapper around
Rc<Promise>calledRootedPromise, which itself isn'tmust_root? Or special case the lint for this. I'm hesitant to just go ahead and do it because I don't fully understand the soundness situation for promises.see also #14900
cc @nox @jdm @asajeffrey