Commit Graph

75 Commits

Author SHA1 Message Date
Andrew Overholt
644abc927a Bug 1127552 - Add Telemetry to Fetch. r=nsm
Note when the Fetch is coming from the main thread or a worker.  Also
count Requests just passed through a Service Worker.
2015-03-27 06:47:00 -04:00
Nikhil Marathe
047eaf5bd2 Bug 1146059 - Remove Response.finalURL. r=ehsan 2015-03-21 17:49:29 -07:00
Ehsan Akhgari
fc4715727f Bug 1126819 - Part 2: Persist the Request.cache attribute in DOM Cache; r=bkelly 2015-03-23 15:46:58 -04:00
Ehsan Akhgari
ffe4b75edd Bug 1126819 - Part 1: Respect the RequestInit.cache member in Request's constructor; r=nsm 2015-03-23 15:46:57 -04:00
Ben Kelly
11bd5c5e8b Bug 1110814 P0 Fully initialize Response before resolve Fetch promise. r=nsm 2015-03-22 02:52:12 -04:00
Ehsan Akhgari
5cccea6f0f Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Boris Zbarsky
988b8e01be Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp.  The
rest of this diff was generated by running the following commands:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 10:13:33 -04:00
Nikhil Marathe
2a34b5fd9c Bug 1144249 - fix fetch no-cors mode. r=bkelly
A no-cors mode request should not go through a nsCORSProxyListener, which can only handle same-origin and cors mode.

The test for no-cors was passing allowOrigin, which was converting it into a CORS request, which is why it was passing.

I also realized that it is port 8888 and not 8000, so fixed that in some of the redirect tests.
2015-03-17 08:47:04 -07:00
Nikhil Marathe
79a59984ee Bug 1143155 - Filtered response stores internal response and allows access to headers. r=bkelly 2015-03-17 08:47:01 -07:00
Nikhil Marathe
300f48b6dc Bug 1143857 - Add FormData serialize support to Fetch API. r=ehsan 2015-03-17 08:32:04 -07:00
Ehsan Akhgari
a6716636a9 Bug 1133763 - Part 8: Ensure that FetchEvent.respondWith works correctly on HTTPS requests with a cloned response; r=nsm 2015-03-13 14:37:27 -04:00
Ehsan Akhgari
0f129374d0 Bug 1133763 - Part 1: Remember the security info associated with HTTP fetches and record it inside InternalResponse; r=nsm 2015-03-13 14:37:14 -04:00
Nikhil Marathe
b703b8057c Bug 1140788 - Set headers to immutable. r=bkelly,ehsan 2015-03-07 18:54:41 -08:00
Nikhil Marathe
7ea1877f6f Bug 1133861 - Enable the Fetch API by default. r=jst 2015-02-22 01:52:10 -08:00
Nikhil Marathe
c0e0338d2d Bug 1133861 - Bustage fix. a=bustage CLOSED TREE 2015-03-05 12:16:18 -08:00
Nikhil Marathe
4e18b2e4d6 Bug 1139665 - Check content load policy in FetchDriver. r=baku 2014-10-14 16:36:58 -07:00
Honza Bambas
2366ec9960 Bug 1130803 - Use non-blocking input for Fetch synthetization pipe, r=bkelly,ehsan 2015-03-03 10:16:00 +01:00
Ben Kelly
a109968291 Bug 940273 -Part 1 - Fetch changes from maple twig to support Service Worker Cache. r=nsm,ehsan 2015-03-02 14:08:00 +01:00
Ben Kelly
3869f5c2b9 Bug 1073231 Implement Request and Response Clone() methods. r=nsm r=baku 2015-02-19 20:24:24 -05:00
Josh Matthews
c8749efb5f Bug 1065216 - Dispatch a fetch event to workers when controlled pages initiate a network load. r=baku,mayhemer,smaug 2015-02-18 20:34:29 -05:00
Nikhil Marathe
6f344d4c40 Bug 1126815 - Implement Response.finalURL. r=bkelly,baku 2015-02-17 10:23:34 -08:00
Ryan VanderMeulen
3759ea0732 Backed out changeset 25f90464e93b (bug 1065216) for Android mochitest failures. 2015-02-18 16:00:33 -05:00
Josh Matthews
58c1eb50b9 Bug 1065216 - Dispatch a fetch event to workers when controlled pages initiate a network load. r=baku,mayhemer,smaug 2015-02-18 14:10:52 -05:00
Dhi Aurrahman
a3d52372b7 Bug 1125766 - Throw proper error types for TextEncoder(), TextDecoder() and TextDecoder.decode(). r=bz 2015-02-04 18:46:26 +07:00
Nikhil Marathe
b399440ce2 Bug 1124638 - Allow chrome to set Request context. r=baku 2015-01-27 16:02:12 -08:00
Nikhil Marathe
f974b823e3 Bug 1119037 - Add context attribute to Request. r=baku 2015-01-27 15:43:09 -08:00
Mike Hommey
50e6916b40 Bug 1126593 - Add a global fallible instance, so that using fallible works directly, everywhere. r=njn 2015-02-02 09:56:13 +09:00
Nikhil Marathe
72c4dc1a37 Bug 1126483 - Added Response.ok. r=baku,bkelly 2015-01-27 17:34:34 -08:00
Nikhil Marathe
25784bf67f Bug 1122677 - Disallow request body when method is HEAD/GET.
Spec bug https://www.w3.org/Bugs/Public/show_bug.cgi?id=27846
and :annevk OKed putting the check in the constructor and throwing http://logs.glob.uno/?c=content#c259382
2015-01-16 13:08:19 -08:00
Nikhil Marathe
a74d0f5ce3 Bug 1122258 - Fetch API: Set anonymous flag on channel if no credentials are to be passed. 2015-01-15 14:28:14 -08:00
Nikhil Marathe
7e7584b02d Bug 1109742 - Fix Body.json() error rejection. r=baku 2014-12-04 14:06:45 -08:00
Nikhil Marathe
2a1d50f3dd Bug 1121682 - fetch() should reject with TypeError 2015-01-14 13:43:27 -08:00
Ehsan Akhgari
ceca8787f1 Bug 1125178 - Mark some functions in dom as override; r=baku 2015-01-23 14:27:12 -05:00
Nikhil Marathe
f9d7b7576c Bug 1122194 - Follow method validation rules when constructing Request. r=baku,bkelly 2015-01-15 12:11:12 -08:00
Nikhil Marathe
c5d867ffe6 Bug 1119026 - Respect skip serviceworker flag. r=baku,bkelly 2014-12-24 02:08:41 -08:00
Nikhil Marathe
905b0da674 Bug 1112922 - Implement request referrer correctly in Fetch API. r=bkelly 2014-12-23 07:56:19 -08:00
Tejas Srinivasan
7bffd8f3f8 Bug 1120652 - Remove MainThreadFetchResolver::OnResponseEnd() and provide an empty definition in the parent class FetchDriverObserver. r=nsm 2015-01-14 23:59:00 -05:00
Nikhil Marathe
86e81d17de Bug 1119021 - Implement fetch() redirects correctly. r=bkelly 2015-01-07 13:47:18 -08:00
Nikhil Marathe
03579a2217 Bug 1119021 - CORS credentials tests. r=bkelly
Allow request to continue when useCredentials is set.
2015-01-05 15:43:54 -08:00
Nikhil Marathe
1941238a33 Bug 1119021 - CORS support. r=baku,bkelly
Use nsCrossSiteListenerProxy.h helpers to implement CORS support.
Several CORS fixes and lots of CORS tests.

Fixes:
Use empty string stream if response has no stream.
Parse Access-Control-Expose-Headers correctly.
Copy over remaining InternalRequest constructor attributes and set unsafe request flag.
Call FailWithNetworkError() in more cases.
Add non-simple Request headers to unsafeHeaders list for CORS check.
Do not AsyncOpen channel directly when CORS preflight is required.
Fix check for simple request method (was checking the opposite condition).
2015-01-07 15:50:54 -08:00
Nikhil Marathe
7037245306 Bug 1112073 - Linux non-unified build bustage fix. a=bustage 2015-01-14 14:01:02 -08:00
Nikhil Marathe
5fc3ba0a7e Bug 1112073 - Implement Response.redirect. r=baku,bkelly 2014-12-26 09:44:09 -08:00
Nikhil Marathe
2c90ec50fb Bug 1119044 - Fetch API WebIDL Fixes. r=bkelly,baku
Add various [SameObject]/[NewObject] annotations.
Adds RequestCache enum.
Ensures that cors-with-forced-preflight is translated to cors in getter.
Reject cors-with-forced-preflight as a valid mode value in Request constructor.
2015-01-07 16:24:40 -08:00
Ryan VanderMeulen
b82b313197 Backed out changeset 88970726eb6b (bug 1119044) for Werror bustage. 2015-01-13 13:26:52 -05:00
Nikhil Marathe
75f5a806a9 Bug 1119044 - Fetch API WebIDL Fixes. r=bkelly,baku
Add various [SameObject]/[NewObject] annotations.
Adds RequestCache enum.
Ensures that cors-with-forced-preflight is translated to cors in getter.
Reject cors-with-forced-preflight as a valid mode value in Request constructor.
2015-01-07 16:24:40 -08:00
Nikhil Marathe
a8799f4e4c Bug 1115214 - Fetch API: Always consume body asynchronously. r=baku 2014-12-23 21:47:17 -08:00
Nikhil Marathe
7d4e9dbdc2 Bug 1109574 - Check for null body before setting bodyUsed in Request constructor. r=bkelly 2014-12-23 02:25:17 -08:00
Nikhil Marathe
6b707411fc Bug 1039846 - Patch 7: Create channel with a loadgroup. r=baku,bkelly 2015-01-08 08:55:05 -08:00
Nikhil Marathe
8ba96bbf1d Bug 1039846 - Patch 5.1: Set request upload stream and headers. r=baku,bkelly 2014-12-09 22:35:22 -08:00
Nikhil Marathe
5efcea65d0 Bug 1039846 - Patch 5: FetchDriver basic HTTP fetch support. r=baku,bkelly
This patch has the following big pieces:
HTTP support in FetchDriver, which requires the principal of the caller to be passed.
Managing worker lifetime when a fetch() call is in progress.
Managing worker lifetime when a Response body is being read.
Using nsIPipe to link network streams to Request/Response body streams.
Using nsIInputStreamPump to convert Request/Response body streams into respective types.

Folded:
Bug 1039846 - Fetch API: Use a pipe to immediately start writing HTTP body data to InternalResponse.
Bug 1039846 - Assert bodystream can be set only once
Bug 1039846 - Add feature when handling fetch responses on workers
Bug 1039846 - Try to retarget http fetch delivery off main thread.
Bug 1039846 - Safely consume body using nsIInputStreamPump on workers and main thread.
Bug 1039846 - Retarget body reading to stream transport service.
2014-12-10 00:51:59 -08:00