mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
* chore: bump chromium in DEPS to 148.0.7738.0 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> * chore: fixup patch indices Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> * 7664509: Migrate ServiceWorkerInfo to ChildProcessId https://chromium-review.googlesource.com/c/chromium/src/+/7664509 Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
47 lines
2.5 KiB
Diff
47 lines
2.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jacob Quant <jacobq@gmail.com>
|
|
Date: Thu, 31 Oct 2019 14:00:00 -0500
|
|
Subject: dom_storage_limits.patch
|
|
|
|
This patch increases the DOM storage (e.g. `localStorage`
|
|
and `sessionStorage`) size quota from 10MiB to 100MiB.
|
|
Previous versions of this patch attempted to circumvent
|
|
the restriction altogether.
|
|
However, this can lead to other problems, such as crashing
|
|
the Dev Tools when attempting to read or write values that exceed
|
|
`IPC::mojom::kChannelMaximumMessageSize` (128MiB).
|
|
|
|
Increasing the quota rather than bypassing it reduces the
|
|
amount of chromium code that needs to be changed for Electron
|
|
as well as keeps these storage areas limited to a bounded
|
|
size meanwhile giving application developers more space to work with.
|
|
|
|
diff --git a/components/services/storage/dom_storage/dom_storage_constants.h b/components/services/storage/dom_storage/dom_storage_constants.h
|
|
index 2ded9daa5611d3121677f4d67d19fcdbbcc68d26..d5a9f43850d3d7c3a73873ebb24bf2ccb937a6ed 100644
|
|
--- a/components/services/storage/dom_storage/dom_storage_constants.h
|
|
+++ b/components/services/storage/dom_storage/dom_storage_constants.h
|
|
@@ -11,7 +11,8 @@ namespace storage {
|
|
|
|
// The quota for each storage area.
|
|
// This value is enforced by clients and by the storage service.
|
|
-inline constexpr size_t kPerStorageAreaQuota = 10 * 1024 * 1024;
|
|
+// Electron's dom_storage_limits.patch increased this value from 10MiB to 100MiB
|
|
+inline constexpr size_t kPerStorageAreaQuota = 100 * 1024 * 1024;
|
|
|
|
// In the storage service we allow some overage to
|
|
// accommodate concurrent writes from different clients
|
|
diff --git a/third_party/blink/public/mojom/dom_storage/storage_area.mojom b/third_party/blink/public/mojom/dom_storage/storage_area.mojom
|
|
index 535d618c6cb99fea8116baf69f8056d40a15bbdd..d01c79fbc67cfb8e668a2282cb4c4ae48d71e3a3 100644
|
|
--- a/third_party/blink/public/mojom/dom_storage/storage_area.mojom
|
|
+++ b/third_party/blink/public/mojom/dom_storage/storage_area.mojom
|
|
@@ -67,7 +67,8 @@ struct KeyValue {
|
|
interface StorageArea {
|
|
// The quota for each storage area.
|
|
// This value is enforced in renderer processes and the browser process.
|
|
- const uint32 kPerStorageAreaQuota = 10485760; // 10 MiB
|
|
+ // Electron's dom_storage_limits.patch increased this value from 10MiB to 100MiB
|
|
+ const uint32 kPerStorageAreaQuota = 104857600; // 100 MiB
|
|
|
|
// In the browser process we allow some overage to
|
|
// accommodate concurrent writes from different renderers
|