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

Simplify and improve Pipeline creation. #11437

Merged
merged 11 commits into from May 27, 2016
Merged

Conversation

@Ms2ger
Copy link
Contributor

Ms2ger commented May 26, 2016

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

This change is Reviewable

@highfive
Copy link

highfive commented May 26, 2016

Heads up! This PR modifies the following files:

  • @asajeffrey: components/constellation/pipeline.rs, components/constellation/constellation.rs
@nox
Copy link
Member

nox commented May 26, 2016

@highfive highfive assigned asajeffrey and unassigned wafflespeanut May 26, 2016
@asajeffrey
Copy link
Member

asajeffrey commented May 26, 2016

Looks good, some minor nits.

Previously, nox (Anthony Ramine) wrote…

r? @asajeffrey


Reviewed 1 of 2 files at r3, 1 of 1 files at r9.
Review status: all files reviewed at latest revision, 7 unresolved discussions.


components/constellation/constellation.rs, line 40 [r9] (raw file):

use net_traits::{self, ResourceThreads, IpcSend};
use offscreen_gl_context::{GLContextAttributes, GLLimits};
use pipeline::{ChildProcess, InitialPipelineState, Pipeline};

Are we ever actually using ChildProcess in the contellation? We are keeping a vector of them, but as far as I can tell, never actually doing anything with it.


components/constellation/constellation.rs, line 408 [r9] (raw file):

                    initial_window_size: Option<TypedSize2D<PagePx, f32>>,
                    script_channel: Option<IpcSender<ConstellationControlMsg>>,
                    load_data: LoadData) {

This function is now a lot nicer!


components/constellation/constellation.rs, line 432 [r9] (raw file):

        });

        let (pipeline, child_process) = match result {

if we don't actually use the child process we could just make this a Result<Pipeline>.


components/constellation/pipeline.rs, line 41 [r9] (raw file):

use webrender_traits;

pub enum ChildProcess {

Make this private? Or just get rid of it, as I don't see where it's being used.


components/constellation/pipeline.rs, line 186 [r9] (raw file):

        if let Some((script_port, pipeline_port)) = content_ports {
            // Route messages coming from content to devtools as appropriate.
            let script_to_devtools_chan = state.devtools_chan.as_ref().map(|devtools_chan| {

@nox would tell you off for side-effecting map :)


components/constellation/pipeline.rs, line 245 [r9] (raw file):

            };

            // Spawn the child process.

Nice that this is in pipeline rather than constellation.


components/constellation/pipeline.rs, line 392 [r9] (raw file):

#[derive(Deserialize, Serialize)]
pub struct UnprivilegedPipelineContent {

Can this be made private? Also, the name is odd now we don't have PrivilegedPipelineContent.


Comments from Reviewable

@bors-servo
Copy link
Contributor

bors-servo commented May 26, 2016

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

@Ms2ger
Copy link
Contributor Author

Ms2ger commented May 27, 2016

Review status: all files reviewed at latest revision, 5 unresolved discussions, some commit checks failed.


components/constellation/constellation.rs, line 40 [r9] (raw file):

Previously, asajeffrey (Alan Jeffrey) wrote…

Are we ever actually using ChildProcess in the contellation? We are keeping a vector of them, but as far as I can tell, never actually doing anything with it.

https://github.com//issues/11459

components/constellation/constellation.rs, line 432 [r9] (raw file):

Previously, asajeffrey (Alan Jeffrey) wrote…

if we don't actually use the child process we could just make this a Result<Pipeline>.

https://github.com//issues/11459

components/constellation/pipeline.rs, line 41 [r9] (raw file):

Previously, asajeffrey (Alan Jeffrey) wrote…

Make this private? Or just get rid of it, as I don't see where it's being used.

https://github.com//issues/11459

components/constellation/pipeline.rs, line 186 [r9] (raw file):

Previously, asajeffrey (Alan Jeffrey) wrote…

@nox would tell you off for side-effecting map :)

Not my code :)

components/constellation/pipeline.rs, line 392 [r9] (raw file):

Previously, asajeffrey (Alan Jeffrey) wrote…

Can this be made private? Also, the name is odd now we don't have PrivilegedPipelineContent.

It cannot. (`components/servo/lib.rs` needs it when spawning a child process.)

Comments from Reviewable

@Ms2ger Ms2ger force-pushed the Ms2ger:pipeline-creation branch from ffa5b1d to 948b69f May 27, 2016
@asajeffrey
Copy link
Member

asajeffrey commented May 27, 2016

OK, r=me after squashing.

Previously, bors-servo wrote…

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


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


components/constellation/pipeline.rs, line 392 [r9] (raw file):

Previously, Ms2ger wrote…

It cannot. (components/servo/lib.rs needs it when spawning a child process.)

Change the name? (Bikeshedding, I know...)

Comments from Reviewable

@Ms2ger
Copy link
Contributor Author

Ms2ger commented May 27, 2016

@bors-servo r=asajeffrey

@bors-servo
Copy link
Contributor

bors-servo commented May 27, 2016

📌 Commit 5d0bbe8 has been approved by asajeffrey

@bors-servo
Copy link
Contributor

bors-servo commented May 27, 2016

Testing commit 5d0bbe8 with merge c9534df...

bors-servo added a commit that referenced this pull request May 27, 2016
Simplify and improve Pipeline creation.

- [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 refactoring

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11437)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented May 27, 2016

@bors-servo bors-servo merged commit 5d0bbe8 into servo:master May 27, 2016
2 of 3 checks passed
2 of 3 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@Ms2ger Ms2ger deleted the Ms2ger:pipeline-creation branch May 29, 2016
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

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