Bug 1070466 - Crash [@ mozilla::gfx::StreamPathToSinkApplierFunc] after path.addPath(path). r=roc

This commit is contained in:
Rik Cabanier 2014-09-20 11:03:00 -04:00
parent 0dface3757
commit d89b95d6a7
2 changed files with 3 additions and 0 deletions

View File

@ -4622,6 +4622,7 @@ CanvasPath::AddPath(CanvasPath& aCanvasPath, const Optional<NonNull<SVGMatrix>>&
}
}
EnsurePathBuilder(); // in case a path is added to itself
tempPath->StreamToSink(mPathBuilder);
}

View File

@ -378,6 +378,8 @@ function test_addpath_canvas() {
shouldThrow(ctx, "p5.addPath(null, m)");
shouldThrow(ctx, "p5.addPath([], m)");
shouldThrow(ctx, "p5.addPath({}, m)");
p5 = p5.addPath(p5);
}
</script>