Title: [266756] trunk/Source/WebKit
Revision
266756
Author
[email protected]
Date
2020-09-08 15:58:11 -0700 (Tue, 08 Sep 2020)

Log Message

Crashtracer inside PDFPlugin::createScrollbar.
<rdar://problem/68474062> and https://bugs.webkit.org/show_bug.cgi?id=216286

Reviewed by Tim Horton.

To quote Tim from r264945:
No new tests; timing is such that I can't reproduce without inserting
intentional delays into the main thread hops, which is further than
I'm willing to go for a test.

This is a speculative fix due to the aforementioned reproducibility issue.

* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::createScrollbar): Plugin hasn't been destroyed, and there's still a PluginView,
  but the PluginView isn't in a frame. So null check that.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (266755 => 266756)


--- trunk/Source/WebKit/ChangeLog	2020-09-08 22:09:09 UTC (rev 266755)
+++ trunk/Source/WebKit/ChangeLog	2020-09-08 22:58:11 UTC (rev 266756)
@@ -1,3 +1,21 @@
+2020-09-08  Brady Eidson  <[email protected]>
+
+        Crashtracer inside PDFPlugin::createScrollbar.
+        <rdar://problem/68474062> and https://bugs.webkit.org/show_bug.cgi?id=216286
+
+        Reviewed by Tim Horton.
+
+        To quote Tim from r264945:
+        No new tests; timing is such that I can't reproduce without inserting
+        intentional delays into the main thread hops, which is further than
+        I'm willing to go for a test.
+
+        This is a speculative fix due to the aforementioned reproducibility issue.
+
+        * WebProcess/Plugins/PDF/PDFPlugin.mm:
+        (WebKit::PDFPlugin::createScrollbar): Plugin hasn't been destroyed, and there's still a PluginView,
+          but the PluginView isn't in a frame. So null check that.
+
 2020-09-08  Alex Christensen  <[email protected]>
 
         Null check m_layerHostingContext in TiledCoreAnimationDrawingArea::sendDidFirstLayerFlushIfNeeded

Modified: trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm (266755 => 266756)


--- trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm	2020-09-08 22:09:09 UTC (rev 266755)
+++ trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm	2020-09-08 22:58:11 UTC (rev 266756)
@@ -1323,6 +1323,7 @@
         [m_containerLayer addSublayer:m_verticalScrollbarLayer.get()];
     }
     didAddScrollbar(widget.ptr(), orientation);
+
     if (auto* frame = m_frame.coreFrame()) {
         if (Page* page = frame->page()) {
             if (page->isMonitoringWheelEvents())
@@ -1329,7 +1330,14 @@
                 scrollAnimator().setWheelEventTestMonitor(page->wheelEventTestMonitor());
         }
     }
-    pluginView()->frame()->view()->addChild(widget);
+
+    // Is it ever possible that the code above and the code below can ever get at different Frames?
+    // Can't we settle on one Frame accessor?
+    if (auto* frame = pluginView()->frame()) {
+        if (auto* frameView = frame->view())
+            frameView->addChild(widget);
+    }
+
     return widget;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to