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

Rename ScriptChan in constellation to EventLoop #14260

Merged
merged 1 commit into from Dec 15, 2016

Conversation

asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Nov 17, 2016

We currently have a type ScriptChan in the constellation, which is named after its implementation rather than its semantics. In the spec, the nearest concept seems to be event loop https://html.spec.whatwg.org/multipage/#event-loop.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes do not require tests because renaming.

This change is Reviewable

@asajeffrey asajeffrey added A-constellation Involves the constellation I-refactor No impact; the issue is one of maintainability or tidiness. Proposed solution requires refactoring. labels Nov 17, 2016
@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Nov 17, 2016
@nox
Copy link
Contributor

nox commented Nov 17, 2016

r? @Ms2ger

@highfive highfive assigned Ms2ger and unassigned metajack Nov 17, 2016
@KiChjang
Copy link
Contributor

KiChjang commented Nov 17, 2016

Huh... not sure how this ties into the task queue concept as well, for which we have an assortment of task sources under script/task_sources.

@asajeffrey
Copy link
Member Author

@KiChjang I don't think the constellation needs to know about task queues, just about event loops. Could be wrong! We do have a general issue about naming, because some things are needed in script, some in the constellation, and some in both.

@KiChjang
Copy link
Contributor

@asajeffrey Oh, I meant that whether it'd be useful to store a Vec of TaskSources or whatnot in the event loop, as per spec.

@asajeffrey
Copy link
Member Author

@KiChjang good question, I think not, since they're needed by script and not the constellation.

@Ms2ger
Copy link
Contributor

Ms2ger commented Nov 18, 2016

I'm going to wait until #13996 lands.

@bors-servo
Copy link
Contributor

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

@highfive highfive added the S-needs-rebase There are merge conflict errors. label Nov 21, 2016
@asajeffrey asajeffrey removed the S-needs-rebase There are merge conflict errors. label Nov 21, 2016
@bors-servo
Copy link
Contributor

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

@highfive highfive added the S-needs-rebase There are merge conflict errors. label Nov 23, 2016
@asajeffrey asajeffrey removed the S-needs-rebase There are merge conflict errors. label Nov 23, 2016
@bors-servo
Copy link
Contributor

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

@highfive highfive added the S-needs-rebase There are merge conflict errors. label Dec 1, 2016
@asajeffrey asajeffrey removed the S-needs-rebase There are merge conflict errors. label Dec 3, 2016
@Ms2ger Ms2ger added S-fails-travis and removed S-awaiting-review There is new code that needs to be reviewed. labels Dec 6, 2016
@Ms2ger
Copy link
Contributor

Ms2ger commented Dec 6, 2016

Rebase, make it build, and ping me :)

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Dec 7, 2016
@asajeffrey
Copy link
Member Author

@Ms2ger it builds again now.

@bors-servo
Copy link
Contributor

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

@highfive highfive added the S-needs-rebase There are merge conflict errors. label Dec 14, 2016
@asajeffrey asajeffrey removed the S-needs-rebase There are merge conflict errors. label Dec 15, 2016
@jdm
Copy link
Member

jdm commented Dec 15, 2016

@Ms2ger Review ping.

Copy link
Contributor

@Ms2ger Ms2ger left a comment

Choose a reason for hiding this comment

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

r+ with nits.

* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

use ipc_channel::ipc::IpcSender;
Copy link
Contributor

Choose a reason for hiding this comment

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

Some module-wide docs, please.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

warn!("Sending mozbrowser event to script failed ({}).", e);
}
}

fn notify_visibility(&self) {
self.script_chan.send(ConstellationControlMsg::ChangeFrameVisibilityStatus(self.id, self.visible))
self.event_loop.send(ConstellationControlMsg::ChangeFrameVisibilityStatus(self.id, self.visible))
.expect("Pipeline script chan");
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix the indentation

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@asajeffrey
Copy link
Member Author

@bors-servo r=Ms2ger

@bors-servo
Copy link
Contributor

📌 Commit e945e38 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 Dec 15, 2016
@bors-servo
Copy link
Contributor

⌛ Testing commit e945e38 with merge 91a2e76...

bors-servo pushed a commit that referenced this pull request Dec 15, 2016
Rename ScriptChan in constellation to EventLoop

<!-- Please describe your changes on the following line: -->

We currently have a type `ScriptChan` in the constellation, which is named after its implementation rather than its semantics. In the spec, the nearest concept seems to be event loop https://html.spec.whatwg.org/multipage/#event-loop.

---
<!-- 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
- [X] These changes do not require tests because renaming.

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

@bors-servo bors-servo merged commit e945e38 into servo:master Dec 15, 2016
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Dec 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-constellation Involves the constellation I-refactor No impact; the issue is one of maintainability or tidiness. Proposed solution requires refactoring.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants