Commit Graph

312 Commits

Author SHA1 Message Date
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
Nihanth Subramanya
203396c6e0 Bug 1555562 - Make sure LocalStorageManager::PrecacheStorage() passes in the real storage principal. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D33559

--HG--
extra : moz-landing-system : lando
2019-06-04 21:13:40 +00:00
Ehsan Akhgari
b79f2aaa94 Bug 1556859 - Remove SessionStorage::Clone(); r=baku
Differential Revision: https://phabricator.services.mozilla.com/D33703

--HG--
extra : moz-landing-system : lando
2019-06-04 21:09:03 +00:00
Ehsan Akhgari
8349684af8 Bug 1556093 - Use the storage principal when constructing a PBackgroundLocalStorageCache actor; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D33557

--HG--
extra : moz-landing-system : lando
2019-06-04 17:02:21 +00:00
Jan Varga
67c1136dd9 Bug 1556217 - LSNG: Add a test for large items; r=asuth, smaug
Differential Revision: https://phabricator.services.mozilla.com/D33417
2019-06-02 08:00:25 +02:00
Ehsan Akhgari
98809ae136 Bug 1555564 - Part 3: Make sure local storage manager caches the partitioned origins separately from each other; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D33118

--HG--
extra : moz-landing-system : lando
2019-05-30 12:09:42 +00:00
Ehsan Akhgari
98960a9c41 Bug 1554361 - Move the high-level storage access check APIs to mozilla/StorageAccess.h; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D32556

--HG--
extra : moz-landing-system : lando
2019-05-27 14:06:49 +00:00
Sylvestre Ledru
d57d4905f1 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-05-25 17:46:15 +00:00
arthur.iakab
af8e458c5f Backed out changeset a296439a25ff (bug 1519636) for frequent Windows cppunit failures CLOSED TREE 2019-05-24 14:26:01 +03:00
Sylvestre Ledru
c82ea97226 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-05-24 09:59:17 +00:00
Andrea Marchesini
dc7545548e Bug 1551055 - StoragePrincipal should be supported by localStorage - part 1, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D30801

--HG--
extra : moz-landing-system : lando
2019-05-14 05:49:46 +00:00
Ciure Andrei
f1dd75ca22 Backed out 3 changesets (bug 1551055) for causing xpcshell localStorage perma failures CLOSED TREE
Backed out changeset 21e44ad9c6df (bug 1551055)
Backed out changeset 8727e61ab69b (bug 1551055)
Backed out changeset d99a6769beb4 (bug 1551055)

--HG--
extra : rebase_source : 56f7fe5c54cd7e4109acce5074be1aba12e91086
2019-05-13 22:40:22 +03:00
Andrea Marchesini
e1b74991fb Bug 1551055 - StoragePrincipal should be supported by localStorage - part 1, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D30801

--HG--
extra : moz-landing-system : lando
2019-05-13 18:42:36 +00:00
Andrea Marchesini
d179c5015e Bug 1320404 - Remove appId from origin attributes - part 2 - NO_APP_ID UNKNOWN_APP_ID, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D29354

--HG--
extra : moz-landing-system : lando
2019-05-03 17:13:47 +00:00
Andrea Marchesini
f8565bf748 Bug 1320404 - Remove appId from origin attributes - part 1 - OriginAttributes and nsIPrincipal, r=Ehsan,flod
Differential Revision: https://phabricator.services.mozilla.com/D29353

--HG--
extra : moz-landing-system : lando
2019-05-03 17:13:17 +00:00
Bogdan Tara
386d23bfe7 Backed out 4 changesets (bug 1320404) for test_permmanager_load_invalid_entries.js failures
Backed out changeset 7c2f4e64d38e (bug 1320404)
Backed out changeset a7e7c0251179 (bug 1320404)
Backed out changeset dd741b25a244 (bug 1320404)
Backed out changeset de9073c57d20 (bug 1320404)
2019-05-03 06:12:25 +03:00
Andrea Marchesini
fad9354e10 Bug 1320404 - Remove appId from origin attributes - part 2 - NO_APP_ID UNKNOWN_APP_ID, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D29354

--HG--
extra : moz-landing-system : lando
2019-05-02 17:24:53 +00:00
Andrea Marchesini
138cee6dea Bug 1320404 - Remove appId from origin attributes - part 1 - OriginAttributes and nsIPrincipal, r=Ehsan,flod
Differential Revision: https://phabricator.services.mozilla.com/D29353

--HG--
extra : moz-landing-system : lando
2019-05-02 17:24:51 +00:00
Cosmin Sabou
a884fb99d8 Backed out 4 changesets (bug 1320404) for xperf failures on permissions.sqlite-journal.
Backed out changeset fbacf18b6532 (bug 1320404)
Backed out changeset fed7c475d75c (bug 1320404)
Backed out changeset 557b586f774a (bug 1320404)
Backed out changeset 5a20b5f43280 (bug 1320404)
2019-05-02 04:51:18 +03:00
Andrea Marchesini
36718d66c8 Bug 1320404 - Remove appId from origin attributes - part 2 - NO_APP_ID UNKNOWN_APP_ID, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D29354

--HG--
extra : moz-landing-system : lando
2019-05-01 23:21:54 +00:00
Andrea Marchesini
7e61125d8f Bug 1320404 - Remove appId from origin attributes - part 1 - OriginAttributes and nsIPrincipal, r=Ehsan,flod
Differential Revision: https://phabricator.services.mozilla.com/D29353

--HG--
extra : moz-landing-system : lando
2019-05-01 23:21:45 +00:00