Skip to content

Move HSTS/CookieStorage to Arc<RwLock> from Ipc - #7654

Merged
bors-servo merged 3 commits into
servo:masterfrom
samfoo:hsts-cookie-arc
Sep 19, 2015
Merged

bors-servo merged 3 commits into
servo:masterfrom
samfoo:hsts-cookie-arc

Conversation

@samfoo

@samfoo samfoo commented Sep 17, 2015

Copy link
Copy Markdown
Contributor

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Sep 17, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

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

@highfive highfive added S-needs-rebase There are merge conflict errors. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Sep 18, 2015
@jdm

jdm commented Sep 18, 2015

Copy link
Copy Markdown
Member

Looking pretty good!
-S-awaiting-review +S-needs-code-changes


Reviewed 6 of 6 files at r1.
Review status: all files reviewed at latest revision, 13 unresolved discussions, some commit checks failed.


components/net/http_loader.rs, line 326 [r1] (raw file):
nit: &Arc


components/net/http_loader.rs, line 335 [r1] (raw file):
nit: &Arc


components/net/http_loader.rs, line 351 [r1] (raw file):
nit: &Arc


components/net/http_loader.rs, line 363 [r1] (raw file):
nit: &Arc


components/net/http_loader.rs, line 504 [r1] (raw file):
I think I'd still prefer the request_must_be_secured abstraction instead of inlining this here.


components/net/resource_task.rs, line 166 [r1] (raw file):
Is this clone necessary?


components/net/resource_task.rs, line 167 [r1] (raw file):
This could use read instad, right?


components/net/resource_task.rs, line 208 [r1] (raw file):
Is this clone necessary?


tests/unit/net/hsts.rs, line 15 [r1] (raw file):
Why remove this test?


tests/unit/net/http_loader.rs, line 180 [r1] (raw file):
This can be read, right?


tests/unit/net/http_loader.rs, line 401 [r1] (raw file):
Why's this clone necessary?


tests/unit/net/http_loader.rs, line 434 [r1] (raw file):
Unnecessary clone?


tests/unit/net/http_loader.rs, line 484 [r1] (raw file):
Let's reuse url.


Comments from the review on Reviewable.io

@jdm jdm added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Sep 18, 2015
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Sep 19, 2015
@samfoo

samfoo commented Sep 19, 2015

Copy link
Copy Markdown
Contributor Author

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


components/net/resource_task.rs, line 167 [r1] (raw file):
Very confusingly, no. CookieStorage::cookies_for_url takes &mut self. I haven't investigated why.


tests/unit/net/hsts.rs, line 15 [r1] (raw file):
The resource manager is now just responsible for owning the HSTS list. Adding and removing entries is only done on the list, rather than through the manager. This test no longer is really testing anything.


tests/unit/net/http_loader.rs, line 180 [r1] (raw file):
Same as above.


tests/unit/net/http_loader.rs, line 401 [r1] (raw file):
Load consumes hsts_list by value. The assertion on the line below needs to use the list again. In this case, cloning an Arc shouldn't matter anyway, right? It's not really cloning the list, just the pointer?


tests/unit/net/http_loader.rs, line 434 [r1] (raw file):
Same as above.


Comments from the review on Reviewable.io

@jdm

jdm commented Sep 19, 2015

Copy link
Copy Markdown
Member

-S-awaiting-review -S-needs-rebase +S-needs-code-changes


Reviewed 3 of 3 files at r2.
Review status: all files reviewed at latest revision, 2 unresolved discussions, all commit checks successful.


components/net/resource_task.rs, line 167 [r1] (raw file):
Oh right, we update the last used time in the cookies that get retrieved.


tests/unit/net/http_loader.rs, line 401 [r1] (raw file):
load consumes the result of hsts_list.clone(), and hsts_list remains unconsumed.


Comments from the review on Reviewable.io

@jdm jdm added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. S-needs-rebase There are merge conflict errors. labels Sep 19, 2015
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Sep 19, 2015
@samfoo

samfoo commented Sep 19, 2015

Copy link
Copy Markdown
Contributor Author

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


tests/unit/net/http_loader.rs, line 401 [r1] (raw file):
Whoops, you're right! I got a bit carried away there. Fixed.


Comments from the review on Reviewable.io

@samfoo

samfoo commented Sep 19, 2015

Copy link
Copy Markdown
Contributor Author

Review status: 5 of 6 files reviewed at latest revision, 2 unresolved discussions, some commit checks pending.


tests/unit/net/http_loader.rs, line 434 [r1] (raw file):
Removed, as above.


Comments from the review on Reviewable.io

@jdm

jdm commented Sep 19, 2015

Copy link
Copy Markdown
Member

@bors-servo: r+


Reviewed 1 of 1 files at r3.
Review status: :shipit: all files reviewed at latest revision, all discussions resolved, all commit checks successful.


Comments from the review on Reviewable.io

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 6411192 has been approved by jdm

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 6411192 with merge 7f2d819...

@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 Sep 19, 2015
bors-servo pushed a commit that referenced this pull request Sep 19, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - mac-rel-wpt

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Sep 19, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

⚡ Previous build results for android, gonk, linux-dev, mac-dev-ref-unit, mac-rel-css are reusable. Rebuilding only linux-rel, mac-rel-wpt...

@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, gonk, linux-dev, linux-rel, mac-dev-ref-unit, mac-rel-css, mac-rel-wpt

@bors-servo
bors-servo merged commit 6411192 into servo:master Sep 19, 2015
@samfoo
samfoo deleted the hsts-cookie-arc branch September 19, 2015 09:04
@SimonSapin SimonSapin removed the S-tests-failed The changes caused existing tests to fail. label Jan 27, 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.

5 participants