electron/patches/common/chromium/dom_storage_map.patch
Jeremy Apthorp 76c5f5cc8a
build: move libcc patches to electron repo (#14104)
In the GN build, libchromiumcontent is no longer a distinct library, but
merely a container for a set of scripts and patches. Maintaining those
patches in a separate repository is tedious and error-prone, so merge
them into the main repo.

Once this is merged and GN is the default way to build Electron, the
libchromiumcontent repository can be archived.
2018-09-13 22:02:16 -07:00

17 lines
796 B
Diff

diff --git a/content/common/dom_storage/dom_storage_map.cc b/content/common/dom_storage/dom_storage_map.cc
index 0a6b0176a982..35a1c3c11a58 100644
--- a/content/common/dom_storage/dom_storage_map.cc
+++ b/content/common/dom_storage/dom_storage_map.cc
@@ -182,10 +182,12 @@ bool DOMStorageMap::SetItemInternal(MapType* map_type,
size_t new_item_size = size_in_storage(key, value);
size_t new_storage_used = storage_used_ - old_item_size + new_item_size;
+#if 0 // Disable localStorage size limit for Electron.
// Only check quota if the size is increasing, this allows
// shrinking changes to pre-existing files that are over budget.
if (new_item_size > old_item_size && new_storage_used > quota_)
return false;
+#endif
(*map_type)[key] = value;
ResetKeyIterator();