Commit Graph

217 Commits

Author SHA1 Message Date
Nikhil Marathe
b52b66ebf5 Bug 1169044 - Patch 3 - Store and set principal with script URI on ServiceWorkers. r=ehsan
The ServiceWorkerRegistrationInfo's principal is the principal of the document
that called register(). If we create WorkerPrivate instances based off of
this, they have a valid principal in terms of security and same-origin-ness,
but the URI path is wrong. When fetching the script from the network, the
channel's principal is used to update the worker principal. We need to do the
same when the script is loaded from Cache. This patch adds support to store the
channel principal in the cache.

--HG--
extra : rebase_source : e7d527335aa4f0d4ee52e58915c8b0ef4ad26983
2015-06-04 21:39:34 -07:00
Ben Kelly
ce90b29484 Bug 1173439 P5 Cache should index on a hash instead of the url itself. r=ehsan 2015-06-16 17:39:05 -07:00
Ben Kelly
72fd940fc3 Bug 1173439 P4 Remove Request url field from Cache API database. r=ehsan 2015-06-16 17:39:05 -07:00
Ben Kelly
0a4c003dd5 Bug 1173439 P3 Use url query field for database matching and Request creation. r=ehsan 2015-06-16 17:39:05 -07:00
Ben Kelly
2a2c3fa17d Bug 1173439 P2 Parse Response URL query as a separate field. r=ehsan 2015-06-16 17:39:05 -07:00
Ben Kelly
18e16a0fa2 Bug 1173439 P1 Store URLs as UTF8 strings in Cache instead of UTF16. r=ehsan 2015-06-16 17:39:05 -07:00
Ben Kelly
b6487f1ac4 Bug 1174768 Cache should check if QuotaManager is shutting down before calling GetOrCreate. r=janv 2015-06-16 12:00:55 -07:00
Ehsan Akhgari
7018c8ba46 Bug 1174982 - Add the new nsContentPolicyType values to the DBSchema.cpp static_assert; r=bkelly
Added a comment to nsIContentPolicyBase.idl since even I forgot to do this.
2015-06-16 10:42:31 -04:00
Ehsan Akhgari
cd8eec31d9 Bug 1174868 - Avoid storing RequestContext inside InternalRequest; r=nsm,bkelly,smaug
We are going to infer all RequestContext types from the corresponding
nsContentPolicyType. It no longer makes sense to store both of these on
InternalRequest.  This has the extra benefit that we don't need to worry
about keeping them in sync any more.
2015-06-15 21:36:04 -04:00
Ehsan Akhgari
fe838f3834 Bug 1174849 - Remove "serviceworker" from RequestContext; r=smaug,bkelly 2015-06-15 21:36:01 -04:00
Ben Kelly
a3be126ba9 Bug 1167808 P0 Cache.put() should use internal body of opaque Response. r=nsm 2015-06-12 18:59:01 -07:00
Ben Kelly
e440c549b6 Bug 1169994 Fix Cache to close connection on right thread when init is canceled. r=ehsan 2015-06-10 06:37:16 -07:00
Ehsan Akhgari
be551239da Bug 1172629 - Use the caches global property from an iframe loaded after setting the pref in order to make the tests pass with the pref disabled; r=bkelly a=RyanVM 2015-06-09 16:06:00 -04:00
Ehsan Akhgari
d9f5031529 Bug 1164397 - Part 5: Save the redirected flag and the redirected URI in the DOM cache; r=bkelly 2015-06-05 15:57:44 -04:00
Ben Kelly
7ea74752c9 Bug 1168152 P5 Follow-up to use 32kb growth size as intended in previous patches. r=me 2015-05-28 07:52:35 -07:00
Ben Kelly
da9b1ef1b9 Bug 1168152 P4 Add a test to verify Cache incremental vacuum works. r=ehsan 2015-05-28 07:46:48 -07:00
Ben Kelly
dbbf4fbc4a Bug 1168152 P3 Perform incremental vacuum at tail end of Cache db connections. r=ehsan 2015-05-28 07:46:47 -07:00
Ben Kelly
6ea4923572 Bug 1168152 P2 Use a wrapper mozIStorageConnection for shared Cache connections. r=ehsan 2015-05-28 07:46:47 -07:00
Ben Kelly
aee2720d22 Bug 1168152 P1 Use a smaller sqlite page size and a growth increment in Cache. r=ehsan 2015-05-28 07:46:47 -07:00
Ben Kelly
ac3f20c81e Bug 1168135 P3 Cache Context should pass shared Data container to init Action. r=ehsan 2015-05-28 07:46:47 -07:00
Ben Kelly
02392e2639 Bug 1168135 P2 Add Cache Context::Init() method. r=ehsan 2015-05-28 07:46:47 -07:00
Ben Kelly
47b8771d37 Bug 1168135 P1 Execute Cache init Action on same target thread used for other Actions. r=ehsan 2015-05-28 07:46:47 -07:00
Ehsan Akhgari
4017e4028f Bug 1168208 - Refactor the existing logic for syncing the security info between Response and channel objects into a new helper class; r=nsm,jdm,bkelly
--HG--
rename : dom/fetch/InternalResponse.cpp => dom/fetch/ChannelInfo.cpp
rename : dom/fetch/Response.h => dom/fetch/ChannelInfo.h
2015-05-27 14:22:53 -04:00
Carsten "Tomcat" Book
1f0ef48e79 Backed out changeset ae9c77fa58d1 (bug 1168208) for bustage on a CLOSED TREE 2015-05-27 14:50:43 +02:00
Ehsan Akhgari
c66a858d3a Bug 1168208 - Refactor the existing logic for syncing the security info between Response and channel objects into a new helper class; r=nsm,jdm,bkelly
--HG--
rename : dom/fetch/InternalResponse.cpp => dom/fetch/ChannelInfo.cpp
rename : dom/fetch/Response.h => dom/fetch/ChannelInfo.h
2015-05-27 08:25:03 -04:00
Ben Turner
805bc94273 Bug 858680 - Part 2: Add idle notifications to QuotaClient, r=janv.
--HG--
extra : rebase_source : d4ec5e860b885ab01e4e1c19e6aed057b78e5aaa
2015-04-30 13:46:51 -07:00
Ben Kelly
322b8ff03f Bug 1166911 Modify Cache API sqlite code to use IS NULL literal when comparing an empty key. r=ehsan 2015-05-21 18:16:37 -07:00
Ben Kelly
4a673bf1ef Bug 1166038 De-duplicate security info stored in the Cache API. r=ehsan 2015-05-21 18:16:36 -07:00
Wes Kocher
a6c4705f9a Backed out changeset 0aaa67fc61e8 (bug 858680) 2015-05-21 16:44:42 -07:00
Ben Turner
b553d50f23 Bug 858680 - Part 2: Add idle notifications to QuotaClient, r=janv.
--HG--
extra : rebase_source : 6797f2d4fdaabef4e5d3b83fbacc09984f447866
2015-04-30 13:46:51 -07:00
Bobby Holley
3b6ba803a8 Bug 1165162 - Serialize originSuffix into .origin. r=gabor,sr=sicking
We also provide an opt-out for the original behavior, and use it in various
consumers that look like they need fixing up. Most of the usage here is in
code with persistence considerations, where we may need some sort of migration
path.
2015-05-20 17:11:49 -07:00
Ben Kelly
da9ebcd5b3 Bug 1166577 Use named sqlite params in Cache API code. r=ehsan 2015-05-20 06:51:19 -07:00
Ben Kelly
0241f41973 Bug 1165395 Test Cache API after QuotaManager reset. r=janv 2015-05-19 17:47:16 -07:00
Ryan VanderMeulen
a022f9015f Backed out changeset f7054968c36b (bug 1165395) for B2G debug crashes.
CLOSED TREE
2015-05-19 11:42:01 -04:00
Ben Kelly
628c49aec7 Bug 1165395 Test Cache API after QuotaManager reset. r=janv 2015-05-19 06:50:20 -07:00
Timur Valeev
ce02a96a2e Bug 1162365 - Cache API does not calculate usage in QuotaClient::InitOrigin(). r=bkelly 2015-05-12 13:11:36 +03:00
Bobby Holley
e61971d74b Bug 1164292 - Switch nsIPrincipal::origin to ACString. r=gabor 2015-05-15 11:51:51 -07:00
Ben Kelly
e65a98018d Bug 1162342 Enable sqlite WAL transactions in Cache API. r=ehsan 2015-05-13 17:55:48 -07:00
Ben Kelly
2552521ec3 Bug 1164100 P2 Fix defunct assertion in Cache API ActionRunnable. r=ehsan 2015-05-13 13:35:34 -07:00
Ben Kelly
b053f626b5 Bug 1164100 P1 Cache API should use correct base dir even when reusing sqlite connection. r=ehsan 2015-05-13 13:35:34 -07:00
Nikhil Marathe
e91bba2a3a Bug 1162411 - Fix Request CORS bug. r=bz
--HG--
extra : rebase_source : 5397f75a16865378949a4f30dd045f8c6a85b16e
2015-05-07 15:39:13 -07:00
Ehsan Akhgari
53964a12f9 Bug 1162487 - Enable the dom.caches.enabled pref in test_chrome_constructor.html; r=baku 2015-05-08 08:43:50 -04:00
Daniel Holbert
5a75770a20 Bug 1134671: Add 'override' keyword to method Context::Data::GetConnection() (in DOM Cache code). rs=ehsan 2015-05-07 09:56:40 -07:00
Ben Kelly
8db77b2780 Bug 1134671 Keep sqlite connection open between Cache API operations. r=ehsan 2015-05-07 05:16:51 -07:00
Ben Kelly
568cbb8cb1 Bug 1162211 Use sqlite private cache mode in Cache API. r=ehsan 2015-05-07 05:16:51 -07:00
Ben Kelly
ad6ba8a8b6 Bug 1160138 P3 Test Cache chrome-only Constructor. r=ehsan 2015-05-05 15:45:36 -07:00
Ben Kelly
f1808d0d50 Bug 1160138 P2 Add a [ChromeConstructor] to CacheStorage to support devtools. r=ehsan 2015-05-05 15:45:36 -07:00
Ben Kelly
9b63c77800 Bug 1160013 CachePushStreamChild should hold the parent DOM object alive. r=baku 2015-05-05 07:03:52 -07:00
Fernando Jimenez
b4fb82eed4 Bug 1147214 - Enable app:// urls to use SW. r=bkelly 2015-05-04 23:18:05 +02:00
Ben Kelly
2099c87b4a Bug 1160227 Improve Cache API warnings. r=ehsan 2015-05-01 08:15:52 -07:00