зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1626570 - Improve handling of copying arrays in dom/quota/. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D73629
This commit is contained in:
Родитель
acbc34d97d
Коммит
53e4e4c078
|
@ -853,6 +853,7 @@ namespace {
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
// XXX Change this not to derive from AutoTArray.
|
||||||
class ClientUsageArray final
|
class ClientUsageArray final
|
||||||
: public AutoTArray<Maybe<uint64_t>, Client::TYPE_MAX> {
|
: public AutoTArray<Maybe<uint64_t>, Client::TYPE_MAX> {
|
||||||
public:
|
public:
|
||||||
|
@ -861,6 +862,12 @@ class ClientUsageArray final
|
||||||
void Serialize(nsACString& aText) const;
|
void Serialize(nsACString& aText) const;
|
||||||
|
|
||||||
nsresult Deserialize(const nsACString& aText);
|
nsresult Deserialize(const nsACString& aText);
|
||||||
|
|
||||||
|
ClientUsageArray Clone() const {
|
||||||
|
ClientUsageArray res;
|
||||||
|
res.Assign(*this);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class OriginInfo final {
|
class OriginInfo final {
|
||||||
|
@ -7954,7 +7961,7 @@ OriginInfo::OriginInfo(GroupInfo* aGroupInfo, const nsACString& aOrigin,
|
||||||
const ClientUsageArray& aClientUsages, uint64_t aUsage,
|
const ClientUsageArray& aClientUsages, uint64_t aUsage,
|
||||||
int64_t aAccessTime, bool aPersisted,
|
int64_t aAccessTime, bool aPersisted,
|
||||||
bool aDirectoryExists)
|
bool aDirectoryExists)
|
||||||
: mClientUsages(aClientUsages),
|
: mClientUsages(aClientUsages.Clone()),
|
||||||
mGroupInfo(aGroupInfo),
|
mGroupInfo(aGroupInfo),
|
||||||
mOrigin(aOrigin),
|
mOrigin(aOrigin),
|
||||||
mUsage(aUsage),
|
mUsage(aUsage),
|
||||||
|
|
Загрузка…
Ссылка в новой задаче