Changeset 262811 in webkit
- Timestamp:
- Jun 9, 2020 2:19:49 PM (4 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r262810 r262811 1 2020-06-09 Dean Jackson <dino@apple.com> 2 3 REGRESSION: [Safari Mojave for High Sierra] Accessing some of the featured pages on apple.com causes the webpage to crash 4 https://bugs.webkit.org/show_bug.cgi?id=212940 5 rdar://63839405 6 7 Reviewed by Tim Horton. 8 9 The code to use the singleton for a SwitchingGPUClient was assuming it 10 has always been set, which was not the case when 11 ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING) was not true. 12 13 * platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp: Check the state of the 14 singleton before calling it. 15 (WebCore::GraphicsContextGLOpenGLManager::updateHighPerformanceState): 16 (WebCore::GraphicsContextGLOpenGLManager::disableHighPerformanceGPUTimerFired): 17 * platform/graphics/mac/SwitchingGPUClient.h: Return a pointer to the singleton which 18 will allow the code to check for its existence. 19 (WebCore::SwitchingGPUClient::singletonIfExists): 20 1 21 2020-06-09 Sam Weinig <weinig@apple.com> 2 22 -
trunk/Source/WebCore/platform/graphics/mac/SwitchingGPUClient.cpp
r236773 r262811 31 31 SwitchingGPUClient* SwitchingGPUClient::m_singleton = nullptr; 32 32 33 SwitchingGPUClient & SwitchingGPUClient::singleton()33 SwitchingGPUClient* SwitchingGPUClient::singletonIfExists() 34 34 { 35 ASSERT(m_singleton); 36 return *m_singleton; 35 return m_singleton; 37 36 } 38 37 -
trunk/Source/WebCore/platform/graphics/mac/SwitchingGPUClient.h
r236773 r262811 30 30 class SwitchingGPUClient { 31 31 public: 32 WEBCORE_EXPORT static SwitchingGPUClient & singleton();32 WEBCORE_EXPORT static SwitchingGPUClient* singletonIfExists(); 33 33 WEBCORE_EXPORT static void setSingleton(SwitchingGPUClient&); 34 34 -
trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp
r254064 r262811 237 237 m_requestingHighPerformance = true; 238 238 #if PLATFORM(MAC) 239 SwitchingGPUClient::singleton().requestHighPerformanceGPU(); 239 if (auto* singleton = SwitchingGPUClient::singletonIfExists()) 240 singleton->requestHighPerformanceGPU(); 240 241 #endif 241 242 } … … 263 264 m_requestingHighPerformance = false; 264 265 #if PLATFORM(MAC) && (USE(OPENGL) || USE(ANGLE)) 265 SwitchingGPUClient::singleton().releaseHighPerformanceGPU(); 266 if (auto* singleton = SwitchingGPUClient::singletonIfExists()) 267 singleton->releaseHighPerformanceGPU(); 266 268 #endif 267 269 } -
trunk/Source/WebKit/ChangeLog
r262802 r262811 1 2020-06-09 Dean Jackson <dino@apple.com> 2 3 REGRESSION: [Safari Mojave for High Sierra] Accessing some of the featured pages on apple.com causes the webpage to crash 4 https://bugs.webkit.org/show_bug.cgi?id=212940 5 6 Reviewed by Tim Horton. 7 8 The code to use the singleton for a SwitchingGPUClient was assuming it 9 has always been set, which was not the case when 10 ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING) was not true. 11 12 * WebProcess/cocoa/WebProcessCocoa.mm: Set the singleton unconditionally. 13 (WebKit::WebProcess::platformInitializeProcess): 14 1 15 2020-06-09 Wenson Hsieh <wenson_hsieh@apple.com> 2 16 -
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
r262724 r262811 503 503 // Make sure that we close any WindowServer connections after checking in with Launch Services. 504 504 CGSShutdownServerConnections(); 505 506 SwitchingGPUClient::setSingleton(WebSwitchingGPUClient::singleton());507 505 #else 508 506 … … 513 511 } 514 512 #endif // ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING) 513 514 SwitchingGPUClient::setSingleton(WebSwitchingGPUClient::singleton()); 515 515 #endif // PLATFORM(MAC) 516 516
Note: See TracChangeset
for help on using the changeset viewer.