Skip to content

Fix FileManager thread panic and other misc improvements - #11368

Merged
bors-servo merged 1 commit into
servo:masterfrom
izgzhen:fix-filemanager-exit
May 25, 2016
Merged

bors-servo merged 1 commit into
servo:masterfrom
izgzhen:fix-filemanager-exit

Conversation

@izgzhen

@izgzhen izgzhen commented May 24, 2016 •

Copy link
Copy Markdown
Contributor
  • ./mach build -d does not report any errors
  • ./mach test-tidy --faster does not report any errors
  • There are tests for these changes

Changes:

  • Add shut down logic for FileManager thread
  • Add an unit test for filemanager_thread

This change is Reviewable

@highfive

Copy link
Copy Markdown

Heads up! This PR modifies the following files:

  • @asajeffrey: components/constellation/constellation.rs
  • @KiChjang: components/net/filemanager_thread.rs, components/script/dom/file.rs, components/net_traits/filemanager_thread.rs, components/net_traits/filemanager_thread.rs

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label May 24, 2016
@asajeffrey

Copy link
Copy Markdown
Contributor

Looks good, some minor nits.

Previously, highfive wrote…

Heads up! This PR modifies the following files:

  • @asajeffrey: components/constellation/constellation.rs
  • @KiChjang: components/net/filemanager_thread.rs, components/script/dom/file.rs, components/net_traits/filemanager_thread.rs, components/net_traits/filemanager_thread.rs

Reviewed 6 of 6 files at r1.
Review status: all files reviewed at latest revision, 2 unresolved discussions.


components/script/dom/file.rs, line 55 [r1] (raw file):

        // FIXME: fix this after PR #11221 is landed
        let _id = selected.id;

Can we not just delete this line if it's not being used?


tests/unit/net/filemanager_thread.rs, line 21 [r1] (raw file):

    }

    let _ = chan.send(FileManagerThreadMsg::Exit);

Should we test that this actually did exit the thread?


Comments from Reviewable

@izgzhen

izgzhen commented May 24, 2016

Copy link
Copy Markdown
Contributor Author

Review status: all files reviewed at latest revision, 2 unresolved discussions.


components/script/dom/file.rs, line 55 [r1] (raw file):

Previously, asajeffrey (Alan Jeffrey) wrote…

Can we not just delete this line if it's not being used?

Hmm ... Ok, let't delete it!

Comments from Reviewable

@izgzhen

izgzhen commented May 24, 2016

Copy link
Copy Markdown
Contributor Author

Review status: all files reviewed at latest revision, 2 unresolved discussions.


tests/unit/net/filemanager_thread.rs, line 21 [r1] (raw file):

Previously, asajeffrey (Alan Jeffrey) wrote…

Should we test that this actually did exit the thread?

Good point, I want to do that as well. But how to do that? By sending another dummy request and inspect the response?

Comments from Reviewable

@asajeffrey

Copy link
Copy Markdown
Contributor

Review status: all files reviewed at latest revision, 1 unresolved discussion.


tests/unit/net/filemanager_thread.rs, line 21 [r1] (raw file):

Previously, izgzhen (Zhen Zhang) wrote…

Good point, I want to do that as well. But how to do that? By sending another dummy request and inspect the response?

Yes, something like send a request with a reply channel, and make sure we get an appropriate error either on the send on the reply.recv.

Comments from Reviewable

- Add shut down logic for FileManager thread
- Add an unit test for filemanager_thread
@highfive

Copy link
Copy Markdown

New code was committed to pull request.

@asajeffrey

Copy link
Copy Markdown
Contributor

Looks good!

@bors-servo r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 96b2093 has been approved by asajeffrey

@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 May 24, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 96b2093 with merge 0b64586...

bors-servo pushed a commit that referenced this pull request May 25, 2016
Fix FileManager thread panic and other misc improvements

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy --faster` does not report any errors
- [x] There are tests for these changes

Changes:

- Add shut down logic for FileManager thread
- Add an unit test for filemanager_thread

<!-- 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/11368)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows

@bors-servo
bors-servo merged commit 96b2093 into servo:master May 25, 2016
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label May 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants