Changeset 196142 in webkit
- Timestamp:
- Feb 4, 2016 1:02:26 PM (8 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r196138 r196142 1 2016-02-04 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Give nested inspectors their own process pool 4 https://bugs.webkit.org/show_bug.cgi?id=153880 5 <rdar://problem/24508310> 6 7 Reviewed by Timothy Hatcher. 8 9 When inspecting the inspector both inspectors were using the same 10 Inspector process and sharing the same VM. This meant that profiling 11 information was confusing (memory and JavaScript sampling) because 12 it was showing data about both inspectors sharing the same process. 13 14 * UIProcess/WebInspectorProxy.cpp: 15 (WebKit::WebInspectorProxy::inspectorProcessPool): 16 (WebKit::WebInspectorProxy::isInspectorProcessPool): 17 Have two process pools. The main inspector process pool (1st level inspectors) 18 and a nested inspector process pool (inspecting the inspector, only expected 19 by WebKit developers). 20 21 * UIProcess/WebInspectorProxy.h: 22 * UIProcess/efl/WebInspectorProxyEfl.cpp: 23 (WebKit::WebInspectorProxy::platformCreateInspectorPage): 24 * UIProcess/gtk/WebInspectorProxyGtk.cpp: 25 (WebKit::WebInspectorProxy::platformCreateInspectorPage): 26 * UIProcess/mac/WebInspectorProxyMac.mm: 27 (WebKit::WebInspectorProxy::platformCreateInspectorPage): 28 Pass the inspectionLevel to determine the appropriate pool to use. 29 1 30 2016-02-04 Csaba Osztrogonác <ossy@webkit.org> 2 31 -
trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp
r194552 r196142 305 305 } 306 306 307 static WebProcessPool* s_processPool; 308 309 WebProcessPool& WebInspectorProxy::inspectorProcessPool() 307 static WebProcessPool* s_mainInspectorProcessPool; 308 static WebProcessPool* s_nestedInspectorProcessPool; 309 310 WebProcessPool& WebInspectorProxy::inspectorProcessPool(unsigned inspectionLevel) 310 311 { 311 312 // Having our own process pool removes us from the main process pool and 312 313 // guarantees no process sharing for our user interface. 313 if (!s_processPool) { 314 WebProcessPool*& pool = inspectionLevel == 1 ? s_mainInspectorProcessPool : s_nestedInspectorProcessPool; 315 if (!pool) { 314 316 auto configuration = API::ProcessPoolConfiguration::createWithLegacyOptions(); 315 s_processPool = &WebProcessPool::create(configuration.get()).leakRef(); 316 }; 317 318 return *s_processPool; 317 pool = &WebProcessPool::create(configuration.get()).leakRef(); 318 } 319 return *pool; 319 320 } 320 321 321 322 bool WebInspectorProxy::isInspectorProcessPool(WebProcessPool& processPool) 322 323 { 323 if (!s_processPool) 324 return false; 325 326 return s_processPool == &processPool; 324 return (s_mainInspectorProcessPool && s_mainInspectorProcessPool == &processPool) 325 || (s_nestedInspectorProcessPool && s_nestedInspectorProcessPool == &processPool); 327 326 } 328 327 -
trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h
r194322 r196142 154 154 explicit WebInspectorProxy(WebPageProxy*); 155 155 156 static WebProcessPool& inspectorProcessPool( );156 static WebProcessPool& inspectorProcessPool(unsigned inspectionLevel); 157 157 158 158 void eagerlyCreateInspectorPage(); -
trunk/Source/WebKit2/UIProcess/efl/WebInspectorProxyEfl.cpp
r194322 r196142 107 107 return 0; 108 108 109 WKContextRef wkContext = toAPI(&inspectorProcessPool( ));109 WKContextRef wkContext = toAPI(&inspectorProcessPool(inspectionLevel())); 110 110 WKRetainPtr<WKStringRef> wkGroupIdentifier = adoptWK(WKStringCreateWithUTF8CString(inspectorPageGroupIdentifier().utf8().data())); 111 111 WKPageGroupRef wkPageGroup = WKPageGroupCreateWithIdentifier(wkGroupIdentifier.get()); -
trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp
r194322 r196142 81 81 82 82 auto pageConfiguration = API::PageConfiguration::create(); 83 pageConfiguration->setProcessPool(&inspectorProcessPool( ));83 pageConfiguration->setProcessPool(&inspectorProcessPool(inspectionLevel())); 84 84 pageConfiguration->setPreferences(preferences.get()); 85 85 pageConfiguration->setPageGroup(pageGroup.get()); -
trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm
r195694 r196142 376 376 } 377 377 378 [configuration setProcessPool: ::WebKit::wrapper(inspectorProcessPool( ))];378 [configuration setProcessPool: ::WebKit::wrapper(inspectorProcessPool(inspectionLevel()))]; 379 379 [configuration _setGroupIdentifier:inspectorPageGroupIdentifier()]; 380 380
Note: See TracChangeset
for help on using the changeset viewer.