Commit graph

1020 commits

Author SHA1 Message Date
OJ Kwon
d94def6b4a
test(net): update test cases 2018-04-27 12:25:18 -07:00
OJ Kwon
9ff11b9af3
refactor(embedder): rename file select message 2018-04-27 12:23:26 -07:00
OJ Kwon
2fab94785b
refactor(filemanager): uses embedderproxy directly 2018-04-27 12:23:25 -07:00
OJ Kwon
7cec47b3fa
refactor(filemanager): use filemanagermsg to request embedder 2018-04-27 12:22:39 -07:00
OJ Kwon
c4c0d263e9
test(net): update test cases 2018-04-27 12:22:38 -07:00
OJ Kwon
f69b124444
refactor(filemanager): remove awareness to ui behavior 2018-04-27 12:21:18 -07:00
OJ Kwon
b396a2f6ca
refactor(filemanager): send constellationmsg to select file 2018-04-27 12:21:17 -07:00
OJ Kwon
1c465bcd66
refactor(resourcethread): expose constellationmsg channel 2018-04-27 12:21:16 -07:00
Paul Rouget
9fb5795f37 delegate resource reading to embedder 2018-04-27 15:34:52 +08:00
Connor Brewster
c08ad45681 Remove insaccessible history states 2018-04-17 19:21:51 -05:00
Connor Brewster
17bd80a7b1 Implement history state 2018-04-16 10:21:15 -05:00
modal-d17
af445a357d Measure cache memory usage (#19251):
Made the memory cache data structure derive MallocSizeOf, along with
manual size_of() implementations in malloc_size_of.

Added a Measurable struct that acts as a container for fields size_of() can be called for.

Added a new IpcReceiver used for listening to messages from the memory profiler,
and used run_with_memory reporting to register a memory reporter in the thread.
Now when a message from the memory profiler arrives, report includes sizes of public and private http caches.

Updated test file.
2018-04-01 13:30:57 -04:00
Bastien Orivel
0918ac8cc7 Bump env_logger to 0.5 and log to 0.4 in every servo crate 2018-03-28 19:50:58 +02:00
Bastien Orivel
6c6a4159cf Dedupe lazy_static
🎉 🎉 🎉
2018-03-23 18:14:20 +01:00
Glenn Watson
30bb1ccbef Update WR (accelerated webgl fix on mac, line decoration optimizations). 2018-03-23 07:58:31 +10:00
Bastien Orivel
570d865065 Bump ipc-channel and bincode
This required bumping uuid too which unfortunately duplicated rand.
2018-03-21 13:05:47 +01:00
Bastien Orivel
f48d0928d5 Update servo-websocket to 0.21 2018-03-15 02:05:00 +01:00
Paul Rouget
76552b3e1e update tinyfiledialogs 2018-03-03 08:35:44 +01:00
Bastien Orivel
c072829be0 Update flate2 to 1.0 2018-02-28 16:55:35 +01:00
janczer
661d234c3c Change debug assertions to specific ones 2018-02-07 09:21:24 +01:00
bors-servo
c9ba16f9fb Auto merge of #19868 - CYBAI:specific-assertion, r=emilio
Use specific assertions

Similar to #19865
r? jdm

Note: Should I squash all the commits into one commit?

---
- [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 it should not break anything

<!-- 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/19868)
<!-- Reviewable:end -->
2018-01-25 18:06:33 -06:00
CYBAI
0c6ada833b Use specific assertion for net hsts tests 2018-01-26 01:30:32 +08:00
CYBAI
7f5a1538d3 Use specific assertion for net fetch methods 2018-01-26 01:30:31 +08:00
CYBAI
968976aba7 Use specific assertion for net fetch tests 2018-01-26 01:12:29 +08:00
CYBAI
909ff74f30 Use specific assertion for net cookie tests 2018-01-26 01:01:02 +08:00
CYBAI
0dda473146 Use specific assertion for net http_cache 2018-01-26 01:01:02 +08:00
Josh Matthews
0430bc0610
Use more specific assertions for http tests. 2018-01-25 08:41:47 -05:00
bors-servo
4307b6e67b Auto merge of #19350 - gterzian:ignore_aborted_responses_in_caching, r=jdm
Ignore aborted responses in caching

<!-- Please describe your changes on the following line: -->
@jdm @KiChjang @Manishearth Follow up on https://github.com/servo/servo/pull/18676 and https://github.com/servo/servo/pull/19274 to ignore aborted responses in caching.

I also found out the cache shouldn't return any response whose body is still in `ResponseBody::Receiving` mode, because that fails the assertion at https://github.com/servo/servo/blob/master/components/net/fetch/methods.rs#L438(we might want to add a channel as pat of the cached response later on to deal with this case). I only found out now because I needed the response from the server to trickle in so that it could be cached and aborted.

I copied the `http-cache.py` server from the wpt folder, and added a 'trickle' option, which is necessary to actually have a failing test with a cached but aborted request, it's now passing.

I also remove one unused import that slippled through previously.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/19350)
<!-- Reviewable:end -->
2018-01-23 14:47:16 -06:00
Anthony Ramine
697b9e2b87 Merge net and net_tests 2018-01-20 15:36:09 +01:00
Gregory Terzian
993e2f55ed handle caching of response with a body of ResponseBody::Receiving 2018-01-13 10:48:36 +08:00
Gregory Terzian
609e975c50 ignore aborted response in http caching 2018-01-13 10:48:35 +08:00
Glenn Watson
3f2ebfa422 Update WR (removal of RGB8, which isn't supported on some hardware).
Instead, we convert any source RGB8 images into RGBx (with
an opaque alpha channel).
2018-01-08 09:02:56 +10:00
Emilio Cobos Álvarez
820c9a1828
net: Use ? on Option more often. 2017-12-09 20:46:20 +01:00
Matt Brubeck
99c2db0549 Update to uluru 0.2 and arrayvec 0.4 2017-12-07 10:05:38 -08:00
bors-servo
e2a7360e17 Auto merge of #19487 - Eijebong:bump, r=jdm
Update lazy_static to 1.0

For now it'll be duplicated

<!-- 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/19487)
<!-- Reviewable:end -->
2017-12-05 10:31:16 -06:00
Bastien Orivel
c3f919ec0e Update lazy_static to 1.0
For now it'll be duplicated
2017-12-04 22:51:13 +01:00
Fabrice Desré
e8d82a5426
Prevent an unused import warning on non desktop platforms
opts is not used on Android for instance.
2017-12-02 19:29:55 -08:00
Simon Sapin
eb3652b3c6 Replace parse-hosts crate with 10 lines of code.
This removes 3927 lines of Rust code in 6 crates from the dependency graph:
parse-hosts, multistr, bow, extra-default, len-trait, and push-trait.

One of these crates doesn’t build in today’s Nightly:
https://github.com/rust-lang/rust/issues/46328
2017-11-28 16:19:29 +01:00
tigercosmos
2e3d1d8372 Remove WrappedHttpResponse abstraction 2017-11-26 00:25:44 +08:00
Anthony Ramine
ae20da6a80 Update cookie to 0.10
Except in webdriver, which source is in m-c.
2017-11-24 10:49:14 +01:00
bors-servo
7029e07ab9 Auto merge of #19185 - KiChjang:cookie-prefixes, r=avadacatavra
Implement secure and host cookie prefixes

Part of #8700.

I modified the algorithm so that it accurately checks for the presence of the `Path` attribute of the cookie, before checking whether it has a value of `/`.

<!-- 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/19185)
<!-- Reviewable:end -->
2017-11-23 08:26:03 -06:00
Keith Yeung
17ca56aa79 Implement secure and host cookie prefixes 2017-11-21 19:15:58 -08:00
Bastien Orivel
d55e0fa802 Remove cancellation map and ResourceId from the net* components
Fixes #19327
2017-11-21 23:03:16 +01:00
Hugh Gallagher
1b4b1c2bb2 Removed unused import in net/http_cache.rs 2017-11-21 14:09:25 +00:00
bors-servo
00b3612fe9 Auto merge of #19274 - Manishearth:xhr-cancel, r=jdm
Fetch cancellation

This PR implements cancellation for fetch, and uses it for XHR. This means that fetch clients can now send a message to the fetch task asking for the network request to be aborted.

Previously, clients like XHR had abort functionality but would implement it by simply ignoring future messages from the network task; and would not actually cancel the network fetch.

<!-- 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/19274)
<!-- Reviewable:end -->
2017-11-20 20:48:17 -06:00
Manish Goregaokar
6f59b152f1 Add aborted flag to response, set when fetch is aborted 2017-11-20 17:04:55 -08:00
Manish Goregaokar
7249fd6bd8 Fetch cancellation: Listen for cancellation and prematurely abort if cancelled 2017-11-20 16:54:25 -08:00
Manish Goregaokar
6dd7af2bda Fetch cancellation: Add CancellationListener 2017-11-20 16:54:24 -08:00
bors-servo
e2bc0f017c Auto merge of #18676 - gterzian:continue_http_cache_work, r=jdm
Continue http cache work

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

Work in progress, and not quite worth a review yet. (Continuation of https://github.com/servo/servo/pull/4117)

TODO

- [ ] cache metadata (find some subset of`net_traits::Metadata` that can be shared across threads, it seems the problem is mainly stuff inside `hyper::header` in the `headers` field)

- [ ] determine which other fields of a `Response` need to be cached, so a full and valid one can be returned upon a cache hit.

- [ ] determine how to best share the cache across fetch threads (inside HttpState like I tried now?)

- [ ] Spend more time reading the spec and make sure the cache follows it where it matters.

- [ ] Make the current wpt tests pass.

- [ ] More...

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #12972  (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/18676)
<!-- Reviewable:end -->
2017-11-20 18:22:06 -06:00
Gregory Terzian
6196a6e65d add pref to disable http cache, mozilla tests 2017-11-19 13:52:13 +08:00