4 <svg id=
"outerSvg" width=
"50%" height=
"50%"
5 style=
"border: 1px solid black">
7 <script type=
"application/javascript">
8 /* I'm not sure what exactly was required to trigger bug
1288228's crash,
9 * but it involved tweaking a length's specified units and cycle-collecting
10 * and reloading (in some combination). So, we'll tweak the units and
11 * cycle-collect a few times, and message the outer page to reload us
12 * after we've made the first tweak.
15 let remainingTweaks = maxTweaks;
17 var savedBaseVal = document.getElementById(
"outerSvg").width.baseVal;
19 window.parent.SpecialPowers.DOMWindowUtils.cycleCollect();
24 console.log(
"tweaked");
25 savedBaseVal.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX);
26 savedBaseVal.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PERCENTAGE);
27 if (remainingTweaks == maxTweaks) {
28 window.parent.postMessage(
"ping",
"*"); // only do this on first tweak
30 if (--remainingTweaks) {