Граф коммитов

169 Коммитов

Автор SHA1 Сообщение Дата
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
Olli Pettay 93b916d5f8 Bug 1643677, ensure mServiceNotifier is still there when handling EventSource messages, and add some assertions, r=FarooqAR
...and be still super safe by adding null checks.

Some existing tests crash if we just add the assertions and the rest of the patch
fixes those.

Differential Revision: https://phabricator.services.mozilla.com/D79269
2020-06-11 14:35:32 +00:00
Farooq AR 15449ab52b Bug 1638248 - EventSource lastEventId is not consistent with spec. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D75537
2020-06-02 12:05:38 +00:00
Emilio Cobos Álvarez 761e9dfe4c Bug 1635094 - Cleanup the ReferrerInfo code. r=ckerschb
The cast in InitWithNode is wrong. AsElement() asserts instead of
checking the flag, so we always pass an element (and if we didn't we'd
have type confusion problems). I audited the callers and we're fine.

Anyhow, always require an element, and add two convenience constructors
for C++ code.

Differential Revision: https://phabricator.services.mozilla.com/D73636
2020-05-04 18:50:20 +00:00
Cosmin Sabou 71a40eae48 Backed out 2 changesets (bug 1635094) for build bustages on nsMacShellService.cpp. CLOSED TREE
Backed out changeset 0a2b0c6ea19a (bug 1635094)
Backed out changeset ead4f26f76ee (bug 1635094)
2020-05-04 20:04:06 +03:00
Emilio Cobos Álvarez 6dde680742 Bug 1635094 - Cleanup the ReferrerInfo code. r=ckerschb
The cast in InitWithNode is wrong. AsElement() asserts instead of
checking the flag, so we always pass an element (and if we didn't we'd
have type confusion problems). I audited the callers and we're fine.

Anyhow, always require an element, and add two convenience constructors
for C++ code.

Differential Revision: https://phabricator.services.mozilla.com/D73636
2020-05-04 16:26:51 +00:00
Andi-Bogdan Postelnicu 38afb32dc5 Bug 1626555 - Make `dom/base` buildable outside of `unified-build` environment. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D69183
2020-04-29 09:02:05 +00:00
Farooq AR c4534f1f07 Bug 1603585 - Notify DevTools when an EventSource object is created. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D67918
2020-04-25 19:27:07 +00:00
Sebastian Streich 725793e15c Bug 1626922 - Remove nsiPrincipal-Geturi in EventSource.cpp r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D69363

--HG--
extra : moz-landing-system : lando
2020-04-09 10:05:29 +00:00
Eric Rahm a7947848a0 Bug 1626448 - Remove nsAutoPtr usage from dom/base. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D69119

--HG--
extra : moz-landing-system : lando
2020-04-03 21:05:29 +00:00
Tim Huang 04d44bae12 Bug 1616570 - Part 1: Rename CookieSettings to CookieJarSettings. r=Ehsan
Given that we are going to add ContentBlockingAllowList in
CookieSettings, so CookieSettings will be responsible for more stuff than the
cookie behavior and cookie permission. We should use a proper name to
reflect the purpose of it. The name 'CookieSettings' is misleading that
this is only for cookie related stuff. So, we decide to rename
'CookieSettins' to 'CookieJarSettings' which serves better meaning here.

Differential Revision: https://phabricator.services.mozilla.com/D63935

--HG--
rename : netwerk/cookie/CookieSettings.cpp => netwerk/cookie/CookieJarSettings.cpp
rename : netwerk/cookie/nsICookieSettings.idl => netwerk/cookie/nsICookieJarSettings.idl
extra : moz-landing-system : lando
2020-03-04 08:59:08 +00:00
Tom Tung a8e09c16ca Bug 1614339 - Ensure CloseInternal alive until it is finished; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D63643

--HG--
extra : moz-landing-system : lando
2020-03-03 16:57:29 +00:00
Simon Giesecke d94419173b Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/base. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D63102

--HG--
extra : moz-landing-system : lando
2020-02-21 10:41:47 +00:00
Gabriele Svelto ace6d1063f Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55442

--HG--
extra : moz-landing-system : lando
2019-12-06 09:24:56 +00:00
Dorel Luca a381d5c96d Backed out changeset f6e53d1c6518 (bug 1600545) for Android build bustage. CLOSED TREE 2019-12-04 17:32:27 +02:00
Gabriele Svelto bc9290f767 Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55442

--HG--
extra : moz-landing-system : lando
2019-12-04 15:01:19 +00:00
Tom Schuster 6bfc234bde Bug 1558915 - Use infallible nsIURI::SchemeIs in dom/base. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D39780

--HG--
extra : moz-landing-system : lando
2019-07-30 17:51:37 +00:00
Boris Zbarsky 9de72a3ac6 Bug 1557793 part 2. Stop using [array] in nsIStringBundle. r=Pike
Differential Revision: https://phabricator.services.mozilla.com/D34196

--HG--
extra : moz-landing-system : lando
2019-06-11 15:51:51 +00:00
Thomas Nguyen 01ff0bf93f Bug 1534681 Use ReferrerInfo class in document r=ckerschb,baku,Gijs
Also, in many place, we use document uri as referrer. It is not right
for the case srdoc iframe. We should use the last non-srdoc parent
document's uri

Differential Revision: https://phabricator.services.mozilla.com/D30191

--HG--
rename : testing/web-platform/tests/referrer-policy/generic/iframe-inheritance.html => testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-data.html
rename : testing/web-platform/tests/referrer-policy/generic/iframe-inheritance.html => testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-srcdoc.html
extra : moz-landing-system : lando
2019-06-06 07:23:37 +00:00
Thomas Nguyen b0bfbd85aa Bug 1532318 - Part 2 : update changes of nsIHttpChannel in codebase r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D22786

--HG--
extra : moz-landing-system : lando
2019-05-02 12:33:55 +00:00
Andrea Marchesini 484db81418 Bug 1455020 - Extend CheckInnerWindowCorrectness() to check the state of the worker, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D25486

--HG--
extra : moz-landing-system : lando
2019-04-01 16:46:46 +00:00
Andrea Marchesini cf18d70630 Bug 1539532 - EventSource must bind itself to valid nsIGlobalObject in workers, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D25092

--HG--
extra : moz-landing-system : lando
2019-03-28 22:06:29 +00:00