Title: [210619] trunk/Source/WebKit2
Revision
210619
Author
[email protected]
Date
2017-01-11 21:03:36 -0800 (Wed, 11 Jan 2017)

Log Message

[WK2][Cocoa] Avoid null dereference in FullScreen code.
https://bugs.webkit.org/show_bug.cgi?id=166957
<rdar://problem/27745004>

Reviewed by Eric Carlson.

* WebProcess/cocoa/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::didSetupFullscreen): Use protected reference to 'this', and check for valid
page before attempting to use it.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (210618 => 210619)


--- trunk/Source/WebKit2/ChangeLog	2017-01-12 04:11:32 UTC (rev 210618)
+++ trunk/Source/WebKit2/ChangeLog	2017-01-12 05:03:36 UTC (rev 210619)
@@ -1,3 +1,15 @@
+2017-01-11  Brent Fulgham  <[email protected]>
+
+        [WK2][Cocoa] Avoid null dereference in FullScreen code.
+        https://bugs.webkit.org/show_bug.cgi?id=166957
+        <rdar://problem/27745004>
+
+        Reviewed by Eric Carlson.
+
+        * WebProcess/cocoa/WebVideoFullscreenManager.mm:
+        (WebKit::WebVideoFullscreenManager::didSetupFullscreen): Use protected reference to 'this', and check for valid
+        page before attempting to use it.
+
 2017-01-11  Anders Carlsson  <[email protected]>
 
         navigator.plugins.refresh and WKContextRefreshPlugIns doesn't pick up changes to already-present plug-ins

Modified: trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.mm (210618 => 210619)


--- trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.mm	2017-01-12 04:11:32 UTC (rev 210618)
+++ trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.mm	2017-01-12 05:03:36 UTC (rev 210619)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014-2017 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -329,7 +329,10 @@
     
     model->setVideoFullscreenLayer(videoLayer, [strongThis, this, contextId] {
         dispatch_async(dispatch_get_main_queue(), [strongThis, this, contextId] {
-            m_page->send(Messages::WebVideoFullscreenManagerProxy::EnterFullscreen(contextId), m_page->pageID());
+            if (!strongThis->m_page)
+                return;
+
+            m_page->send(Messages::WebVideoFullscreenManagerProxy::EnterFullscreen(contextId), strongThis->m_page->pageID());
         });
     });
     
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to