Commit Graph
110 Commits
Author SHA1 Message Date
Kyle Huey a9cf047227 Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Boris Zbarsky ac6d82be86 Bug 1265970. When throwing an exception from XHR open() due to not being in an active document, make sure it's an InvalidStateError. r=smaug 2016-04-20 18:05:58 -04:00
Boris Zbarsky bfd08427a1 Bug 1265072 part 2. Get rid of uses of GetDocumentFromScriptContext in XMLHttpRequest code. r=smaug 2016-04-20 18:04:36 -04:00
Shawn Huang d9e934780b Bug 918707 - Return syntax error if url is invalid, r=khuey 2016-04-03 20:33:04 +08:00
Boris Zbarsky 679821ced0 Bug 1257335. Replace some AutoSafeJSContext uses with AutoJSAPI or AutoJSContext uses. r=bholley
In general, using an AutoJSAPI inited with an object is NOT the same as using
AutoSafeJSContext (or AutoJSAPI inited without an object) and then entering the
compartment of the object: the former will report exceptions to the global of
the object as it comes off the stack, while the latter will not.  This only
really matters if we have an object from a window or worker global and hence
might fire error events, or report internal stuff to the web console.

The changes to initing with an object made in this bug are OK for the following
reasons:

1) dom/base/Console.cpp: Always clears its exception before coming off the stack.
2) dom/base/nsDOMClassInfo.cpp: Inits with a non-web global.
3) dom/base/nsFrameMessageManager.cpp: Inits with a non-web global.
4) dom/media/MediaPermissionGonk.cpp: We probably want the caller to notice if
   anything here throws.
5) dom/xbl/nsXBLPrototypeBinding.cpp: Inits with a non-web global.
6) dom/xul/nsXULElement.cpp: Inits with a non-web global.
7) extensions/pref/autoconfig/src/nsJSConfigTriggers.cpp: Inits with a non-web global.
8) ipc/testshell/XPCShellEnvironment.cpp: Inits with a non-web global.
2016-03-18 10:48:38 -04:00
Stone Shih 72043987aa Bug 1255597 - Part 2: Follow spec to modify the content-type check conditions which determine parsing XHR body or not. r=khuey 2016-03-16 14:02:34 +08:00
Stone Shih ea1fab61a3 Bug 1255597 - Part 1: Remove redundent trailing spaces. r=khuey 2016-03-16 11:38:27 +08:00
Shawn Huang 2df2c0f7c0 Bug 918706 - Return NS_ERROR_DOM_SYNTAX_ERR if method is invalid, r=khuey 2016-03-17 15:29:42 +08:00
Ehsan Akhgari 48717d6102 Bug 1251872 - Part 1: Implement Request.referrerPolicy; r=jdm 2016-03-03 16:43:55 -05:00
Boris Zbarsky c1a4d94725 Bug 1251627. Fix XMLHttpRequest.send() to follow the spec better in terms of the exceptions it throws. r=khuey 2016-02-26 21:15:56 -05:00
Andrew McCreight 9f6b653800 Bug 1247679, part 3 - Replace NS_IMPL_CYCLE_COLLECTION_TRACE_JSVAL_MEMBER_CALLBACK with JS_MEMBER. r=smaug 2016-02-22 10:11:02 -08:00
Honza Bambas 2fa9798995 Bug 1248049 - Don't HTTP cache XHR POSTs, r=jdm 2016-02-16 09:34:00 +01:00
Jeff Walden 4209e4468d Bug 1079844 - Additional changes to use detachment terminology for ArrayBuffers rather than obsolete neutering terminology. r=bz 2016-01-28 16:09:12 -08:00
Kyle Huey e95edb30a9 Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Andrea Marchesini 690125fc21 Bug 1221320 - XMLHttpRequest authentication should not require auth prompt dialog, r=honzab.moz 2015-12-30 18:47:55 +00:00
Andrea Marchesini 1fb0a041e9 Bug 1237674 - Rename nsFormData to mozilla::dom::FormData, r=smaug 2016-01-07 19:30:36 +00:00
Jonas Sicking dc7114ec7f Bug 1216687: Add nsILoadInfo flags for cookie policies. r=ckerschb 2015-12-06 18:33:15 -05:00
Jonas Sicking 2d5d18d181 Bug 1226909 part 4: Make AsyncOpen2 set taining information on channels. Use this information in XHR and fetch(). r=bkelly 2015-12-06 18:33:15 -05:00
Jonas Sicking 736f70081e Bug 1226909 part 3: Move logic of when to initiate CORS preflight into channels. Allow CORS preflight to happen when doing a same-origin to cross-origin redirect. r=ckerschb 2015-12-06 18:33:14 -05:00
Jonas Sicking 59d2f1fb08 Bug 1226909 part 2: Let CORS preflight logic grab information from nsILoadInfo rather than duplicate it. r=ckerschb 2015-12-06 18:33:14 -05:00
Sebastian Hengst cdf4286868 Backed out changeset 09d64535bcda (bug 1216687), a7f1a289dd78, 4dbf06183e6c, 26318a5e3006, 9ae2af3cf86d (bug 1226909) for M(1,2,5) oranges. r=backout 2015-12-05 16:34:47 +01:00
Jonas Sicking ed83817753 Bug 1216687: Add nsILoadInfo flags for cookie policies. r=ckerschb 2015-12-05 01:46:21 -08:00
Jonas Sicking 43dffbee2a Bug 1226909 part 4: Make AsyncOpen2 set taining information on channels. Use this information in XHR and fetch(). r=bkelly 2015-12-05 01:46:20 -08:00
Jonas Sicking cd1c0c2552 Bug 1226909 part 3: Move logic of when to initiate CORS preflight into channels. Allow CORS preflight to happen when doing a same-origin to cross-origin redirect. r=ckerschb 2015-12-05 01:46:20 -08:00
Jonas Sicking 72e95852c2 Bug 1226909 part 2: Let CORS preflight logic grab information from nsILoadInfo rather than duplicate it. r=ckerschb 2015-12-05 01:46:20 -08:00
Andrea Marchesini 1fc29e872d Bug 1230509 - BlobImplFile should return false in IsDateUnknown and IsSizeUnknown, r=bz 2015-12-04 21:15:46 +00:00
Wes Kocher 40790f0652 Backed out changeset b3cfca056388 (bug 1230509) for build bustage CLOSED TREE 2015-12-04 10:50:17 -08:00
Andrea Marchesini e65c8e2ff7 Bug 1230509 - BlobImplFile should return false in IsDateUnknown and IsSizeUnknown, r=bz 2015-12-04 18:18:21 +00:00
Francois Marier 28eb383488 Bug 1216793 - check against tracking protection list in XHR. r=gcp 2015-11-30 16:28:14 -08:00
Jonas Sicking c28d8f0b89 Bug 1223647: CSP erroneously inherited into dedicated workers. r=ckerschb 2015-11-10 21:16:12 -08:00
Wes Kocher c905fb981f Backed out changeset d12f758f5f36 (bug 1223647) for android csp test failures 2015-11-11 14:27:52 -08:00
Jonas Sicking 3f479a6277 Bug 1223647: CSP erroneously inherited into dedicated workers. r=ckerschb 2015-11-10 21:16:12 -08:00
Phil Ringnalda 14ceb711fc Back out changeset 4d6d9c1e52e4 (bug 1223647) for failures in test_csp.html, csp/test_redirects.html and csp/test_worker_redirect.html 2015-11-10 23:10:04 -08:00
Jonas Sicking 61caa9a1d8 Bug 1223647: CSP erroneously inherited into dedicated workers. r=ckerschb 2015-11-10 21:16:12 -08:00
Kyle Huey 8f8794e1c7 Bug 1216401: Eviscerate nsIDOMWindow, move still needed methods to nsPIDOMWindow. r=bz 2015-10-26 14:37:32 -07:00
Ben Kelly 19ba20a93e Bug 1212904 P5 Make XHR respect channel tainting. r=ehsan r=sicking 2015-10-22 11:07:32 -07:00
Michael Layzell 9d1af8b07f Bug 918771 - Part 2: Send text/html as MIME type for XHR send() of HTML document, r=bz 2015-10-20 15:54:15 -04:00
Jonas Sicking 3acd502b94 Bug 1182571: Followup bustage fix from merge fail. CLOSED TREE 2015-10-19 11:48:41 -07:00
Jonas Sicking 75a8ce6b99 Bug 1182571: Make nsXMLHttpRequest use AsyncOpen2. r=ehsan 2015-10-19 11:14:54 -07:00
Nathan Froyd 4e6d8f6705 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
Wes Kocher 4f2d5be924 Backed out 2 changesets (bug 1182571) for being a likely cause of the Android S4 errors
Backed out changeset e2b3064dcace (bug 1182571)
Backed out changeset 8153ae231d16 (bug 1182571)
2015-10-15 14:07:06 -07:00
Jonas Sicking 1d2c6e4ee0 Bug 1182571: Make nsXMLHttpRequest use AsyncOpen2. r=ehsan 2015-10-15 12:18:21 -07:00
Michael Layzell 46503fc4c6 Backout of bug 1207233 due to web-compat concerns 2015-10-14 16:06:35 -04:00
sajitk 448fec6699 Bug 1201740 - Prevent interception if the request is a System XHR. r=bkelly 2015-10-11 18:13:09 +02:00
Michael Layzell f93a8e2029 Bug 1207233 - Don't provide a default content-type header if user calls XHR.setRequestHeader('Content-Type', ''), r=jduell 2015-09-24 16:54:11 -04:00
Michael Layzell ed0c72a084 Bug 918742 - Correct handling of author-supplied charsets in XMLHttpRequest, r=bz 2015-09-22 12:26:15 -04:00
Patrick McManus e2f929f7a8 bug 1187239 - ontransportstatus SENDING_TO should not use request stream re-entrantly r=hurley r=bz 2015-09-15 18:12:37 -04:00
Ehsan Akhgari 3c97b19f05 Bug 1199049 - Part 9: Use Necko-level CORS preflights in XHR; r=jdm 2015-09-12 19:21:07 -04:00
Jon Droniak ec130499a1 Bug 1199796 - Refactor Request and XHR request method validation. r=nsm 2015-09-11 11:26:33 -07:00
Ehsan Akhgari 96c22aa054 Bug 815299 - Part 3: Accept empty HTTP headers in XHR; r=jdm 2015-09-09 07:54:33 -04:00