Commit Graph

174 Commits

Author SHA1 Message Date
Thomas Nguyen
b169621e2e Bug 1264792 - Update request'referrer policy when redirect.r=bkelly,dragana.
MozReview-Commit-ID: 3V6W0fuRomZ

--HG--
extra : rebase_source : 4b708f9646ea42ef40c60ba0b7a86e14edf621e3
2016-11-14 15:15:32 +08:00
Ben Kelly
a0edcc6fcb Bug 1316837 P2 Verify that navigating to a window with an iframe right after sync xhr does not trigger assertions. r=smaug 2016-11-14 12:51:44 -08:00
Shawn Huang
71456ae11e Bug 1308341 - Don't fire the progress event if the length is 0, r=baku 2016-11-08 17:45:36 +08:00
Sebastian Hengst
a04cf6e9b3 Bug 1310297 - Remove test annotations using b2g, mulet or gonk: dom/xhr. r=RyanVM
MozReview-Commit-ID: KWTQ2seiv9C

--HG--
extra : rebase_source : 5f548637a3837c37a129dce8573992ad38291bbc
2016-11-05 11:29:18 +01:00
Ben Kelly
0983850a63 Bug 1303167 P6 Rename new suspend and freeze methods to final names. r=smaug 2016-10-26 10:20:16 -07:00
Ben Kelly
bf0ca72f77 Bug 1303167 P2 Use new window suspend and freeze methods. r=smaug
* * *
Bug 1303167 P2 interdiff 0001 Review feedback
2016-10-26 10:20:15 -07:00
Lars T Hansen
9f439ac1de Bug 1302036 - DOM changes to conform to new JS engine API for cloning. r=baku
--HG--
extra : rebase_source : bc9bda42eb0769f2fe76d702a41278e01bb497d7
2016-10-24 15:14:45 +02:00
Jon Coppeard
556585c65f Bug 1297558 - Remove explicit calls to Expose*ToActiveJS r=mccr8 2016-10-18 17:58:19 +01:00
Andrea Marchesini
9215b7b957 Bug 1307122 - Introducing a timeout for sync XHR when unload events are dispatched, r=smaug 2016-10-16 08:46:10 +02:00
Andrea Marchesini
68662fa565 Bug 1308073 - Remove app:// specific special cases in XHR, r=ehsan 2016-10-11 19:00:55 +02:00
Andrea Marchesini
9d453d6ef0 Bug 1306235 - XHR should set lengthComputable only if total value is set, r==smaug 2016-10-06 16:13:08 +02:00
Phil Ringnalda
6a7decdac1 Backed out changeset cf588a950083 (bug 1306235) for failures in at least test_xhr_progressevents.html and test_blobconstructor.html
MozReview-Commit-ID: HJlw9w1quhu
2016-10-03 23:30:44 -07:00
Andrea Marchesini
6e5e949e82 Bug 1306235 - XHR should set lengthComputable only if total value is set, r=wisniewskit, r=smaug 2016-10-04 07:31:26 +02:00
Andrea Marchesini
1f9a415918 Bug 1300552 - XMLHttpRequestWorker::EventRunnable must update stateData also after an abort(), r=ehsan 2016-10-03 10:41:27 +02:00
Andrea Marchesini
a509619370 Bug 1202006 - Memory Blob to Temporary File - part 5 - tests, r=smaug 2016-09-29 07:13:41 +02:00
Andrea Marchesini
c69e585e9c Bug 1202006 - Memory Blob to Temporary File - part 4 - Temporary File, r=smaug 2016-09-29 07:12:56 +02:00
Andrea Marchesini
e089417459 Bug 1202006 - Memory Blob to Temporary File - part 3 - BlobSet and MutableBlobStorage for XHR, r=smaug 2016-09-29 07:12:37 +02:00
Andrea Marchesini
5ab2cd6e5c Bug 1202006 - Memory Blob to Temporary File - part 1 - MutableBlobStorage for XHR, r=smaug
--HG--
rename : dom/base/BlobSet.cpp => dom/base/MutableBlobStorage.cpp
rename : dom/base/BlobSet.h => dom/base/MutableBlobStorage.h
2016-09-29 07:12:00 +02:00
Thomas Wisniewski
c190891418 Bug 1303121 - Do not fire one last progress event on XHR errors, to match a spec change. r=annevk
--HG--
extra : rebase_source : 9a59934cfe8fc7f2ee8ef7788813f97e2355ce2a
2016-09-28 13:05:32 -04:00
Thomas Wisniewski
778b8e1ef7 Bug 1300986 - Improve exception messages for XMLHttpRequest. r=smaug
--HG--
extra : rebase_source : 911c543155d894f106b4e32599db89da4d781add
2016-09-28 13:04:17 -04:00
Carsten "Tomcat" Book
65a03894a6 Backed out changeset 218abd044ee6 (bug 1202006) for bustage 2016-09-28 15:04:02 +02:00
Carsten "Tomcat" Book
c2b119130d Backed out changeset abd96b988887 (bug 1202006) 2016-09-28 15:03:50 +02:00
Carsten "Tomcat" Book
6e58dff2dc Backed out changeset 13637a65df3b (bug 1202006) 2016-09-28 15:03:48 +02:00
Carsten "Tomcat" Book
e97bf32979 Backed out changeset 2d109b8a96f0 (bug 1202006) 2016-09-28 15:03:47 +02:00
Andrea Marchesini
36f19e0ec4 Bug 1202006 - Memory Blob to Temporary File - part 5 - tests, r=smaug 2016-09-28 14:39:25 +02:00
Andrea Marchesini
47460d0a88 Bug 1202006 - Memory Blob to Temporary File - part 4 - Temporary File, r=smaug 2016-09-28 14:39:03 +02:00
Andrea Marchesini
72971c7e62 Bug 1202006 - Memory Blob to Temporary File - part 3 - BlobSet and MutableBlobStorage for XHR, r=smaug 2016-09-28 14:38:41 +02:00
Andrea Marchesini
6420171857 Bug 1202006 - Memory Blob to Temporary File - part 1 - MutableBlobStorage for XHR, r=smaug
--HG--
rename : dom/base/BlobSet.cpp => dom/base/MutableBlobStorage.cpp
rename : dom/base/BlobSet.h => dom/base/MutableBlobStorage.h
2016-09-28 14:37:54 +02:00
Phil Ringnalda
398815ad9b Backed out changeset 490c671f8047 (bug 1303121) for failures in test_CrossSiteXHR.html 2016-09-27 22:39:00 -07:00
Thomas Wisniewski
fb058e68f6 Bug 1303121 - Do not fire one last progress event on XHR errors, to match a spec change. r=annevk 2016-09-15 14:19:23 -04:00
Ryan VanderMeulen
10262ed0cb Backed out changeset 4bdbbae12cb3 (bug 918719) for causing webcompat issues.
--HG--
extra : rebase_source : 58d99de7d9ee9e32383b9d18e4fb80a1bc59d0ad
2016-09-27 15:58:01 -04:00
Ehsan Akhgari
0baf8d2b40 Bug 1300908 - Avoid using expanded principals as the loading principal of XHR; r=smaug 2016-09-27 14:11:28 -04:00
Boris Zbarsky
7afde49b04 Bug 1096267. Stop calling into the nsIInputStream overload of XMLHttpRequest.send() if a random object is passed in (except in chrome code, where we will keep doing that). r=smaug 2016-09-22 16:58:37 +01:00
Thomas Wisniewski
3c6249dd4b Bug 884693 - Do not log console warnings for XHR parse failures if HTTP status is 204 or 304. r=smaug 2016-09-21 13:48:05 -04:00
Iris Hsiao
a2a48a3de7 Backed out changeset 6fb622c938de (bug 884693) for crashed @mozilla::dom::XMLHttpRequestMainThread
CLOSED TREE
2016-09-21 13:00:50 +08:00
Thomas Wisniewski
d65949bf5c Bug 884693 - Do not log console warnings for XHR parse failures if HTTP status is 204 or 304. r=smaug 2016-09-19 19:36:03 -04:00
Andrea Marchesini
4f62933f76 Bug 1303095 - XMLHttpRequestString should be fallible, r=mccr8 2016-09-16 00:09:17 +02:00
Thomas Wisniewski
3ad210d9fd Bug 1302623 - Refactor XHR.open() methods to remove use of Optionals and correct auth handling. r=smaug
--HG--
extra : amend_source : b042192a0a0e75deb486beb1e503726c262daba7
2016-09-14 14:50:58 -04:00
Ben Kelly
3ef8365a49 Bug 1300658 P6 Fix one place XHR used NS_DispatchToMainThread() directly from a worker. r=baku 2016-09-13 20:14:02 -07:00
Thomas Wisniewski
3cf91c9343 Bug 918719 - Only fire one loading readystatechange per XHR, but keep the old behavior available behind the preference dom.send_multiple_xhr_loading_readystatechanges. r=smaug
--HG--
extra : rebase_source : 296943a67ae8bd3065749cc424a4379320169585
2016-09-12 22:39:01 -04:00
Wes Kocher
17b9381e0b Backed out 6 changesets (bug 1300658) for frequent Windows VM Xpcshell failures a=backout
Backed out changeset 6cf3a60640cf (bug 1300658)
Backed out changeset c74062a27462 (bug 1300658)
Backed out changeset 39fbc61739ef (bug 1300658)
Backed out changeset 0b9d70b040a2 (bug 1300658)
Backed out changeset 4e921d61f036 (bug 1300658)
Backed out changeset 56496fad6494 (bug 1300658)
2016-09-12 16:34:08 -07:00
Thomas Wisniewski
b8a8b73745 Bug 933759 - Match the spec's IDL for the XHR open method. r=baku
--HG--
extra : rebase_source : 0fec6c032b30736c8979657e3b87db5ca630df6c
2016-09-12 09:48:30 -04:00
Ben Kelly
0e348cdbc6 Bug 1300658 P6 Fix one place XHR used NS_DispatchToMainThread() directly from a worker. r=baku 2016-09-12 12:32:21 -07:00
Ben Kelly
a8a4ae3c4f Backout rev 5c7368370ff9 to 980659720b86 (bug 1300118 and bug 1300658) for incorrect bug number in commit message. r=me 2016-09-12 12:29:17 -07:00
Ben Kelly
887715c350 Bug 1300658 P6 Fix one place XHR used NS_DispatchToMainThread() directly from a worker. r=baku 2016-09-12 11:21:02 -07:00
Andrea Marchesini
e222ca7109 Bug 1249739 - Improve performance in XHR in workers - part 4 - Correct cleaning cache for XHR.responseText, r=me 2016-09-12 10:59:10 +02:00
Andrea Marchesini
284e7077e7 Bug 1249739 - Improve performance in XHR in workers - part 3 - Implement XMLHttpRequestStringSnapshot, r=smaug 2016-09-12 09:06:33 +02:00
Andrea Marchesini
def1f6e7db Bug 1249739 - Improve performance in XHR in workers - part 2 - Implement XMLHttpRequestString, r=smaug 2016-09-12 09:06:06 +02:00
Andrea Marchesini
c9c3bfe617 Bug 1249739 - Improve performance in XHR in workers - part 1 - XHR.responseText must be cached, r=smaug 2016-09-12 09:05:42 +02:00
Phil Ringnalda
b33391adc0 Back out ec584a62ec26 (bug 918719) for Android failures in test_bug918719.html 2016-09-08 19:02:30 -07:00
Eric Rahm
1336ff37a4 Bug 1287292 - Use fallible unicode conversion in XHR. r=baku
When sending a string via XHR use fallible conversion to avoid OOMing if
content provides a particularly large string.
2016-09-08 16:50:38 -07:00
Thomas Wisniewski
89a07725ed Bug 918719 - Only fire one loading readystatechange per XHR, but keep the old behavior available behind the preference dom.send_multiple_xhr_loading_readystatechanges. r=smaug a=smaug
--HG--
extra : source : ea777ccca86cceeb53d2fc7252bea2a3bad3e405
2016-09-08 12:01:58 -04:00
Thomas Wisniewski
dadce88a58 Bug 918751 - Throw NetworkErrors instead of failures where appropriate for some XHR web platform tests. r=bz, r=keeler, r=Mossop, r=paul
--HG--
extra : rebase_source : 2d454dd6f7f66b0b2df44f6f4ce3740d8f6de04c
2016-09-03 18:45:08 -04:00
Andrea Marchesini
9d1b3fad07 Bug 1301062 - Fix a typo in XMLHttpRequestMainThread, r=me 2016-09-07 15:54:48 +02:00
Phil Ringnalda
5e5ec2b54f Merge m-c to m-i 2016-08-29 21:32:16 -07:00
Phil Ringnalda
064025c802 Backed out changeset b64d6f5b63db (bug 918751) for OS X permaorange in XMLHttpRequest/send-non-same-origin.sub.htm 2016-08-29 21:27:32 -07:00
Thomas Wisniewski
756abf6cfa Bug 289714 - Do not write <parsererror> nodes for invalid XML documents in XMLHttpRequests made by web content. r=billm, r=bz
--HG--
extra : rebase_source : 4cc87bbeca140953a90b31e1fd5b32098d37a2de
2016-08-29 16:30:36 -04:00
Thomas Wisniewski
4e499d41bb Bug 918751 - Throw NetworkErrors instead of failures where appropriate for some XHR web platform tests. r=bz, r=annevk
--HG--
extra : rebase_source : e5e744656e6ae819e7f4f9f01491ce1d2d2a40b7
2016-08-23 11:49:50 -04:00
Yoshi Huang
69ed1a79e4 Bug 1244340 - Part 2: add setOriginAttributes in nsIXMLHttpRequest. r=sicking
Add a ChromeOnly method called 'setOriginAttributes' on the XMLHttpRequest,
so that we can override the origin attributes for those XHRs running by XUL
(which will use System Principal).
2016-08-26 18:59:00 +08:00
Thomas Wisniewski
e1e1d36600 Bug 1296178 - Replace use of PR_MIN with std::max in XMLHttpRequestMainThread.cpp. r=mrbkap
--HG--
extra : rebase_source : 9cf1d363181a7d4f34a2a97ec644cf69d9ede627
2016-08-20 11:58:51 -04:00
Thomas Wisniewski
3bb3379361 Bug 1046816 - Hold/DropJSObjects properly in main thread XHR. r=smaug 2016-08-20 11:43:02 -04:00
Thomas Wisniewski
af30944201 Bug 1285036 - Part 11: Factor the actual fetch-related code out of XHR Send() and into its own function, InitiateFetch(). r=smaug 2016-08-18 20:16:00 -04:00
Thomas Wisniewski
6da709b668 Bug 1285036 - Part 10: Factor the request-header XHR code out into its own class. r=smaug 2016-08-18 20:15:37 -04:00
Ben Kelly
9d7b33a00b Bug 1293690 P2 Set explicit status levels to fail at when calling WorkerHolder::HoldWorker. r=baku 2016-08-18 07:11:04 -07:00
Phil Ringnalda
4083fafafc Backed out 10 changesets (bug 1290116, bug 1293690) for build bustage
CLOSED TREE

Backed out changeset bbc14d107fca (bug 1290116)
Backed out changeset a81b6ce5c25f (bug 1290116)
Backed out changeset e0b9c25b6125 (bug 1290116)
Backed out changeset 8e9a9ba04ce5 (bug 1290116)
Backed out changeset 2d5ad5e9ed20 (bug 1290116)
Backed out changeset eb7da0dbfc72 (bug 1290116)
Backed out changeset 6a4e8c92faae (bug 1290116)
Backed out changeset 0342d98afa10 (bug 1293690)
Backed out changeset d84b0768f0ce (bug 1293690)
Backed out changeset f9f62ade9508 (bug 1293690)
2016-08-17 21:16:43 -07:00
Ben Kelly
fa520e1fdd Bug 1293690 P2 Set explicit status levels to fail at when calling WorkerHolder::HoldWorker. r=baku 2016-08-17 20:01:35 -07:00
Thomas Wisniewski
b6193832b6 Bug 1295128 - Log attempts to use SetRequestHeader to set a forbidden header to the web console. r=mrbkap
--HG--
extra : rebase_source : 9d135eeac085afa8568e2ec00882ba4f691436e9
2016-08-16 11:32:49 -04:00
Andrea Marchesini
a183983968 Bug 1264053 - MessagePort should support transferable objects in multi-e10s, r=sfink, r=smaug, r=jorendorff, r=janv 2016-07-21 15:29:42 +02:00
Nicholas Nethercote
3b0485fcdb Bug 1294645 - Don't use NS_CALLBACK for callbacks in nsI{Input,Output,UnicharInput},Stream.idl. r=froydnj.
Slightly less than half (93 / 210) of the NS_METHOD instances in the codebase
are because of the use of NS_CALLBACK in
nsI{Input,Output,UnicharInput},Stream.idl. The use of __stdcall on Win32 isn't
important for these callbacks because they are only used as arguments to
[noscript] methods.

This patch converts them to vanilla |nsresult| functions. It increases the size
of xul.dll by about ~600 bytes, which is about 0.001%.

--HG--
extra : rebase_source : c15d85298e0975fd030cd8f8f8e54501f453959b
2016-08-12 17:36:22 +10:00
Jan de Mooij
c33bac8363 Bug 1292892 part 5 - Replace most nsContentUtils::RootingCx calls with dom::RootingCx. r=bz,terrence 2016-08-11 14:39:23 +02:00
Jan de Mooij
0ad12515f4 Bug 1292892 part 1 - Stop using JSRuntime outside SpiderMonkey. r=bz,terrence,fitzgen,kanru 2016-08-11 14:39:22 +02:00
Thomas Wisniewski
7e447a3ab2 Bug 1293881 - Revert a behavioral change introduced in bug 1285036 patch 7: header names set by SetRequestHeader should retain their case instead of being lowercased as the current XHR spec specifies. r=jimb 2016-08-09 19:43:26 -04:00
Nicholas Nethercote
e7f10a07fd Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.

As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.

--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
2016-08-08 12:18:10 +10:00
Thomas Wisniewski
95d1c98761 Bug 918703 - Part 2: Correct progress event logic so events are sent in the correct order and with the correct values according to spec. r=baku
--HG--
extra : rebase_source : da5305fdfb1b28404199733f68cb65803a087e38
2016-08-05 23:47:40 -04:00
Thomas Wisniewski
b5d3e2f660 Bug 918703 - Part 1: Remove MaybeDispatchProgressEvents() and have its callsites only do what they need to do, to make the XHR code more readable. r=baku
--HG--
extra : rebase_source : cd0b4dac215b5badd05f8dcbd52f76178efffbc9
2016-08-03 21:58:17 -04:00
Thomas Wisniewski
2869846cdb Bug 918752 - Override Accept request header to */* in XMLHttpRequest::Send() if it is not specified by the user. r=jst 2016-08-04 12:33:36 -04:00
Thomas Wisniewski
909bb6c298 Bug 1285036 - Part 9: Clean up the XHR send() API endpoints, and how nsIVariants are handled. r=baku 2016-08-01 14:28:01 -04:00
Thomas Wisniewski
4de0c5c74c Bug 1285036 - Part 8: Change XHR open() and related code to follow the spec more closely. r=baku 2016-07-20 13:02:36 -04:00
Thomas Wisniewski
30e540bdd6 Bug 1285036 - Part 7: Change SetRequestHeader() and related header code to follow the spec more closely. r=baku 2016-08-02 12:50:10 -04:00
Thomas Wisniewski
6a1fb99d2b Bug 709991 - Fire onerror instead of throwing on network errors for async XHRs. r=bz 2016-07-30 00:24:56 -04:00
Sebastian Hengst
5e128b818f Backed out changeset 41a51d368f38 (bug 1285036) for failing test browser_net_copy_as_curl.js. r=backout 2016-07-28 18:13:43 +02:00
Sebastian Hengst
8c31962656 Backed out changeset de078c2e0991 (bug 1285036) 2016-07-28 18:13:17 +02:00
Sebastian Hengst
e6b4c7693b Backed out changeset 6e6d55b02d19 (bug 1285036) 2016-07-28 18:13:13 +02:00
Thomas Wisniewski
16c863c9d6 Bug 1285036 - Part 9: Clean up the XHR send() API endpoints, and how nsIVariants are handled. r=baku
--HG--
extra : rebase_source : 6eb5919d4c4180c55089f0fd6dfcd728dbb52534
2016-07-21 00:36:26 -04:00
Thomas Wisniewski
978c16c644 Bug 1285036 - Part 8: Change XHR open() and related code to follow the spec more closely. r=baku
--HG--
extra : rebase_source : a40634c94d6a259a181028021b780140a7fdbf41
2016-07-20 13:02:36 -04:00
Thomas Wisniewski
468fef78cc Bug 1285036 - Part 7: Change SetRequestHeader() and related header code to follow the spec more closely. r=baku
--HG--
extra : rebase_source : 8d3491471156823c0f1c7c7adbcb0024494e13db
2016-07-27 16:03:42 -04:00
Tom Tromey
5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Thomas Wisniewski
30036214e5 Bug 1082790 - Remove the nsIScriptContext parameter from nsXMLHttpRequest::Init(). r=mrbkap
--HG--
extra : rebase_source : 8a2cfcedb9b3522dbb4485b37b3c7c6bc65a2d5b
2016-07-19 21:30:01 -04:00
Thomas Wisniewski
5b4240186c Bug 918734 - Throw invalid state errors when XHRs fail their CheckInnerWindowCorrectness() checks, to match the XHR spec. r=khuey
--HG--
extra : rebase_source : c8f7a5b05bc318464ffb9b3cae23ae7cb8a247ea
2016-07-18 01:38:03 -04:00
Thomas Wisniewski
340717ad42 Bug 447689 - clean up XMLHttpRequest::Open so XHR readyState=1 events are fired according to spec. r=baku
--HG--
extra : rebase_source : db3e4829a7f7b9cb3d1d9c179ef51c4845e840c3
2016-07-16 13:56:36 -04:00
Sebastian Hengst
3c68bf1407 Backed out changeset 9c0425073111 (bug 918703) for failing mochitest test_bug435425.html. r=backout 2016-07-17 12:56:43 +02:00
Sebastian Hengst
b8b5c17e71 Backed out changeset f52c26d677b0 (bug 918703) 2016-07-17 12:55:38 +02:00
Thomas Wisniewski
a87fc764c1 Bug 918703 - Part 2: Correct progress event logic so events are sent in the correct order and with the correct values according to spec. r=baku 2016-07-16 19:11:01 -04:00
Thomas Wisniewski
bea588b693 Bug 918703 - Part 1: Remove MaybeDispatchProgressEvents() and have its callsites only do what they need to do, to make the XHR code more readable. r=baku 2016-07-14 13:24:54 -04:00
Sebastian Hengst
bf244b578e Backed out changeset ff5028ff81cb (bug 447689) for assertion in test_worker_xhr_implicit_cancel.html in debug builds. r=backout 2016-07-16 18:26:08 +02:00
Thomas Wisniewski
0564cc02ae Bug 447689 - clean up XMLHttpRequest::Open so XHR readyState=1 events are fired according to spec. r=baku 2016-07-15 11:33:17 -04:00
Thomas Wisniewski
06e846446b Bug 1286744 - Return the empty string from GetAllResponseHeaders() if the XHR failed. r=smaug 2016-07-14 11:14:46 -04:00
Thomas Wisniewski
b66fa4f6c0 Bug 1207233 - Part 2: Make URLSearchParams nsIXHRSendable as well as clonable, and have XHRs set the correct request content type for them. r=baku 2016-07-11 15:03:44 -04:00
Thomas Wisniewski
ef7d665ee0 Bug 1207233 - Part 1: Allow not sending a Content-Type header, or sending a blank string for it, and have XMLHttpRequest.setRequestHeader honor those possibilities. r=dragana 2016-07-11 14:27:36 -04:00
Carsten "Tomcat" Book
b40f905f49 Backed out changeset 643bfa8b72ba (bug 1207233) for bustage 2016-07-12 11:40:16 +02:00