Bug 1447428 - Check if FilterNodeCapture was able to successfully validate. r=Bas, a=RyanVM
authorRyan Hunt <rhunt@eqrion.net>
Mon, 26 Mar 2018 12:48:57 -0500
changeset 462930 d12219f7d74b2ec74df6b9df88fab3e700ca51c3
parent 462929 623ccfdac45e94dc707b8e55328c4777ec10dba8
child 462931 b875912b97139513d8cf8319988cb08390abc2a3
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBas, RyanVM
bugs1447428
milestone60.0
Bug 1447428 - Check if FilterNodeCapture was able to successfully validate. r=Bas, a=RyanVM
gfx/2d/DrawCommands.h
--- a/gfx/2d/DrawCommands.h
+++ b/gfx/2d/DrawCommands.h
@@ -235,16 +235,23 @@ public:
     CLONE_INTO(DrawFilterCommand)(mFilter, mSourceRect, mDestPoint, mOptions);
   }
 
   virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
   {
     RefPtr<FilterNode> filter = mFilter;
     if (mFilter->GetBackendType() == FilterBackend::FILTER_BACKEND_CAPTURE) {
       filter = static_cast<FilterNodeCapture*>(filter.get())->Validate(aDT);
+
+      // This can happen if the FilterNodeCapture is unable to create a
+      // backing FilterNode on the target backend. Normally this would be
+      // handled by the painting code, but here there's not much we can do.
+      if (!filter) {
+        return;
+      }
     }
     aDT->DrawFilter(filter, mSourceRect, mDestPoint, mOptions);
   }
 
   void Log(TreeLog& aStream) const override
   {
     aStream << "[DrawFilter surf=" << mFilter;
     aStream << " src=" << mSourceRect;