Commit Graph

332 Commits

Author SHA1 Message Date
Liang-Heng Chen
256b591fe1 Bug 1638389 - skip events that principals are not matched; r=timhuang
The [[ https://searchfox.org/mozilla-central/rev/559b25eb41c1cbffcb90a34e008b8288312fcd25/dom/base/nsGlobalWindowInner.cpp#5070-5071 | assertion ]] is called in a [[ https://searchfox.org/mozilla-central/rev/559b25eb41c1cbffcb90a34e008b8288312fcd25/dom/storage/StorageNotifierService.cpp#86-87 | runnable ]], the condition was previously bailed out by the same [[ https://searchfox.org/mozilla-central/rev/559b25eb41c1cbffcb90a34e008b8288312fcd25/dom/storage/StorageNotifierService.cpp#78-81 | expression ]].
Dynamic FPI may potentially relaxed the effective storage principal from intrinsic storage principal to node principal, when it happened during the asynchrnous event, it will end up raise the assertion.

Differential Revision: https://phabricator.services.mozilla.com/D78017
2020-06-04 09:00:34 +00:00
ssengupta
cf852bbfb9 Bug 1635399 - Function PrincipalInfoToPrincipal now returns Result<nsCOMPtr<nsIPrincipal>, nsresult> r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D73868
2020-05-12 19:02:05 +00:00
Gerald Squelart
6f36a3fdb8 Bug 1609907 - Remove AUTO_PROFILER_THREAD_SLEEP before mozilla::CondVar waits - r=mstange
CondVar already calls `AUTO_PROFILER_THREAD_SLEEP`, which shouldn't be called recursively.

mozilla::Monitor also uses CondVar, so it shouldn't be surrounded by `AUTO_PROFILER_THREAD_SLEEP` either.

Depends on D72850

Differential Revision: https://phabricator.services.mozilla.com/D72851
2020-05-01 22:12:22 +00:00
Liang-Heng Chen
72da9842fb Bug 1629707 - use StoragePrincipal for SessionStorage; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D72765
2020-04-30 07:31:16 +00:00
Liang-Heng Chen
ebc07b158d Bug 1629707 - make SessionStorage support StoragePrincipal; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D72764
2020-04-29 20:47:14 +00:00
Andreas Farre
36eaf82163 Bug 1620594 - Part 2: Use SchedulerGroup::Dispatch instead of SystemGroup::Dispatch. r=nika
Depends on D67631

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

--HG--
extra : moz-landing-system : lando
2020-04-07 15:16:33 +00:00
Eric Rahm
53f27d440b Bug 1626450 - Remove stray references to "nsAutoPtr.h" in dom/. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D69121

--HG--
extra : moz-landing-system : lando
2020-04-03 21:05:26 +00:00
Sebastian Streich
5577df21f9 Bug 1615297 - Move Localstorage Keygen into Principal r=ckerschb,baku
Differential Revision: https://phabricator.services.mozilla.com/D62757

--HG--
extra : moz-landing-system : lando
2020-03-29 15:31:24 +00:00
Daniel Varga
8edab673d8 Backed out changeset d15b968aa6d1 (bug 1615297) for causing build bustage
CLOSED TREE

--HG--
extra : rebase_source : 4e525e82fb7f194d9b7eac0020932ed09ac005b7
2020-03-11 05:41:51 +02:00
Sebastian Streich
1f23aca56c Bug 1615297 - Move Localstorage Keygen into Principal r=ckerschb,baku
Differential Revision: https://phabricator.services.mozilla.com/D62757

--HG--
extra : moz-landing-system : lando
2020-03-10 18:10:08 +00:00
Cosmin Sabou
9ec8941cd4 Backed out 2 changesets (bug 1603703) for xpc failures on test_storage_aggregates.js. CLOSED TREE
Backed out changeset 05dbbf7c379f (bug 1603703)
Backed out changeset a1e723439116 (bug 1603703)

--HG--
extra : rebase_source : 65d834f15b63fdd0ce5c90d2efd080e4841777aa
2020-03-05 19:37:32 +02:00
Simon Giesecke
9e296ae57f Bug 1603703 - Part 2: Rename CreateFunction/RemoveFunction to RegisterFunction/UnregisterFunction. r=mak
Depends on D57089

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

--HG--
extra : moz-landing-system : lando
2020-03-05 15:14:56 +00:00
Sebastian Streich
db60c34f97 Bug 1618241 - Move CreateQuotaDBKey to nsIPrincipal r=ckerschb,baku
Differential Revision: https://phabricator.services.mozilla.com/D64391

--HG--
extra : moz-landing-system : lando
2020-02-27 00:22:27 +00:00
Eric Rahm
e61be8e54e Bug 1617653 - Remove nsAutoPtr usage from localstorage, quota, storage, simpledb. r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D63913

--HG--
extra : moz-landing-system : lando
2020-02-25 23:14:57 +00:00
Kris Maglione
c31aa68fb4 Bug 1535617: Part 2 - Clear weak references for most cycle collected objects on unlink. r=mccr8
This covers most cycle collected objects which support weak references, but
not the ones which inherit from a cycle collected class and don't do any cycle
collection on their own.

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

--HG--
extra : moz-landing-system : lando
2020-02-25 19:44:39 +00:00
Sebastian Streich
4018f86453 Bug 1615321 - Remove GetUri call in StorageObserver r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D62765

--HG--
extra : moz-landing-system : lando
2020-02-24 16:57:40 +00:00
Simon Giesecke
b50347f917 Bug 1611415 - Prefer using std::move over forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-13 14:38:48 +00:00
shindli
91aa0518dd Backed out changeset 0c982bc69cb3 (bug 1611415) for causing build bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsCOMPtr CLOSED TREE 2020-02-12 20:13:29 +02:00
Simon Giesecke
f604a47fa5 Bug 1611415 - Applied FixItHints from mozilla-non-std-move. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-12 17:24:41 +00:00
Simon Giesecke
7ca58631a4 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/storage. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D62560

--HG--
extra : moz-landing-system : lando
2020-02-12 10:33:31 +00:00
Liang-Heng Chen
ca2c937269 Bug 1597726 - use storage principal to generate origin key; r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D60350

--HG--
extra : moz-landing-system : lando
2020-01-20 19:58:24 +00:00
Eric Rahm
78ee6675cf Bug 1606187 - Part 2b: Update users of nsClassHashtable to handle UniquePtr differences r=KrisWright,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D59042

--HG--
extra : moz-landing-system : lando
2020-01-13 19:18:56 +00:00
Yaron Tausky
877a273a69 Bug 1603976 - Warn when getting session storage data for discarded browsing context r=dom-workers-and-storage-reviewers,sg,janv
Under some (yet) unclear conditions it's possible for a content
process to send session storage data for a browsing context that's
already been discarded. This leads to an assertion failure when
deserializing the IPC message. This commit works around this issue
by sending the browsing context's ID over IPC and issuing a warning
instead of asserting that the browsing context still exists.

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

--HG--
extra : moz-landing-system : lando
2020-01-08 15:38:34 +00:00
Chris Peterson
406763af7f Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj
This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`.

Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because:

* MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds
* but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds.

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

--HG--
extra : moz-landing-system : lando
2019-12-20 07:16:43 +00:00
Yaron Tausky
2381d5552e Bug 1593246 - Part 5: Replicate session storage data r=janv,asuth
This commit implements a simple data replication scheme, where
each content process receives a copy of the relevant session
storage data when navigating, and sending all its session storage
data to the parent process before shutting down.

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

--HG--
extra : moz-landing-system : lando
2019-12-13 09:45:55 +00:00
Yaron Tausky
0dec823f98 Bug 1593246 - Part 4: Overload SessionStorageManager::GetSessionStorageCacheHelper r=dom-workers-and-storage-reviewers,asuth
Depends on D55660

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

--HG--
extra : moz-landing-system : lando
2019-12-09 19:38:34 +00:00
Yaron Tausky
121a75d524 Bug 1593246 - Part 3: Remove unused parameter from SessionStorageManager::GetSessionStorageCacheHelper r=dom-workers-and-storage-reviewers,sg
Depends on D55659

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

--HG--
extra : moz-landing-system : lando
2019-12-09 19:38:34 +00:00
Yaron Tausky
9f6995fc6e Bug 1593246 - Part 2: Give SessionStorageManager a reference to BrowsingContext r=sg
This reference is necessary when sending session storage data for
all browsing context to the parent process. Note that it entails
making SessionStorageManager a cycle collection participant, since
adding this reference creates a cycle.

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

--HG--
extra : moz-landing-system : lando
2019-12-10 12:12:32 +00:00
Razvan Maries
ae7f240305 Backed out 3 changesets (bug 1593246) for build bustages on BrowsingContext.h. CLOSED TREE
Backed out changeset fd389138a684 (bug 1593246)
Backed out changeset 2663311a1b62 (bug 1593246)
Backed out changeset d9f0d827e28d (bug 1593246)
2019-12-09 20:32:18 +02:00
Yaron Tausky
f92ef30306 Bug 1593246 - Part 3: Remove unused parameter from SessionStorageManager::GetSessionStorageCacheHelper r=dom-workers-and-storage-reviewers,sg
Depends on D55659

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

--HG--
extra : moz-landing-system : lando
2019-12-05 17:52:44 +00:00
Yaron Tausky
fce9c5df38 Bug 1593246 - Part 2: Give SessionStorageManager a reference to BrowsingContext r=sg
This reference is necessary when sending session storage data for
all browsing context to the parent process. Note that it entails
making SessionStorageManager a cycle collection participant, since
adding this reference creates a cycle.

Depends on D55276

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

--HG--
extra : moz-landing-system : lando
2019-12-05 17:51:59 +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
Boris Zbarsky
75124bdd98 Bug 1517588. Use nsIPrincipal::IsSystemPrincipal instead of nsContentUtils::IsSystemPrincipal r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D53067

--HG--
extra : moz-landing-system : lando
2019-12-05 04:44:32 +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
Yaron Tausky
fbc5571698 No bug - Add missing #include directives in StorageUtils.cpp r=dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D54962

--HG--
extra : moz-landing-system : lando
2019-11-27 16:21:43 +00:00
Ehsan Akhgari
f344ba4005 Bug 1558420 - Part 5: Remove an invalid assertion; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D51333

--HG--
extra : moz-landing-system : lando
2019-11-12 15:40:16 +00:00
Ehsan Akhgari
f6ffd2ce8d Bug 1558420 - Part 1: Add an API for creating a sessionstorage manager and a cache object; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D51325

--HG--
extra : moz-landing-system : lando
2019-11-12 15:40:02 +00:00
Sebastian Hengst
0341151d63 Bug 1594981 - update Core::DOM* and Core::Storage* bugzilla product and component meta data in moz.build files after reorganization in bug 1594717. r=annevk
Differential Revision: https://phabricator.services.mozilla.com/D52345

--HG--
extra : moz-landing-system : lando
2019-11-08 12:17:57 +00:00
Boris Zbarsky
37bab0bd83 Bug 1582196 part 4. Get rid of NS_ERROR_RANGE_ERR. r=peterv
The two remaining consumers don't seem to depend on actually using this
specific nsresult in any way.

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

--HG--
extra : moz-landing-system : lando
2019-09-23 19:14:33 +00:00
Jan Varga
a62bad18a1 Bug 1570644 - Part 1: Fix a regression caused by bug 1556812; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D42464

--HG--
extra : rebase_source : 104e5782a7e94a16f2d7fd95e20684fbf8d0387e
2019-08-19 10:24:39 +02:00
Nicholas Nethercote
b634df9005 Bug 1573720 - Convert dom.storage.default.quota to a static pref. r=mccr8
This one was VarCached to two different variables in two different modules.

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

--HG--
extra : moz-landing-system : lando
2019-08-15 05:31:38 +00:00
Tom Schuster
88855a7ee5 Bug 1558915 - Use infallible nsIURI::SchemeIs in dom/. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D40108

--HG--
extra : source : 3da6e9e86be4a4a9eeaceec222398475b6679193
2019-08-02 08:54:18 +00:00
Mihai Alexandru Michis
0cc257addd Backed out 2 changesets (bug 1558915) for causing bustages. CLOSED TREE
Backed out changeset e44c9fd81e5b (bug 1558915)
Backed out changeset 3da6e9e86be4 (bug 1558915)
2019-08-02 12:17:42 +03:00
Tom Schuster
f115dd9113 Bug 1558915 - Use infallible nsIURI::SchemeIs in dom/. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D40108

--HG--
extra : moz-landing-system : lando
2019-08-02 08:54:18 +00:00
Barret Rennie
2b6653fdbe Bug 1289211 - Rename InfallibleTArray to nsTArray in dom/storage/ r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D36949

--HG--
extra : moz-landing-system : lando
2019-07-10 03:27:55 +00:00
Jonathan Kingston
31441f82ea Bug 1560455 - rename CodebasePrincipal to ContentPrincipal. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D35504

--HG--
extra : moz-landing-system : lando
2019-07-08 16:37:45 +00:00
Ehsan Akhgari
0e9483343e Bug 1556812 - Only notify same-origin actors in LocalStorageCacheParent::RecvNotify(); r=baku
Differential Revision: https://phabricator.services.mozilla.com/D33867

--HG--
extra : moz-landing-system : lando
2019-06-07 15:09:21 +00:00
Narcis Beleuzu
3c50127358 Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-06-05 00:51:07 +03:00
Narcis Beleuzu
790ffc99ca Merge inbound to mozilla-central. a=merge 2019-06-05 00:43:34 +03:00