Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow_navigation: use channel to send response #17684

Merged
merged 1 commit into from Jul 17, 2017

Conversation

@paulrouget
Copy link
Contributor

paulrouget commented Jul 12, 2017

From the embedder perspective, this makes things easier in term of synchronicity.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #__ (github issue number if applicable).
  • There are tests for these changes OR
  • These changes do not require tests because _____

This change is Reviewable

@paulrouget paulrouget requested a review from asajeffrey Jul 12, 2017
@paulrouget paulrouget assigned asajeffrey and unassigned metajack Jul 13, 2017
@paulrouget paulrouget removed the request for review from asajeffrey Jul 13, 2017
@paulrouget paulrouget assigned cbrewster and unassigned asajeffrey Jul 13, 2017
@paulrouget
Copy link
Contributor Author

paulrouget commented Jul 13, 2017

@cbrewster do you think this makes sense? We haven't used channels in WindowMethods yet.

@bors-servo
Copy link
Contributor

bors-servo commented Jul 13, 2017

The latest upstream changes (presumably #17694) made this pull request unmergeable. Please resolve the merge conflicts.

@cbrewster
Copy link
Member

cbrewster commented Jul 13, 2017

@paulrouget what is the advantage of making the embedder handle the channel? It seems like this would add extra complexity for the embedder.

@paulrouget
Copy link
Contributor Author

paulrouget commented Jul 14, 2017

@cbrewster it doesn't require the embedder to return the boolean right away. It can be done later.

For example, if the embedder wants to ask the user, with a prompt, if he agrees to navigate away or not, if we do not use a channel, we have to block allow_navigation (if I'm not mistaken, the compositor thread) until the whole prompting mechanism is done.

With a channel, we don't have to block.

Does it make sense?

It seems like this would add extra complexity for the embedder.

Yes. But at this stage, we don't try to make the embedding API "simple". We will later work on the cosmetic part of the API to make things easier.

@cbrewster
Copy link
Member

cbrewster commented Jul 16, 2017

Sounds reasonable to me.
@bors-servo r+

@bors-servo
Copy link
Contributor

bors-servo commented Jul 16, 2017

📌 Commit 3c95200 has been approved by cbrewster

@bors-servo
Copy link
Contributor

bors-servo commented Jul 16, 2017

🔒 Merge conflict

@cbrewster
Copy link
Member

cbrewster commented Jul 16, 2017

@bors-servo delegate+
r=me after rebase

@bors-servo
Copy link
Contributor

bors-servo commented Jul 16, 2017

✌️ @paulrouget can now approve this pull request

@paulrouget paulrouget force-pushed the paulrouget:fix_allow_navigation branch from 3c95200 to cd3172c Jul 17, 2017
@paulrouget
Copy link
Contributor Author

paulrouget commented Jul 17, 2017

Rebased. Also fixed cef.

@bors-servo r+

@bors-servo
Copy link
Contributor

bors-servo commented Jul 17, 2017

📌 Commit cd3172c has been approved by paulrouget

@bors-servo
Copy link
Contributor

bors-servo commented Jul 17, 2017

Testing commit cd3172c with merge 495faf3...

bors-servo added a commit that referenced this pull request Jul 17, 2017
allow_navigation: use channel to send response

From the embedder perspective, this makes things easier in term of synchronicity.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/17684)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jul 17, 2017

@bors-servo bors-servo merged commit cd3172c into servo:master Jul 17, 2017
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.