Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd Http Global State Object #10188
Add Http Global State Object #10188
Conversation
|
Thanks for doing this! These changes propagate the new type to places where I don't think it really adds clarity, so the majority of my comments are pointing out places where I find the older code clearer. Reviewed 4 of 4 files at r1. components/net/http_loader.rs, line 81 [r1] (raw file): components/net/http_loader.rs, line 366 [r1] (raw file): components/net/http_loader.rs, line 375 [r1] (raw file): components/net/http_loader.rs, line 391 [r1] (raw file): components/net/http_loader.rs, line 403 [r1] (raw file): components/net/http_loader.rs, line 520 [r1] (raw file): components/net/http_loader.rs, line 530 [r1] (raw file): components/net/http_loader.rs, line 563 [r1] (raw file): components/net/http_loader.rs, line 597 [r1] (raw file): components/net/resource_thread.rs, line 278 [r1] (raw file): components/net/websocket_loader.rs, line 30 [r1] (raw file): components/net/websocket_loader.rs, line 65 [r1] (raw file): Comments from the review on Reviewable.io |
|
No problem! Almost have all the changes made. Review status: all files reviewed at latest revision, 12 unresolved discussions. Comments from the review on Reviewable.io |
|
Review status: 1 of 3 files reviewed at latest revision, 12 unresolved discussions. components/net/http_loader.rs, line 366 [r1] (raw file): components/net/http_loader.rs, line 375 [r1] (raw file): components/net/http_loader.rs, line 391 [r1] (raw file): components/net/http_loader.rs, line 403 [r1] (raw file): components/net/http_loader.rs, line 520 [r1] (raw file): components/net/http_loader.rs, line 530 [r1] (raw file): components/net/http_loader.rs, line 563 [r1] (raw file): components/net/http_loader.rs, line 597 [r1] (raw file): components/net/resource_thread.rs, line 278 [r1] (raw file): components/net/websocket_loader.rs, line 30 [r1] (raw file): components/net/websocket_loader.rs, line 65 [r1] (raw file): Comments from the review on Reviewable.io |
|
Review status: 1 of 3 files reviewed at latest revision, 12 unresolved discussions. components/net/http_loader.rs, line 81 [r1] (raw file): Comments from the review on Reviewable.io |
|
-S-awaiting-review +S-needs-code-changes Reviewed 3 of 3 files at r2. components/net/http_loader.rs, line 81 [r2] (raw file): components/net/http_loader.rs, line 152 [r2] (raw file): Comments from the review on Reviewable.io |
|
Please squash all commits as well when making the final change! Reviewed 2 of 2 files at r3. components/net/http_loader.rs, line 154 [r3] (raw file): Comments from the review on Reviewable.io |
|
On that last change, the tests often pass the HttpState object into the load function and then use the HttpState object again within an assert. Would it be best to pass a ref of the object to the load function so the object is not moved? |
Replace hsts_list, auth_cache, and cookie_jar with http_state Reverted a few changes Moved http_state back to factory Removed unnecessary Arc Removed Arc for http_state
|
Squashed and removed Arc for HttpState |
|
@bors-servo: r+ Reviewed 2 of 2 files at r4. Comments from the review on Reviewable.io |
|
|
Add Http Global State Object This adds a new HttpState object which holds common http state(#10175). This reduces the amount of work that is required to add extra things to the Http state. The HttpState object currently holds: ``` hsts_list: Arc::new(RwLock::new(HSTSList::new())), cookie_jar: Arc::new(RwLock::new(CookieStorage::new())), auth_cache: Arc::new(RwLock::new(HashMap::new())), ``` <!-- 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/10188) <!-- Reviewable:end -->
|
|
cbrewster commentedMar 25, 2016
This adds a new HttpState object which holds common http state(#10175). This reduces the amount of work that is required to add extra things to the Http state.
The HttpState object currently holds:
This change is