Crash at [WKContentView _applicationWillEnterForeground:] + 28
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Jul 2014 20:13:34 +0000 (20:13 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Jul 2014 20:13:34 +0000 (20:13 +0000)
<rdar://problem/17797103>

Reviewed by Sam Weinig.

* UIProcess/ios/WKContentView.mm:
(-[WKContentView _applicationWillEnterForeground:]):
Drawing area can be null; null check it!
It's ok if we don't hide the content in this case, because if the drawing area is null,
it doesn't have any layers in the tree anyway.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171518 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/ios/WKContentView.mm

index 1308f881f12be1544be4b04bd9422aa9a16f2b2e..929efa6a39c00a0d41ce4bb1a4564765787ca6a3 100644 (file)
@@ -1,3 +1,16 @@
+2014-07-24  Tim Horton  <timothy_horton@apple.com>
+
+        Crash at [WKContentView _applicationWillEnterForeground:] + 28
+        <rdar://problem/17797103>
+
+        Reviewed by Sam Weinig.
+
+        * UIProcess/ios/WKContentView.mm:
+        (-[WKContentView _applicationWillEnterForeground:]):
+        Drawing area can be null; null check it!
+        It's ok if we don't hide the content in this case, because if the drawing area is null,
+        it doesn't have any layers in the tree anyway.
+
 2014-07-23  Simon Fraser  <simon.fraser@apple.com>
 
         [iOS WK2] Some help.apple.com pages not scrollable
index 9c8d64e270619bdddf104e8a309788092bcc9fd2..f79918206a01101c68f989d599e73246cf97ece6 100644 (file)
@@ -510,7 +510,8 @@ private:
 - (void)_applicationWillEnterForeground:(NSNotification*)notification
 {
     _page->applicationWillEnterForeground();
-    _page->drawingArea()->hideContentUntilNextUpdate();
+    if (auto drawingArea = _page->drawingArea())
+        drawingArea->hideContentUntilNextUpdate();
     _page->viewStateDidChange(ViewState::AllFlags & ~ViewState::IsInWindow, true, WebPageProxy::ViewStateChangeDispatchMode::Immediate);
 }