Skip to content

Commit fce15fa

Browse files
committed
Merge pull request nwjs#2950 from ghostoy/fix-http-cache-crash
Fix random http cache crash on Windows
2 parents 32d1977 + 13e30be commit fce15fa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/net/shell_url_request_context_getter.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,11 @@ net::URLRequestContext* ShellURLRequestContextGetter::GetURLRequestContext() {
241241
net::HttpCache::DefaultBackend* main_backend =
242242
new net::HttpCache::DefaultBackend(
243243
net::DISK_CACHE,
244-
net::CACHE_BACKEND_SIMPLE,
244+
// switched to CACHE_BACKEND_DEFAULT to prevent random cache crashes
245+
// on Windows
246+
net::CACHE_BACKEND_DEFAULT,
245247
cache_path,
246-
10 * 1024 * 1024, // 10M
248+
0, // system determin the cache size
247249
BrowserThread::GetMessageLoopProxyForThread(
248250
BrowserThread::CACHE));
249251

0 commit comments

Comments
 (0)