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

17 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke 760cc7e936 Bug 1679522 - Fix include directives and forward declarations. r=andi,necko-reviewers,jgilbert
- Add missing include directives and forward declarations.
- Remove some extra include directives.
- Add missing namespace qualifications.
- Move include directives out of namespace in toolkit/xre/GlobalSemaphore.h

Differential Revision: https://phabricator.services.mozilla.com/D98894
2021-03-25 10:19:44 +00:00
Jan Varga eeb8cf2781 Bug 1695883 - Add explicit fallible mozStorageTransaction::Start method for starting the transaction; r=dom-storage-reviewers,sg
The new method is mandatory because mozStorageTransaction constructor no longer
starts the transaction. It must be started explicitely.

All consumers have been adjusted, but only dom/quota, dom/indexedDB, dom/cache,
dom/localstorage and dom/storage handle the error. Other components like
netwerk/cache, netwerk/cookie and toolkit/components currently only warn on
failure to start a transaction. Bug 1696129, 1696130 and 1696133 have been
filed for proper handling of transaction start failures in those components.

Differential Revision: https://phabricator.services.mozilla.com/D106893
2021-03-04 04:38:06 +00:00
Jan Varga 117488daa2 Bug 1694231 - Add support for nested mozStorageTransaction using savepoints; r=dom-storage-reviewers,sg
The nesting level is tracked on the storage connection. The thread safety is
ensured by holding a lock while a transaction is being started/commited/rolled
back. For these purposes, the sharedDBMutex has been exposed on
mozIStorageConnection interface and additional helper methods have been added
to the interface as well.

Differential Revision: https://phabricator.services.mozilla.com/D106019
2021-03-03 18:53:14 +00:00
Simon Giesecke 916433bd5a Bug 1685111 - Extract CachingDatabaseConnection base class from indexedDB's DatabaseConnection. r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D100922
2021-01-26 09:19:44 +00:00
Simon Giesecke ed0c4bbf24 Bug 1663924 - Split BorrowedStatement from CachedStatement. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D90234
2020-09-29 10:57:19 +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
Eric Rahm 12ca859e67 Bug 1626456 - Remove stray nsAutoPtr.h includes. r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D69127

--HG--
extra : moz-landing-system : lando
2020-04-03 21:05:46 +00:00
Gabriele Svelto 5dc21d568c Bug 1600545 - Remove useless inclusions of header files generated from IDL files in modules/, netwerk/, parser/, security/, startupcache/, storage/, toolkit/, tools/, uriloader/, widget/, xpcom/ and xpfe/ 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/D55444

--HG--
extra : moz-landing-system : lando
2019-12-06 09:17:57 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Robert Bartlensky 4313eb7124 Bug 1476009: Remove unnecessary initialization. r=mak
MozReview-Commit-ID: LyDzKB6gein

--HG--
extra : rebase_source : 11b65a89fdc90263e46f69c67909c5a8a43046f6
2018-07-16 17:56:02 +01:00
Kit Cambridge e4711b8178 Bug 1435446 - Add a default transaction type for storage connections. r=mak
This patch adds a `mozIStorageConnection::defaultTransactionType`
attribute that controls the default transaction behavior for the
connection. As before, `mozStorageTransaction` can override the default
behavior for individual transactions.

MozReview-Commit-ID: IRSlMesETWN

--HG--
extra : rebase_source : fc63af108bb246bc096cb9ef7c13b41fabba5563
2018-02-28 22:44:40 -08:00
Eric Rahm 07c97a5afe Bug 1423773 - Part 1: Remove usage of nsStringGlue.h. r=glandium
This removes an unnecessary level of indirection by replacing all
nsStringGlue.h instances with just nsString.h.

--HG--
extra : rebase_source : 340989240af4018f3ebfd92826ae11b0cb46d019
2017-12-06 16:52:51 -08:00
Masatoshi Kimura 12ab2931a7 Bug 645049 - Remove [deprecated] methods on mozIStorageBaseStatement.idl. r=asuth
MozReview-Commit-ID: AB1VBuhxi8

--HG--
extra : rebase_source : e5062b532370ab4d82fb33a258e447fc66cf09f6
2017-08-06 09:17:50 +09:00
Marco Bonardo 8d20cc6802 Bug 1355561 - Add a new API to spinningly close the database when strictly needed, and ensure Close() does what it's named after. r=asuth
Introduce a new SpinningSynchronousClose API that allows to synchronously close
a connection that executed asynchronous statements, by spinning the events loop.
This is expected to be used rarely in particular cases like database corruption.
It is currently [noscript] since the only consumer is cpp, in the future we can
evaluate removing that, if we find more uses for it.

MozReview-Commit-ID: 7SPqutoF9jJ

--HG--
extra : rebase_source : d053e308192f335dfdca089668e56115b068ff8c
2017-04-12 17:44:39 +02:00
Sajid Ahmed 591da76059 Bug 1007034 - Add console warnings for the deprecated BindXXXParameter methods in mozIStorageBaseStatement and replace calls to the deprecated methods in dom/indexedDB/ActorsParent.cpp. r=mak
--HG--
extra : rebase_source : ac32534d36959ff7f3a1c3a382319e6de4225c2f
2017-04-05 14:08:25 -04:00
Nicholas Nethercote b71747b2ac Bug 1299727 - Rename NS_WARN_IF_FALSE as NS_WARNING_ASSERTION. r=erahm.
The new name makes the sense of the condition much clearer. E.g. compare:

  NS_WARN_IF_FALSE(!rv.Failed());

with:

  NS_WARNING_ASSERTION(!rv.Failed());

The new name also makes it clearer that it only has effect in debug builds,
because that's standard for assertions.

--HG--
extra : rebase_source : 886e57a9e433e0cb6ed635cc075b34b7ebf81853
2016-09-01 15:01:16 +10:00
Birunthan Mohanathas 11f2166660 Bug 1164717 - Flatten storage/public/ directory. r=mak
--HG--
rename : storage/public/StatementCache.h => storage/StatementCache.h
rename : storage/public/mozIStorageAggregateFunction.idl => storage/mozIStorageAggregateFunction.idl
rename : storage/public/mozIStorageAsyncConnection.idl => storage/mozIStorageAsyncConnection.idl
rename : storage/public/mozIStorageAsyncStatement.idl => storage/mozIStorageAsyncStatement.idl
rename : storage/public/mozIStorageBaseStatement.idl => storage/mozIStorageBaseStatement.idl
rename : storage/public/mozIStorageBindingParams.idl => storage/mozIStorageBindingParams.idl
rename : storage/public/mozIStorageBindingParamsArray.idl => storage/mozIStorageBindingParamsArray.idl
rename : storage/public/mozIStorageCompletionCallback.idl => storage/mozIStorageCompletionCallback.idl
rename : storage/public/mozIStorageConnection.idl => storage/mozIStorageConnection.idl
rename : storage/public/mozIStorageError.idl => storage/mozIStorageError.idl
rename : storage/public/mozIStorageFunction.idl => storage/mozIStorageFunction.idl
rename : storage/public/mozIStoragePendingStatement.idl => storage/mozIStoragePendingStatement.idl
rename : storage/public/mozIStorageProgressHandler.idl => storage/mozIStorageProgressHandler.idl
rename : storage/public/mozIStorageResultSet.idl => storage/mozIStorageResultSet.idl
rename : storage/public/mozIStorageRow.idl => storage/mozIStorageRow.idl
rename : storage/public/mozIStorageService.idl => storage/mozIStorageService.idl
rename : storage/public/mozIStorageStatement.idl => storage/mozIStorageStatement.idl
rename : storage/public/mozIStorageStatementCallback.idl => storage/mozIStorageStatementCallback.idl
rename : storage/public/mozIStorageStatementParams.idl => storage/mozIStorageStatementParams.idl
rename : storage/public/mozIStorageStatementRow.idl => storage/mozIStorageStatementRow.idl
rename : storage/public/mozIStorageVacuumParticipant.idl => storage/mozIStorageVacuumParticipant.idl
rename : storage/public/mozIStorageValueArray.idl => storage/mozIStorageValueArray.idl
rename : storage/public/mozStorageHelper.h => storage/mozStorageHelper.h
rename : storage/public/storage.h => storage/storage.h
2015-05-19 10:47:29 -07:00