Changeset 182447 in webkit
- Timestamp:
- Apr 6, 2015 5:05:28 PM (9 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r182442 r182447 1 2015-04-06 Anders Carlsson <andersca@apple.com> 2 3 Create the web inspector process pool lazily 4 https://bugs.webkit.org/show_bug.cgi?id=143456 5 rdar://problem/20146520 6 7 Reviewed by Mark Lam. 8 9 Add and implement WebInspectorProxy::isInspectorProcessPool instead of always creating the inspector process pool 10 when trying to determine if a given process pool is the inspector process pool. 11 12 This should speed up initialization somewhat and avoid creating a storage manager for example. 13 14 * UIProcess/WebInspectorProxy.cpp: 15 (WebKit::WebInspectorProxy::inspectorProcessPool): 16 (WebKit::WebInspectorProxy::isInspectorProcessPool): 17 * UIProcess/WebInspectorProxy.h: 18 * UIProcess/WebProcessProxy.cpp: 19 (WebKit::WebProcessProxy::getLaunchOptions): 20 1 21 2015-04-06 Brady Eidson <beidson@apple.com> 2 22 -
trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp
r181881 r182447 298 298 } 299 299 300 static WebProcessPool* s_processPool; 301 300 302 WebProcessPool& WebInspectorProxy::inspectorProcessPool() 301 303 { 302 304 // Having our own process pool removes us from the main process pool and 303 305 // guarantees no process sharing for our user interface. 304 static WebProcessPool* processPool = []{306 if (!s_processPool) { 305 307 auto configuration = API::ProcessPoolConfiguration::createWithLegacyOptions(); 306 308 configuration->setProcessModel(ProcessModelMultipleSecondaryProcesses); 307 return &WebProcessPool::create(configuration.get()).leakRef(); 308 }(); 309 310 return *processPool; 309 s_processPool = &WebProcessPool::create(configuration.get()).leakRef(); 310 }; 311 312 return *s_processPool; 313 } 314 315 bool WebInspectorProxy::isInspectorProcessPool(WebProcessPool& processPool) 316 { 317 if (!s_processPool) 318 return false; 319 320 return s_processPool == &processPool; 311 321 } 312 322 -
trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h
r181885 r182447 135 135 void togglePageProfiling(); 136 136 137 static WebProcessPool& inspectorProcessPool();137 static bool isInspectorProcessPool(WebProcessPool&); 138 138 static bool isInspectorPage(WebPageProxy&); 139 139 … … 153 153 private: 154 154 explicit WebInspectorProxy(WebPageProxy*); 155 156 static WebProcessPool& inspectorProcessPool(); 155 157 156 158 void eagerlyCreateInspectorPage(); -
trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp
r182285 r182447 129 129 { 130 130 launchOptions.processType = ProcessLauncher::WebProcess; 131 if ( &m_processPool.get() == &WebInspectorProxy::inspectorProcessPool())131 if (WebInspectorProxy::isInspectorProcessPool(m_processPool)) 132 132 launchOptions.extraInitializationData.add(ASCIILiteral("inspector-process"), ASCIILiteral("1")); 133 133 platformGetLaunchOptions(launchOptions);
Note: See TracChangeset
for help on using the changeset viewer.