Title: [177625] trunk/Source/WebKit2
- Revision
- 177625
- Author
- [email protected]
- Date
- 2014-12-21 09:01:04 -0800 (Sun, 21 Dec 2014)
Log Message
[iOS] avoid WebVideoFullscreenManager crash
https://bugs.webkit.org/show_bug.cgi?id=139852
<rdar://problem/19319302>
Reviewed by Darin Adler.
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::didExitFullscreen): NULL-check m_layerHostingContext and m_page.
(WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced): NULL-check m_layerHostingContext.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (177624 => 177625)
--- trunk/Source/WebKit2/ChangeLog 2014-12-21 10:49:50 UTC (rev 177624)
+++ trunk/Source/WebKit2/ChangeLog 2014-12-21 17:01:04 UTC (rev 177625)
@@ -1,3 +1,15 @@
+2014-12-21 Eric Carlson <[email protected]>
+
+ [iOS] avoid WebVideoFullscreenManager crash
+ https://bugs.webkit.org/show_bug.cgi?id=139852
+ <rdar://problem/19319302>
+
+ Reviewed by Darin Adler.
+
+ * WebProcess/ios/WebVideoFullscreenManager.mm:
+ (WebKit::WebVideoFullscreenManager::didExitFullscreen): NULL-check m_layerHostingContext and m_page.
+ (WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced): NULL-check m_layerHostingContext.
+
2014-12-21 David Kilzer <[email protected]>
Fix WebKit2 build with newer clang compiler
Modified: trunk/Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.mm (177624 => 177625)
--- trunk/Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.mm 2014-12-21 10:49:50 UTC (rev 177624)
+++ trunk/Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.mm 2014-12-21 17:01:04 UTC (rev 177625)
@@ -220,9 +220,12 @@
__block RefPtr<WebVideoFullscreenModelVideoElement> protect(this);
dispatch_async(dispatch_get_main_queue(), ^{
- m_layerHostingContext->setRootLayer(nullptr);
- m_layerHostingContext = nullptr;
- m_page->send(Messages::WebVideoFullscreenManagerProxy::CleanupFullscreen(), m_page->pageID());
+ if (m_layerHostingContext) {
+ m_layerHostingContext->setRootLayer(nullptr);
+ m_layerHostingContext = nullptr;
+ }
+ if (m_page)
+ m_page->send(Messages::WebVideoFullscreenManagerProxy::CleanupFullscreen(), m_page->pageID());
protect.clear();
});
}
@@ -252,7 +255,8 @@
void WebVideoFullscreenManager::setVideoLayerFrameFenced(WebCore::FloatRect bounds, IPC::Attachment fencePort)
{
- m_layerHostingContext->setFencePort(fencePort.port());
+ if (m_layerHostingContext)
+ m_layerHostingContext->setFencePort(fencePort.port());
setVideoLayerFrame(bounds);
mach_port_deallocate(mach_task_self(), fencePort.port());
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes