Commit Graph

205 Commits

Author SHA1 Message Date
Kris Maglione
910eab35d2 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

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

--HG--
extra : moz-landing-system : lando
2019-12-07 19:11:58 +00:00
Daniel Varga
84a601a6d4 Backed out 17 changesets (bug 1596918) for multiple browser-chrome and dev-tools failures. On a CLOSED TREE
Backed out changeset ab87d2c1afae (bug 1596918)
Backed out changeset 775f3b06a687 (bug 1596918)
Backed out changeset 67cc63ef5d7f (bug 1596918)
Backed out changeset 7d290bcd2067 (bug 1596918)
Backed out changeset 048db9f4db7c (bug 1596918)
Backed out changeset 96a79d2ba614 (bug 1596918)
Backed out changeset be770d112dd8 (bug 1596918)
Backed out changeset 302c8ab8391c (bug 1596918)
Backed out changeset 44ef8f20732e (bug 1596918)
Backed out changeset 38c11ebfb8ff (bug 1596918)
Backed out changeset b586fc081374 (bug 1596918)
Backed out changeset 12283166716f (bug 1596918)
Backed out changeset 99b0421015d8 (bug 1596918)
Backed out changeset 97ec49dbbbf3 (bug 1596918)
Backed out changeset ec79478f58f1 (bug 1596918)
Backed out changeset c6d356833bb8 (bug 1596918)
Backed out changeset 5ef6026806c8 (bug 1596918)
2019-12-07 03:12:07 +02:00
Kris Maglione
20da940e14 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

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

--HG--
extra : moz-landing-system : lando
2019-12-06 22:14:14 +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
Jan Varga
6ba032116d Bug 1592934 - Refactor some storage initialization methods before adding new telemetry probes; r=ttung
Differential Revision: https://phabricator.services.mozilla.com/D54307

--HG--
extra : moz-landing-system : lando
2019-11-25 15:04:43 +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
Jan Varga
547e3899d8 Bug 1589626 - LSNG: Add a check for null quota object; r=ttung
Differential Revision: https://phabricator.services.mozilla.com/D49732

--HG--
extra : moz-landing-system : lando
2019-10-18 14:13:37 +00:00
Jan Varga
111821c2c6 Bug 1587931 - LSNG: Force kill database actors during shutdown; r=asuth
Database actors are force killed after 5 seconds if the child side doesn't
respond to the RequestAllowToClose message during shutdown.

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

--HG--
extra : moz-landing-system : lando
2019-10-11 03:03:01 +00:00
Jan Varga
458afbbe35 Bug 1586315 - LSNG: Finish RequestHelper when LSRequestChild actor is unexpectedly destroyed; r=asuth
If LSRequestChild actor is unexpectedly destroyed, the nested event loop runs
until the timer fires. This patch improves that by calling the callback in
LSRequestChild::ActorDestroyed which immediatelly finishes RequestHelper and
finishes the nested event loop in the end too.

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

--HG--
extra : moz-landing-system : lando
2019-10-06 21:05:45 +00:00
Jan Varga
ae7651951f Bug 1584323 - Add more object properties to IndexedDBShutdownTimeout and LocalStorageShutdownTimeout crash annotations; r=asuth, dr=chutten
Differential Revision: https://phabricator.services.mozilla.com/D47341

--HG--
extra : moz-landing-system : lando
2019-10-02 04:28:23 +00:00
Jan Varga
6a67dcfb67 Bug 1583019 - Cleanup PreparedDatastore only if it was added to gPreparedDatastores; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D46727

--HG--
extra : moz-landing-system : lando
2019-09-27 04:18:23 +00:00
Jan Varga
4f4188c7ab Bug 1576260 - Make LSValue initialization fallible; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D45849

--HG--
extra : moz-landing-system : lando
2019-09-14 05:33:01 +00:00
Jan Varga
a650fac7b0 Bug 1563023 - Part 4: Get rid of custom usage tracking in LS by using client usage tracked by QM; r=asuth
This patch gets rid of gUsages in LSNG. This provides better consistency and
makes it easier to cache quota info on disk.
The patch also fixes some edge cases when usage was not adjusted correctly after
a failed file or database operation.

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

--HG--
extra : moz-landing-system : lando
2019-08-23 04:46:14 +00:00
Jan Varga
0e46119bb9 Bug 1563023 - Part 3: Change client usage type to support the null value; r=asuth
This patch wraps the uint64_t type in a Maybe container, so the client usage can
represent a state when there are no files on disk for the given client. Zero
usage then represents a state when there are some files but they are empty or
the client tracks logical size (not physical size of files on disk) and the
logical size is zero. This can be useful especially for LocalStorage.

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

--HG--
extra : moz-landing-system : lando
2019-08-22 20:52:09 +00:00
Jan Varga
9f906cd7c4 Bug 1563023 - Part 1: Implement per client usage tracking; r=asuth
This patch adds a fixed-size array of client usages to OriginInfo and modifies
quota tracking APIs to require the client type to be passed in.
A new method ResetUsageForClient is implemented. The method is used during
client-specific origin clearing. ResetUsageForClient is much faster than calling
GetUsageForOrigin and calling DecreaseUsageForOrigin after that.
LockedUsage now has an assertion that verifies that the total sum of client
usages matches total origin usage. This method should be called instead of
touching mUsage directly.
A new assertion is added to GetQuotaObject which verifies that passed file
belongs to the given persistence type, origin, and client.

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

--HG--
extra : moz-landing-system : lando
2019-08-22 13:06:48 +00:00
Jan Varga
dc66b57d8b Bug 1574569 - Don't abort LocalStorage requests when a sync message from parent is detected; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D42796

--HG--
extra : moz-landing-system : lando
2019-08-21 20:24:00 +00: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
Nicholas Nethercote
cd426e3ad2 Bug 1569526 - Remove return values from Add*VarCache(). r=KrisWright
They're infallible in practice and always `NS_OK`. (This stems from
`AddVarCacheNoAssignment()` always returning `NS_OK`.)

As a result, the commit removes lots of unnecessary checks.

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

--HG--
extra : moz-landing-system : lando
2019-07-30 06:19:46 +00:00
Byron Campen [:bwc]
13d7ab645a Bug 1566445: Rename a couple of macros to avoid conflicts. r=ttung
Differential Revision: https://phabricator.services.mozilla.com/D38226

--HG--
extra : moz-landing-system : lando
2019-07-20 15:56:31 +00:00
Narcis Beleuzu
59c3fccd33 Merge inbound to mozilla-central. a=merge 2019-07-09 06:45:48 +03: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
Sylvestre Ledru
131d0c6a02 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-07-06 08:18:28 +00:00
Gurzau Raul
93233f439a Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-07-07 01:44:47 +03:00
Jan Varga
b240a41330 Bug 1562942 - Followup patch, fix a failing test; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D36934
2019-07-04 18:26:29 +02:00
Victor Porof
0a8ff0ad85 Bug 1561435 - Format dom/, a=automatic-formatting
# ignore-this-changeset

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

--HG--
extra : source : 62f3501af4bc1c0bd1ee1977a28aee04706a6663
2019-07-05 10:44:55 +02:00
Jan Varga
82fad8077a Bug 1542572 - Add more temporary logging to LocalStorageShutdownTimeout crash annotation; r=asuth dr=chutten
Differential Revision: https://phabricator.services.mozilla.com/D34295
2019-06-09 21:46:34 +02:00
Jan Varga
73bc7c8dc2 Bug 1559029 - LSNG: Connection::FlushOp::DoDatastoreWork needs to automatically rollback the transaction and detach the shadow database on an error; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D34814
2019-06-13 04:17:52 +02:00
Razvan Maries
94dd792600 Backed out changeset 6baa1883dc72 (bug 1559029) for ES Lint failure. 2019-06-13 07:33:58 +03:00
Jan Varga
a7f81b45b5 Bug 1559029 - LSNG: Connection::FlushOp::DoDatastoreWork needs to automatically rollback the transaction and detach the shadow database on an error; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D34814
2019-06-13 04:17:52 +02:00
Jan Varga
5346f3347e Bug 1558112 - LSNG: Connection::FlushOp::DoDatastoreWork needs to automatically detach the shadow database on an error; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D34311
2019-06-10 08:41:13 +02:00
Jan Varga
e3f0977fd5 Bug 1540401 - Backout Part 1: Convert MOZ_DIAGNOSTIC_ASSERT back to MOZ_ASSERT since bug 1541972 hasn't been fixed yet; r=asuth 2019-06-07 15:11:56 +02:00
Eden Chuang
6ae5d6c65c Bug 1516333 - Part 2: Add LS unit test for uri encoding edge cases; r=janv
Differential Revision: https://phabricator.services.mozilla.com/D33617
2019-06-07 08:18:37 +02:00
Jan Varga
d3f2beee0e Bug 1540401 - Backout Part 4: Convert MOZ_DIAGNOSTIC_ASSERT back to MOZ_ASSERT since bug 1541771 hasn't been fixed yet; r=asuth 2019-06-05 20:07:50 +02:00
Mihai Alexandru Michis
153172de0c Merge inbound to mozilla-central. a=merge 2019-06-05 12:51:25 +03:00
Jan Varga
fe813f031d Bug 1534431 - Part 2: Disallow LS requests with undefined client id; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D33595
2019-06-03 15:32:59 +02:00
Jan Varga
e84d1ebb62 Bug 1534431 - Part 1: Verify LS request parameters as part of LS request state machine; r=asuth
LS Request parameters are now verified as part of the state machine so an actor
is always created. Before this patch, we were doing verification prior to actor
creation. If the verification failed, we didn't create an actor and content
was endlessly waiting for a reply.
2019-06-03 15:32:50 +02:00
Narcis Beleuzu
3c50127358 Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-06-05 00:51:07 +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
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
Jan Varga
c6f87cb635 Bug 1540401 - Backout Part 3: Convert MOZ_DIAGNOSTIC_ASSERT back to MOZ_ASSERT since bug 1541772 hasn't been fixed yet; r=asuth 2019-06-04 09:59:11 +02:00
Jan Varga
65f92e054f Bug 1552428 - LSNG: Datastore::PrivateBrowsingClear uses wrong delta for usage updating; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D31605
2019-05-17 10:30:19 +02:00
Razvan Maries
7afbe4a8bf Backed out changeset 01dd2842bbaa (bug 1552428) for ES Lint failure. CLOSED TREE 2019-05-31 18:07:15 +03:00
Jan Varga
673d464ca1 Bug 1552428 - LSNG: Datastore::PrivateBrowsingClear uses wrong delta for usage updating; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D31605
2019-05-17 10:30:19 +02:00
Jan Varga
197c57d894 Bug 1546723 - Followup fix: Convert MOZ_DIAGNOSTIC_ASSERT back to MOZ_ASSERT since bug 1541775 hasn't been fixed yet; r=asuth 2019-05-30 21:34:11 +02:00
Jan Varga
cce54f42f2 Bug 1546723 - Part 7: Fix ordering of items in special cases; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D31202
2019-05-15 06:11:11 +02:00
Jan Varga
f122f3cf74 Bug 1546723 - Part 6: Mark snapshot as dirty if the hasOtherProcessObservers flag changes; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D31201
2019-05-15 06:11:11 +02:00
Jan Varga
55c0e5ec44 Bug 1546723 - Part 5: Generalize code for getting datastores; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D31200
2019-05-15 06:11:11 +02:00