Commit Graph

187 Commits

Author SHA1 Message Date
Nikhil Marathe
d96bead5dd Bug 1197421 - Fetch resolver uses PromiseWorkerProxy. r=catalinb
The logic was very similar and PromiseWorkerProxy is well tested.  We defy
convention a bit by calling CleanUp() in another runnable later in time after
resolving the Promise, but it does not violate any invariants.

--HG--
extra : commitid : 6YhT7k9KrJ1
extra : rebase_source : 5ca90f54951853021f03e81531dbbfa4f2552d7e
2015-09-02 15:04:17 -07:00
Ben Kelly
3cc300f189 Bug 1184967 P1 Set RequestMode based on LoadInfo securityMode and client request content policy. r=nsm 2015-09-01 07:58:34 -07:00
Ben Kelly
5c4f9e0a97 Bug 1184607 P7.7 Allow new Response() to be used in xpcshell tests. r=ehsan
--HG--
extra : source : 066e84750afdc77c760c1b6563cf932e1f283b11
extra : histedit_source : 395e75ce1b96ca80448ab53d5d18bf57c94581e2
2015-08-31 14:26:30 -07:00
Ryan VanderMeulen
6e496147ac Backed out changeset 066e84750afd for landing with the wrong bug number.
--HG--
extra : histedit_source : c17fe1a5597236723dddd26d164c0ced6e7c0499
2015-08-31 18:36:48 -04:00
Ben Kelly
15e3127540 Bug 1184067 P7.7 Allow new Response() to be used in xpcshell tests. r=ehsan 2015-08-31 14:26:30 -07:00
Ben Kelly
eead67fbf9 Bug 1184607 P6 Set RequestRedirect and fix various redirect bugs in FetchDriver. r=nsm
* * *
Bug 1184607 P6 interdiff 001
2015-08-31 14:26:29 -07:00
Ben Kelly
a5977168ff Bug 1184607 P2 Update Request and Response DOM objects for new redirect model. r=nsm 2015-08-31 14:26:29 -07:00
Nicholas Nethercote
f44287005f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.

--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00
Kyle Huey
b930db3a55 Bug 1196592: Make retargeting Fetch to another thread actually work. r=nsm
--HG--
extra : rebase_source : 24801ef2546f6aa3d74b9193a104bb35e8103699
2015-08-28 13:49:07 -07:00
Emilio Cobos Álvarez
aa45c6c3e7 Bug 1195820 - Request constructor should throw TypeError if URL has credentials or parse fails. r=bkelly 2015-08-24 22:54:52 +02:00
Nikhil Marathe
a366626964 Bug 1193128 - Fix base64 decoding when fetching data URIs. r=baku
--HG--
extra : commitid : JynL4X6HT8W
extra : rebase_source : e8c021affdcca580887fc4aa6b8eb3465e843108
2015-08-13 13:08:43 -07:00
Ryan VanderMeulen
ad4abd6428 Backed out 7 changesets (bug 1189678, bug 1193128, bug 1189661, bug 1189644, bug 1189675) for various serviceworker mochitest and wpt failures.
Backed out changeset 696463139720 (bug 1189661)
Backed out changeset 7babb5b9d74a (bug 1189644)
Backed out changeset d4fa5cfc4b86 (bug 1189678)
Backed out changeset a7c27770b861 (bug 1189675)
Backed out changeset 471a45b97ce2 (bug 1189644)
Backed out changeset 4d96f2d48077 (bug 1193128)
Backed out changeset a9d5366288ff (bug 1189661)

CLOSED TREE
2015-08-24 18:09:47 -04:00
Nikhil Marathe
a266c8fb39 Bug 1193128 - Fix base64 decoding when fetching data URIs. r=baku
--HG--
extra : commitid : IGLyluSxhi2
extra : rebase_source : db4e929ea0c34db4f0d18db7ac258bcc66d3c3cc
2015-08-13 13:08:43 -07:00
Antonio de Luna Lopez
e8bd6361a0 Bug 1134609 -Make Fetch Request constructor less destructive to input on error r=bkelly 2015-08-10 12:06:00 -07:00
Ehsan Akhgari
05cf773043 Bug 1196524 - Add assertions to enforce that we don't attempt to perform a CORS preflight for fetches of no-cors requests; r=nsm 2015-08-20 13:40:32 -04:00
Nikhil Marathe
b5681e95be Bug 1193911 - Ensure synthetic Responses gets a valid channel info. r=ehsan
Right now, synthetic Responses did not have a valid channel info. When these
were saved in the Cache, and then restored, the restored Response did have
a ChannelInfo, but that ChannelInfo did not have a valid security info.
Passing this to respondWith() then caused the interception to fail.

This patch modifies Response::Constructor() to initialize its ChannelInfo from
the global. ChannelInfo can now initialize itself from a nsIDocument. All
workers now store their ChannelInfo on the WorkerLoadInfo.

--HG--
extra : commitid : L1wltwPICd8
extra : rebase_source : 8dab4c414eb50e02a00dd2cb3ee848b811060e70
2015-08-17 15:08:58 -07:00
Antonio de Luna Lopez
f24373495b Bug 1110476 - Stripped url fragment from Request::GetUrl() by calling either nsIURI::SetRef() or workers::URL::SetHash() in Request's url getter utility methods. Stripped url fragment from Response::GetUrl() by adding the method InternalRequest::StripFragmentAndSetUrl() which calls nsIURI::SetRef(). Added a test in dom/tests/mochitest/fetch/test_request.js for Request::GetUrl(). Removed manual url stripping from dom/cache/TypeUtils.cpp. r=bkelly
--HG--
extra : histedit_source : 034dc90148e27780a1f9a512a513ee30f26dce92
2015-08-13 08:22:19 -07:00
Christoph Kerschbaumer
1c05a94924 Bug 1191107 - Split TYPE_XMLHTTPREQUEST and TYPE_DATAREQUEST for EventSource (r=sicking,ehsan) 2015-08-06 11:17:24 -07:00
Carsten "Tomcat" Book
7d6f90f702 Backed out 2 changesets (bug 1191107, bug 1180273) for causing xpcshell and m-oth testfailures on a CLOSED TREEi IGNORE IDL
Backed out changeset c5f710ed8718 (bug 1191107)
Backed out changeset d98d82f9981b (bug 1180273)
2015-08-06 08:39:05 +02:00
Christoph Kerschbaumer
cb37e46dd2 Bug 1191107 - Split TYPE_XMLHTTPREQUEST and TYPE_DATAREQUEST for EventSource - IGNORE IDL (r=sicking,ehsan) 2015-08-05 12:58:05 -07:00
Ehsan Akhgari
aeacbc159a Bug 1188062 - Unship Request.context; r=baku 2015-07-30 08:14:00 -04:00
Bobby Holley
97b9240b34 Bug 1188696 - Hoist nsRefPtr.h into MFBT. r=froydnj 2015-07-29 10:44:59 -07:00
Ehsan Akhgari
3d45149452 Bug 1148030 - Correctly reflect object and embed RequestContext values; r=smaug
Note that these elements cannot be intercepted for now.  See bug
1168676 for the background.
2015-07-18 16:44:28 -04:00
Ehsan Akhgari
020deeb507 Bug 1148044 - Correctly reflect frame and iframe RequestContext values; r=smaug 2015-07-18 13:18:06 -04:00
Ben Kelly
1d8798cbc9 Bug 1173912 Fail opaque responses for client requests. r=ehsan 2015-07-14 13:11:26 -07:00
Birunthan Mohanathas
a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Wes Kocher
14b97c87b1 Backed out changeset df6593df027b (bug 1173912) 2015-07-10 15:58:24 -07:00
Ben Kelly
e0d5d6632a Bug 1173912 Fail opaque responses for client requests. r=ehsan 2015-07-10 14:28:32 -07:00
Emanuel Hoogeveen
7d1e52f2ff Bug 905127 - Part 1 - Make some functions from nsNetUtil not inline. r=jduell 2015-07-07 04:17:00 +02:00
Ehsan Akhgari
a7e0f3e102 Bug 1148935 - Correctly reflect worker and sharedworker RequestContext values; r=smaug 2015-06-30 18:52:42 -04:00
Ryan VanderMeulen
c4367148d1 Backed out changeset 07bf31cca660 (bug 1148935) for Werror bustage.
CLOSED TREE
2015-06-30 15:53:43 -04:00
Ehsan Akhgari
d560d3dcf3 Bug 1148935 - Correctly reflect worker and sharedworker RequestContext values; r=smaug 2015-06-30 15:30:08 -04:00
Andrea Marchesini
fc9a4cb52f Bug 1177916 - URLSearchParams::GetParentObject should not return nullptr, r=smaug 2015-06-29 17:02:53 +01:00
Cameron McCormack
860a9f7d1a Back out bug 1177916 (changeset d4c34d7fb112) for test_urlSearchParams.html failure. 2015-06-27 12:18:19 +10:00
Andrea Marchesini
d55095b632 Bug 1177916 - URLSearchParams::GetParentObject should not return nullptr, r=smaug 2015-06-26 17:44:34 -07:00
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
Nikhil Marathe
8dccad6eaa Bug 1169044 - Patch 2 - Split URLSearchParams parsing logic into non-CCed URLParams. r=baku
--HG--
extra : rebase_source : f68696ff1b2f2fabbb0ed015509477c65573768d
2015-06-04 13:45:24 -07:00
Nikhil Marathe
bd1323708a Bug 1169044 - Patch 1 - Refactor setting referrer and referrer policy between fetch and XHR. r=khuey
--HG--
extra : rebase_source : 8b004536dab18706ae4b8c3f0c574f8769c05638
2015-06-04 14:05:00 -07:00
Andrea Marchesini
46ed66e379 Bug 1174731 - patch 1 - Make searchParams attribute readonly, r=smaug 2015-06-24 12:15:59 -07:00
Michal Novotny
671167c884 Bug 1173378 - crash in mozilla::net::HttpBaseChannel::OverrideSecurityInfo(nsISupports*), r=ehsan 2015-06-17 13:16:33 +02:00
Fernando Jimenez
9d27d75942 Bug 1174078 - Calling "fetch" inside Service Worker's "onfetch" handler in b2g causes "onfetch" again that leads to an infinite loop. r=nsm 2015-06-17 11:50:07 +02:00
Ehsan Akhgari
2a127a2d67 Bug 1147668 - Correctly reflect video and track RequestContext values; r=smaug 2015-06-16 21:18:08 -04:00
Wes Kocher
3ae1cac20c Backed out changeset f46a712edf7e (bug 1147668) for assertion failures in test_access_control.html CLOSED TREE 2015-06-16 14:48:15 -07:00
Ehsan Akhgari
103e06656c Bug 1147668 - Correctly reflect video and track RequestContext values; r=smaug 2015-06-16 14:49:58 -04:00
Ehsan Akhgari
aeecf7b38d Backed out changeset 7210dfe7ad78 (Bug 1147668) for test failure 2015-06-15 23:20:02 -04:00
Ehsan Akhgari
0096b1db1f Bug 1147668 - Correctly reflect video and track RequestContext values; r=smaug 2015-06-15 22:08:06 -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
Andrea Marchesini
dcdcd94a06 Bug 1155153 - about:serviceworkers should work in e10s mode, r=nsm, r=bholley 2015-06-04 19:51:57 +01:00