Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1007)

Unified Diff: third_party/WebKit/Source/platform/exported/Platform.cpp

Issue 1622553004: PartitionAlloc: Increase the number of pages per bucket (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/modules/push_messaging/PushMessageData.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/exported/Platform.cpp
diff --git a/third_party/WebKit/Source/platform/exported/Platform.cpp b/third_party/WebKit/Source/platform/exported/Platform.cpp
index 72904f70552b179fefbf22415ce953f662f5ff87..50ef0269839224c56206718cfbd67c357d859e42 100644
--- a/third_party/WebKit/Source/platform/exported/Platform.cpp
+++ b/third_party/WebKit/Source/platform/exported/Platform.cpp
@@ -94,6 +94,10 @@ WebThread* Platform::mainThread() const
void Platform::registerMemoryDumpProvider(WebMemoryDumpProvider* provider, const char* name)
{
+ // MemoryDumpProvider needs a meessage loop.
+ if (!Platform::current()->currentThread())
+ return;
+
WebMemoryDumpProviderAdapter* adapter = new WebMemoryDumpProviderAdapter(provider);
ProviderToAdapterMap::AddResult result = memoryDumpProviders().add(provider, adoptPtr(adapter));
if (!result.isNewEntry)
@@ -104,6 +108,9 @@ void Platform::registerMemoryDumpProvider(WebMemoryDumpProvider* provider, const
void Platform::unregisterMemoryDumpProvider(WebMemoryDumpProvider* provider)
{
+ if (!Platform::current()->currentThread())
+ return;
+
ProviderToAdapterMap::iterator it = memoryDumpProviders().find(provider);
if (it == memoryDumpProviders().end())
return;
« no previous file with comments | « third_party/WebKit/Source/modules/push_messaging/PushMessageData.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698