Commit Graph

25 Commits

Author SHA1 Message Date
Ben Kelly
bd2ac6606b Bug 1212904 P4 Set channel tainting in FetchEvent.respondWith(). r=ehsan 2015-10-22 11:07:32 -07:00
Nathan Froyd
e4e2da55c9 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
Bobby Holley
cdb57c12e7 Bug 1189668 - Expose GetUnfilteredUrl on InternalResponse. r=ehsan 2015-09-20 00:32:14 -07:00
Ben Kelly
c526c6fd5e Bug 1184607 P2 Update Request and Response DOM objects for new redirect model. r=nsm 2015-08-31 14:26:29 -07:00
Antonio de Luna Lopez
1978833c40 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
Birunthan Mohanathas
47ed3a3675 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
ceb6e00867 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.
2015-06-04 21:39:34 -07:00
Ben Kelly
8606edd8de Bug 1167808 P0 Cache.put() should use internal body of opaque Response. r=nsm 2015-06-12 18:59:01 -07:00
Ehsan Akhgari
170eef9b5a Bug 1173029 - Remove mFinalURL from InternalResponse; r=baku a=KWierso 2015-06-09 20:08:09 -04:00
Wes Kocher
1743ba7608 Backed out changeset e33db57c3fec (bug 1173029) 2015-06-09 15:16:30 -07:00
Ehsan Akhgari
f4ffa1a9b5 Bug 1173029 - Remove mFinalURL from InternalResponse; r=baku a=KWierso 2015-06-09 17:17:59 -04:00
Ehsan Akhgari
021ed38d58 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 2015-05-27 14:22:53 -04:00
Carsten "Tomcat" Book
ef72c48967 Backed out changeset ae9c77fa58d1 (bug 1168208) for bustage on a CLOSED TREE 2015-05-27 14:50:43 +02:00
Ehsan Akhgari
7c178923f2 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 2015-05-27 08:25:03 -04:00
Andrew McCreight
c979f253c0 Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -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
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
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
Ben Kelly
3869f5c2b9 Bug 1073231 Implement Request and Response Clone() methods. r=nsm r=baku 2015-02-19 20:24:24 -05:00
Nikhil Marathe
6f344d4c40 Bug 1126815 - Implement Response.finalURL. r=bkelly,baku 2015-02-17 10:23:34 -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
Nikhil Marathe
4820ff89e2 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
61e3edff9e Bug 1039846 - Split Headers into InternalHeaders. r=baku
--HG--
extra : rebase_source : 1b7e0a27e44f1e11ed84de7be18a19155d6750d5
2014-10-02 10:59:20 -07:00
Nikhil Marathe
65750f3bb9 Bug 1039846 - Response implementation. r=baku
--HG--
extra : rebase_source : 0da394758a5ccf6c1fe87d1a51ed0c4c27d9350e
2014-09-26 16:41:15 -07:00