Commit Graph

55 Commits

Author SHA1 Message Date
Ehsan Akhgari
98a69d988d Bug 1209081 - Part 1: Implement the "navigate" value for RequestMode; r=bkelly 2016-01-19 17:46:10 -05:00
Thomas Kuyper
cb305b46c9 Bug 1184550 - Move the check for bodyUsed before the check for a null body so subsequent fetches with the same Request fail. r=bkelly 2016-01-14 08:57:00 -05:00
Boris Zbarsky
c21487b86d Bug 1224596 part 14. Switch URL to using the new WorkerMainThreadRunnable::Dispatch signature. r=baku 2015-11-24 00:04:21 -05:00
Andrea Marchesini
1456433941 Bug 1213815 - dom/webidl/HTMLHyperlinkElementUtils and URL don't need to throw exceptions as we did before, r=bz 2015-11-23 20:05:26 +00:00
Boris Zbarsky
acc5dadcf3 Bug 1226479. Change ErrorResult::ThrowTypeError/ThrowRangeError to take string references, not pointers. r=mccr8 2015-11-20 13:36:46 -05:00
Birunthan Mohanathas
f6aa64ea3b Bug 1219392 - Capitalize mozilla::unused to avoid conflicts. r=froydnj 2015-11-02 07:53:26 +02:00
Ehsan Akhgari
6acbfcdd86 Bug 1216697 - Unship Request.cache until the implementation is finished; r=bzbarsky 2015-10-23 15:38:47 -04:00
Jonas Sicking
1c44b49b67 Bug 1215746: Remove RequestMode::Cors_with_forced_preflight. r=bkelly 2015-10-19 18:24:36 -07:00
Nathan Froyd
9c5965b035 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi
2015-10-18 01:24:48 -04:00
Andrew McCreight
c12e5e6826 Bug 1197893 - Check the number of arguments for ThrowTypeError() and ThrowRangeError() at compile time. r=peterv 2015-10-05 09:38:14 -07:00
Wes Kocher
e1026febc7 Backed out changeset 821791826960 (bug 1197893) for Nexus build failures CLOSED TREE 2015-10-02 16:17:05 -07:00
Andrew McCreight
7e945ebfa7 Bug 1197893 - Check the number of arguments for ThrowTypeError() and ThrowRangeError() at compile time. r=peterv 2015-10-02 15:09:02 -07:00
Andrew McCreight
cdc3ee4091 Backed out changeset 6fa9cdf4002b for breaking the build. 2015-10-02 10:49:28 -07:00
Andrew McCreight
5d0e76e23e Bug 1197893 - Check the number of arguments for ThrowTypeError() and ThrowRangeError() at compile time. r=peterv 2015-10-02 10:42:08 -07:00
Jon Droniak
5b61e43934 Bug 1199796 - Refactor Request and XHR request method validation. r=nsm 2015-09-11 11:26:33 -07:00
Ben Kelly
7120d6562c Bug 1184607 P2 Update Request and Response DOM objects for new redirect model. r=nsm 2015-08-31 14:26:29 -07:00
Emilio Cobos Álvarez
ae9dfd524f Bug 1195820 - Request constructor should throw TypeError if URL has credentials or parse fails. r=bkelly 2015-08-24 22:54:52 +02:00
Antonio de Luna Lopez
de40152198 Bug 1134609 -Make Fetch Request constructor less destructive to input on error r=bkelly 2015-08-10 12:06:00 -07:00
Antonio de Luna Lopez
8eb27fe442 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 2015-08-13 08:22:19 -07:00
Ehsan Akhgari
483c52b73f Bug 1188062 - Unship Request.context; r=baku 2015-07-30 08:14:00 -04:00
Birunthan Mohanathas
e52329c788 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
Nikhil Marathe
5142eb7562 Bug 1154268 - Fetch Request should not allow creating a GET request with a body by copying a PUT request. r=bkelly 2015-05-13 15:15:23 -07:00
Nikhil Marathe
b2627df572 Bug 1162411 - Fix Request CORS bug. r=bz 2015-05-07 15:39:13 -07:00
Wes Kocher
56c1471541 Backed out changeset 8635863a78c0 (bug 1162411) for mochitest-1 orange CLOSED TREE 2015-05-08 10:10:18 -07:00
Nikhil Marathe
df7efc6fa4 Bug 1162411 - Fix Request CORS bug. r=bz 2015-05-07 15:39:13 -07:00
Boris Zbarsky
b18f690e1e Bug 1161625. Use nsIURI, not dom::URL, to create URIs on main thread in fetch code. Also, use the entry settings document's base URI, not the callee document's document URI, as the base. r=nsm 2015-05-07 11:08:34 -04:00
Andrew McCreight
aeff7c99ee Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Nikhil Marathe
dff9cac1c8 Bug 931249 - patch 1 - Scriptloader use cache if needed. r=khuey 2015-03-19 11:41:42 -07:00
Nikhil Marathe
f70e012acf Bug 1109751 - Request and Response constructors should set mime type. r=baku 2015-02-03 12:59:32 -08:00
Wes Kocher
d642860643 Backed out 2 changesets (bug 1109751) for asan mochitest-3 failures
Backed out changeset 269ce19afa43 (bug 1109751)
Backed out changeset add6d1bd2e52 (bug 1109751)
2015-04-03 12:22:47 -07:00
Nikhil Marathe
e601432aec Bug 1109751 - Request and Response constructors should set mime type. r=baku 2015-02-03 12:59:32 -08:00
Ehsan Akhgari
03a382f926 Bug 1147699 - Part 1: Move Request::mContext to InternalRequest, and determine the mapping to nsContentPolicyType; r=nsm
As the documentation in InternalRequest.h in this patch shows, the
mapping between nsContentPolicyType and RequestContext is not complete
yet.  Because the InternalRequest object needs to know the actual
nsContentPolicyType in order for FetchDriver to be able to use that
information, we can't just store the RequestContext.  Therefore, this
patch adds both of these to InternalRequest.  Once we get to a stage
where we have a complete mapping of these values, we can store only one
of them and compute the other from it.  That requires addressing all of
the TODO comments in the InternalRequest.h documentation.
2015-03-30 08:42:31 -04:00
Andrew Overholt
94f82a7a06 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
Ehsan Akhgari
8c4969c729 Bug 1126819 - Part 1: Respect the RequestInit.cache member in Request's constructor; r=nsm 2015-03-23 15:46:57 -04:00
Nikhil Marathe
8b0d2b2ce4 Bug 1143857 - Add FormData serialize support to Fetch API. r=ehsan 2015-03-17 08:32:04 -07:00
Ben Kelly
29ec96ecff Bug 1073231 Implement Request and Response Clone() methods. r=nsm r=baku 2015-02-19 20:24:24 -05:00
Nikhil Marathe
15fdafd322 Bug 1119037 - Add context attribute to Request. r=baku
--HG--
extra : transplant_source : p%1Cr%13%ED%F8%B1%B8D%9B%DC5%C6%EFEQD%CC%A2l
2015-01-27 15:43:09 -08:00
Nikhil Marathe
bd0bc01fa2 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

--HG--
extra : rebase_source : 224da5d5f19387ffd95fc42c38a99b0e25427551
2015-01-16 13:08:19 -08:00
Nikhil Marathe
610be35159 Bug 1122194 - Follow method validation rules when constructing Request. r=baku,bkelly
--HG--
extra : amend_source : 78950befd29e5aff54956b3399993ade769a21c5
extra : transplant_source : c%B3%E0%87%E7Zdx%03%A6%AA%0A%1C%5E%A8%EF%95%FF%3D%86
2015-01-15 12:11:12 -08:00
Nikhil Marathe
9fc52a9946 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.

--HG--
extra : rebase_source : 3a70d53965def8fe02deec307367b9fda3458935
2015-01-07 16:24:40 -08:00
Ryan VanderMeulen
6a478380c4 Backed out changeset 88970726eb6b (bug 1119044) for Werror bustage. 2015-01-13 13:26:52 -05:00
Nikhil Marathe
b64f2f9031 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.

--HG--
extra : rebase_source : 0b621e13dc5cdbf740fb7d380f96f1380cd5a3eb
extra : amend_source : 7ced6d36ed7212271163c6aa1baacc7d5ca39647
2015-01-07 16:24:40 -08:00
Nikhil Marathe
7b7c33434e Bug 1109574 - Check for null body before setting bodyUsed in Request constructor. r=bkelly
--HG--
extra : transplant_source : %07%B8%B0%D1%ED%D4%C6N%09%09%86%04g%BD%ECs%B2%C6%09%18
2014-12-23 02:25:17 -08:00
Andrea Marchesini
8883a53fd9 Bug 1077393 - Rename ScalarValueString to USVString. r=smaug
--HG--
rename : dom/bindings/parser/tests/test_scalarvaluestring.py => dom/bindings/parser/tests/test_usvstring.py
rename : dom/bindings/test/test_scalarvaluestring.html => dom/bindings/test/test_usvstring.html
2014-11-20 12:58:00 +01:00
Nikhil Marathe
b8edaa21bb Bug 1039846 - Patch 4: FetchDriver with about:, blob: and data: fetching. r=baku
--HG--
extra : transplant_source : o%29%0E%5D%90%11%FA%1ExO%26%7E%9D_%F2%E7%0B%FE%21%B2
2014-10-06 11:01:20 -07:00
Nikhil Marathe
8dcf377e1f Bug 1071290 - Allow Blobs in Fetch BodyInit. r=baku
--HG--
extra : rebase_source : 412dffd78d5b0c4cddad58374bbe1dd051877c47
2014-10-09 10:52:10 -07:00
Nikhil Marathe
75ac0c5ce0 Bug 1039846 - Split Headers into InternalHeaders. r=baku
--HG--
extra : rebase_source : 1b7e0a27e44f1e11ed84de7be18a19155d6750d5
2014-10-02 10:59:20 -07:00
Nikhil Marathe
d0c78e97d1 Bug 1039846 - Response implementation. r=baku
--HG--
extra : rebase_source : 0da394758a5ccf6c1fe87d1a51ed0c4c27d9350e
2014-09-26 16:41:15 -07:00
Andrea Marchesini
2f672ff2db Bug 1047483 - patch 3 - Renaming DOMFile to File, r=ehsan
--HG--
rename : content/base/public/nsDOMFile.h => content/base/public/File.h
rename : content/base/src/nsDOMFile.cpp => content/base/src/File.cpp
2014-10-08 17:15:23 +01:00
Andrea Marchesini
2ca496756f Bug 1047483 - patch 1 - Porting DOMFile/DOMBlob to WebIDL, r=bz, r=bkelly, r=bholley 2014-10-08 17:15:22 +01:00