Skip to content

Commit e5dd6d0

Browse files
committed
Fix nwjs#2854: dom_storage_quota
Conflicts: src/renderer/shell_content_renderer_client.cc
1 parent 2020b17 commit e5dd6d0

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/renderer/shell_content_renderer_client.cc

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,14 @@ void ShellContentRendererClient::RenderThreadStarted() {
166166
command_line->GetSwitchValuePath(switches::kWorkingDirectory));
167167
}
168168

169+
if (command_line->HasSwitch(switches::kDomStorageQuota)) {
170+
std::string quota_str = command_line->GetSwitchValueASCII(switches::kDomStorageQuota);
171+
int quota = 0;
172+
if (base::StringToInt(quota_str, &quota) && quota > 0) {
173+
content::DOMStorageMap::SetQuotaOverride(quota * 1024 * 1024);
174+
}
175+
}
176+
169177
if (command_line->HasSwitch(extensions::switches::kExtensionProcess)) {
170178
extensions_client_.reset(CreateExtensionsClient());
171179
extensions::ExtensionsClient::Set(extensions_client_.get());
@@ -181,16 +189,6 @@ void ShellContentRendererClient::RenderThreadStarted() {
181189
thread->AddObserver(extension_dispatcher_.get());
182190
}
183191

184-
#if 0
185-
if (command_line->HasSwitch(switches::kDomStorageQuota)) {
186-
std::string quota_str = command_line->GetSwitchValueASCII(switches::kDomStorageQuota);
187-
int quota = 0;
188-
if (base::StringToInt(quota_str, &quota) && quota > 0) {
189-
content::DOMStorageMap::SetQuotaOverride(quota * 1024 * 1024);
190-
}
191-
}
192-
#endif //0
193-
194192
// Start observers.
195193
shell_observer_.reset(new ShellRenderProcessObserver());
196194

0 commit comments

Comments
 (0)