Commit graph

190 commits

Author SHA1 Message Date
Andrew Creskey
1cd69bcde6 Bug 1809332 - Server-sent event retries are broken in Firefox r=necko-reviewers,jesup
We return the unmodified status on failed OnStartRequest so that the EventSource may make an informed decision as to whether or not to reconnect.

Differential Revision: https://phabricator.services.mozilla.com/D190294
2023-10-16 13:25:04 +00:00
Jan Varga
c458754592 Bug 1855134 - Move existing MOZ_TRY macros to a dedicated header file; r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D189226
2023-09-28 20:46:07 +00:00
Nika Layzell
1fdee2314c Bug 1839920 - Rename Get{ASCII,UTF}Origin to GetWebExposedOriginSerialization, r=smaug,necko-reviewers,anti-tracking-reviewers,bvandersloot,jesup
This should make uses of the type more clearly indicating where the
origin came from, and should help avoid potential confusion between this
origin and nsIPrincipal::origin in new code.

This new name is long, but explicit. The string returned from this
function corresponds to the "serialization of an origin" from the WHATWG
html spec:
https://html.spec.whatwg.org/multipage/browsers.html#ascii-serialisation-of-an-origin

Differential Revision: https://phabricator.services.mozilla.com/D181794
2023-06-27 19:59:15 +00:00
Nika Layzell
9f4d22f4e0 Bug 1826206 - Require nsISerialEventTarget for RetargetDeliveryTo, r=necko-reviewers,valentin
This avoids potential issues where multiple OnDataAvailable callbacks or
similar could theoretically be called concurrently on different
StreamTransportService threads when targeting the STS - these cases will
now target a TaskQueue on the STS instead, structurally ensuring serial
execution.

Differential Revision: https://phabricator.services.mozilla.com/D179984
2023-06-07 14:48:38 +00:00
sunil mayya
ee869626e0 Bug 1706003 - extend network error checks in EventSourceImpl::OnStopRequest. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D165612
2023-01-05 14:38:26 +00:00
Nika Layzell
5b2ada26c5 Bug 1738103 - Part 4: Add XPCOM support for shutdown tasks, r=necko-reviewers,KrisWright
Tasks registered with shutdown tasks are called when the target
nsISerialEventTarget is about to be destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D129840
2022-03-23 22:22:04 +00:00
Jason Kratzer
da771cb7eb Bug 1757188 - Ensure workerPrivate is not null, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D139713
2022-03-14 14:28:55 +00:00
Olli Pettay
f17224fcce Bug 1749307, null check eventSource, r=jstutte
bug 1744561 fixed one crash but revealed this other one.

Differential Revision: https://phabricator.services.mozilla.com/D135554
2022-01-11 13:09:19 +00:00
Olli Pettay
02319adabd Bug 1744561, check that mESImpl is still non-null after dispatching a WorkerMainThreadRunnable (InitRunnable), r=jstutte
Differential Revision: https://phabricator.services.mozilla.com/D133132
2021-12-20 13:54:49 +00:00
ssummar
0992acc367 Bug 1603127 - Replaced mozilla::Tuple with std::tuple and applied structured bindings in mozilla/Encoding.h. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D129920
2021-11-08 08:14:00 +00:00
Cristian Tuns
71486b8924 Backed out changeset 7e8e3747c3f8 (bug 1603127) for causing toolchains build bustages (Bug 1739589). CLOSED TREE 2021-11-05 07:23:45 -04:00
ssummar
508562cc85 Bug 1603127 - Replaced mozilla::Tuple with std::tuple and applied structured bindings in mozilla/Encoding.h. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D129920
2021-11-05 05:33:58 +00:00
ssummar
51c0ff21e5 Bug 1626517 - Replaced mozilla::Unused with mozilla::Ignore in mozilla::Decoder/mozilla::Encoder calls. r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D129022
2021-10-25 12:31:41 +00:00
Mike Hommey
aec5c5347b Bug 1733034 - Fix unused*-variable warnings due to missing ifdefs. r=andi
dom/base/EventSource.cpp:59:22: error: unused variable 'gEventSourceLog' [-Werror,-Wunused-variable]
static LazyLogModule gEventSourceLog("EventSource");
                     ^
dom/xul/nsXULCommandDispatcher.cpp:35:22: error: unused variable 'gCommandLog' [-Werror,-Wunused-variable]
static LazyLogModule gCommandLog("nsXULCommandDispatcher");
                     ^
layout/generic/ScrollAnchorContainer.cpp:23:31: error: unused variable 'sAnchorLog' [-Werror,-Wunused-variable]
static mozilla::LazyLogModule sAnchorLog("scrollanchor");
                              ^
memory/replace/phc/PHC.cpp:308:15: error: unused variable 'kAllocJunk' [-Werror,-Wunused-const-variable]
const uint8_t kAllocJunk = 0xe4;
              ^

Differential Revision: https://phabricator.services.mozilla.com/D126866
2021-09-29 21:44:49 +00:00
Florian Quèze
998adb18ea Bug 1728760 - require all nsITimerCallback native implementations to also implement nsINamed, r=smaug.
Differential Revision: https://phabricator.services.mozilla.com/D124349
2021-09-07 08:01:18 +00:00
Nika Layzell
461b98ded0 Bug 1711090 - Part 3: Add some missing nsITimerCallback queryinterface targets, r=KrisWright,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D115108
2021-05-18 20:45:17 +00:00
Alexandru Michis
08e0f3cf36 Backed out 4 changesets (bug 1711090) for causing bustages in nsTimerImpl.cpp
CLOSED TREE

Backed out changeset 5c6f0950714d (bug 1711090)
Backed out changeset 0b6a886eea8a (bug 1711090)
Backed out changeset fc9c788ff41d (bug 1711090)
Backed out changeset ecc51d9ad027 (bug 1711090)
2021-05-18 20:25:56 +03:00
Nika Layzell
2eead824d8 Bug 1711090 - Part 3: Add some missing nsITimerCallback queryinterface targets, r=KrisWright,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D115108
2021-05-18 16:24:48 +00:00
Alexis Beingessner
07f2f659c6 Bug 1686616 - make StringBundle use Components instead of Services. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D105531
2021-02-18 13:26:32 +00:00
Gerald Squelart
96f3fabfcb Bug 1693037 - Fix non-MOZ_GECKO_PROFILER builds - r=florian
No code changes.

Build issues were found by renaming `MOZ_GECKO_PROFILER` to something else in toolkit/moz.configure, in both unified and non-unified builds, on all supported platforms.

Also updated some profiler-related comments.

Differential Revision: https://phabricator.services.mozilla.com/D105375
2021-02-17 22:36:28 +00:00
Yaron Tausky
4c3b1acb4d Bug 1682928 - Protect shared memory locations behind a mutex r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D101582
2021-02-04 14:34:47 +00:00
Yaron Tausky
3623b4a196 Bug 1682928 - Make some data members atomic or const r=asuth,dom-workers-and-storage-reviewers,sg
With this commit a few of EventSource's and EventSourceImpl's data
members are now atomic, since a mutex isn't really necessary for
their use case. Also, several data members are now marked const.

Differential Revision: https://phabricator.services.mozilla.com/D101210
2021-02-03 15:03:54 +00:00
Yaron Tausky
6f6201cee5 Bug 1682928 - Remove some potential data races r=asuth,dom-workers-and-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D101163
2021-02-03 15:03:40 +00:00
Jens Stutte
33a534362f Bug 1682928: P1 Reduce the use of EventSourceImpl raw pointers r=dom-workers-and-storage-reviewers,ytausky
Differential Revision: https://phabricator.services.mozilla.com/D100010
2021-02-03 15:03:47 +00:00
smolnar
5618a307a4 Backed out 5 changesets (bug 1682928) for causing failures in test_eventsourceservice_worker. CLOSED TREE
Backed out changeset d07913a1ae00 (bug 1682928)
Backed out changeset 693d9056779c (bug 1682928)
Backed out changeset 44de49551bc9 (bug 1682928)
Backed out changeset 2fae6d457441 (bug 1682928)
Backed out changeset 5c41e69bed76 (bug 1682928)
2021-02-03 16:59:53 +02:00
Yaron Tausky
d23426aecf Bug 1682928 - Protect shared memory locations behind a mutex r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D101582
2021-02-02 13:47:18 +00:00
Yaron Tausky
5d285ae4da Bug 1682928 - Make some data members atomic or const r=asuth,dom-workers-and-storage-reviewers,sg
With this commit a few of EventSource's and EventSourceImpl's data
members are now atomic, since a mutex isn't really necessary for
their use case. Also, several data members are now marked const.

Differential Revision: https://phabricator.services.mozilla.com/D101210
2021-02-02 13:47:09 +00:00
Yaron Tausky
f8f44675bb Bug 1682928 - Remove some potential data races r=asuth,dom-workers-and-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D101163
2021-02-02 13:47:05 +00:00
Jens Stutte
377a63f269 Bug 1682928: P1 Reduce the use of EventSourceImpl raw pointers r=dom-workers-and-storage-reviewers,ytausky
Differential Revision: https://phabricator.services.mozilla.com/D100010
2021-02-02 13:47:00 +00:00
Brindusan Cristian
dbdd5869eb Backed out 4 changesets (bug 1682928) for crashes on [@ mozilla::detail::MutexImpl::mutexLock()]. CLOSED TREE
Backed out changeset ef19a2273112 (bug 1682928)
Backed out changeset 55374ef15cfe (bug 1682928)
Backed out changeset 05133e987f63 (bug 1682928)
Backed out changeset fa9a8ebb0221 (bug 1682928)
2021-01-29 00:01:27 +02:00
Yaron Tausky
675b98d767 Bug 1682928 - Protect shared memory locations behind a mutex r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D101582
2021-01-28 16:47:34 +00:00
Yaron Tausky
ce255a9bf5 Bug 1682928 - Make some data members atomic or const r=asuth,dom-workers-and-storage-reviewers,sg
With this commit a few of EventSource's and EventSourceImpl's data
members are now atomic, since a mutex isn't really necessary for
their use case. Also, several data members are now marked const.

Differential Revision: https://phabricator.services.mozilla.com/D101210
2021-01-28 16:47:32 +00:00
Yaron Tausky
b7a98ff2b1 Bug 1682928 - Remove some potential data races r=asuth,dom-workers-and-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D101163
2021-01-28 16:47:31 +00:00
Jens Stutte
3cec5f8197 Bug 1682928: P1 Reduce the use of EventSourceImpl raw pointers r=dom-workers-and-storage-reviewers,ytausky
Differential Revision: https://phabricator.services.mozilla.com/D100010
2021-01-28 16:47:30 +00:00
Jens Stutte
1e1c03f0df Bug 1677747: Trust the caller's error handling on shutdown rather than assert. r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D97487
2020-12-17 07:15:50 +00:00
Simon Giesecke
971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Sylvestre Ledru
fde06f6d21 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 17:04:01 +00:00
Butkovits Atila
964cca3198 Backed out changeset c0adbf7522dc (bug 1674637) for bustage on GMPParent.cpp. CLOSED TREE 2020-11-04 10:54:36 +02:00
Sylvestre Ledru
5f29324f60 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 08:29:00 +00:00
Simon Giesecke
de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Farooq AR
939092e602 Bug 1387355 - EventSource: ignore IDs with U+0000. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D85610
2020-08-13 07:54:15 +00:00
Simon Giesecke
1e02318b49 Bug 1653335 - Replace MakeSpan uses by constructor calls. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83817
2020-08-07 07:49:47 +00:00
Frederik Braun
a7153982e8 Bug 1366973: Rename security flags to not contain DATA anymore r=geckoview-reviewers,ckerschb,snorp
Differential Revision: https://phabricator.services.mozilla.com/D83490
2020-07-15 11:20:45 +00:00
Simon Giesecke
cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Chris Fronk
6f84249b41 Bug 1337953 - Make nsDeque templated on pointer type r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79629
2020-06-25 02:39:23 +00:00
Butkovits Atila
7916df7f02 Backed out changeset 5614bcd268d1 (bug 1337953) for bustage at FuzzyLayer.cpp. CLOSED TREE 2020-06-23 11:01:37 +03:00
Chris Fronk
cea9cef934 Bug 1337953 - Make nsDeque templated on pointer type r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79629
2020-06-23 00:58:13 +00:00
Olli Pettay
fab1af20c5 Bug 1646026 - Remove the overly strict assertion in EventSourceServiceNotifier::~EventSourceServiceNotifier,
Differential Revision: https://phabricator.services.mozilla.com/D79960
2020-06-19 15:36:36 +00:00
Olli Pettay
2223b8660b Bug 1643677, ensure mServiceNotifier is still there when handling EventSource messages, and add some assertions, r=FarooqAR
Some existing tests crash if we just add the assertions and the rest of the patch
fixes those.

mServiceNotifier is now created always on the main thread and used only on the target thread.
And use of it is protected by the mutex so that at the same time when it is created, target thread
can't try to delete it.

Differential Revision: https://phabricator.services.mozilla.com/D79269
2020-06-12 16:57:48 +00:00
Razvan Maries
4bf4433330 Backed out changeset 2f06b26075f3 (bug 1643677) for mochitest perma cailures on test_eventsourceservice_worker.html. CLOSED TREE 2020-06-11 20:14:33 +03:00