Update 018-dom_storage_map.patch

This commit is contained in:
Aleksei Kuzmin 2017-10-20 16:29:16 +03:00
Родитель babfbd6fcd
Коммит d6363edd3a
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -1,17 +1,17 @@
diff --git a/content/common/dom_storage/dom_storage_map.cc b/content/common/dom_storage/dom_storage_map.cc diff --git a/content/common/dom_storage/dom_storage_map.cc b/content/common/dom_storage/dom_storage_map.cc
index 71368bd..047054f 100644 index 5ac8bd57dc7f..0adccd0e9cf4 100644
--- a/content/common/dom_storage/dom_storage_map.cc --- a/content/common/dom_storage/dom_storage_map.cc
+++ b/content/common/dom_storage/dom_storage_map.cc +++ b/content/common/dom_storage/dom_storage_map.cc
@@ -64,10 +64,12 @@ bool DOMStorageMap::SetItem( @@ -180,10 +180,12 @@ bool DOMStorageMap::SetItemInternal(MapType* map_type,
size_t new_item_size = size_of_item(key, value); size_t new_item_size = size_of_item(key, value);
size_t new_bytes_used = bytes_used_ - old_item_size + new_item_size; size_t new_bytes_used = bytes_used_ - old_item_size + new_item_size;
+#if 0 +#if 0 // Disable localStorage size limit for Electron.
// Only check quota if the size is increasing, this allows // Only check quota if the size is increasing, this allows
// shrinking changes to pre-existing files that are over budget. // shrinking changes to pre-existing files that are over budget.
if (new_item_size > old_item_size && new_bytes_used > quota_) if (new_item_size > old_item_size && new_bytes_used > quota_)
return false; return false;
+#endif +#endif
values_[key] = base::NullableString16(value, false); (*map_type)[key] = value;
ResetKeyIterator(); ResetKeyIterator();