Bug 1569648 - Remove a bogus assertion. r=dholbert
authorEmilio Cobos Álvarez <emilio@crisal.io>
Wed, 14 Aug 2019 16:41:20 +0000
changeset 487987 dee7db615c4e59d244fdd679a1eeef1c03187c2e
parent 487986 0fe31de4a2712c918b59fba1c9de7e20db92d3bd
child 487988 3f93f3c645b92d2cec2137f831f555eeab79360f
push id36434
push usercbrindusan@mozilla.com
push dateThu, 15 Aug 2019 09:44:30 +0000
treeherdermozilla-central@144fbfb409b7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1569648
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1569648 - Remove a bogus assertion. r=dholbert There's no guarantee at all that the filter URI is valid, it just so happens that for regular CSS filters we bail out earlier. A bogus base URI makes relative uris just invalid, which triggers this assert. The assert was gracefully handled anyway, so no big deal. Differential Revision: https://phabricator.services.mozilla.com/D41952
dom/canvas/crashtests/1569648.html
dom/canvas/crashtests/crashtests.list
layout/svg/nsSVGFilterInstance.cpp
new file mode 100644
--- /dev/null
+++ b/dom/canvas/crashtests/1569648.html
@@ -0,0 +1,5 @@
+<!doctype html>
+<base href="a:">
+<script>
+  document.createElement("canvas").getContext("2d").filter = "url()";
+</script>
--- a/dom/canvas/crashtests/crashtests.list
+++ b/dom/canvas/crashtests/crashtests.list
@@ -50,8 +50,9 @@ load 1334647-1.html
 skip-if(geckoview&&webrender) load 1349067.html # Bug 1563214 for GV+WR
 pref(gfx.offscreencanvas.enabled,true) load 1348976-1.html
 load 1357092.html
 load 1441613.html
 pref(gfx.offscreencanvas.enabled,true) load 1443671.html
 pref(gfx.offscreencanvas.enabled,true) load 1546390.html
 load 1549853.html
 load 1551745.html
+load 1569648.html
--- a/layout/svg/nsSVGFilterInstance.cpp
+++ b/layout/svg/nsSVGFilterInstance.cpp
@@ -133,18 +133,16 @@ nsSVGFilterFrame* nsSVGFilterInstance::G
     }
 
     url = urlExtraReferrer->GetURI();
   } else {
     url = mFilter.AsUrl().ResolveLocalRef(mTargetContent);
   }
 
   if (!url) {
-    MOZ_ASSERT_UNREACHABLE(
-        "an StyleFilter of type URL should have a non-null URL");
     return nullptr;
   }
 
   // Look up the filter element by URL.
   IDTracker idTracker;
   bool watch = false;
   idTracker.ResetToURIFragmentID(
       mTargetContent, url, mFilter.AsUrl().ExtraData().ReferrerInfo(), watch);