xpcom/string/crashtests/395651-1.html

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 <html>
     2 <head>
     3 <script>
     5 function X() { dump("X\n"); }
     6 function Y() { dump("Y\n"); }
     8 function boom()
     9 {
    10   dump("Start9\n");
    12   var div = document.getElementById("v");
    14   var textNode = document.createTextNode(String.fromCharCode(0xDAAF)); // high surrogate
    15   div.appendChild(textNode);
    17   document.addEventListener("DOMCharacterDataModified", X, true);
    18   textNode.data += 'B';
    19   document.removeEventListener("DOMCharacterDataModified", X, true);
    21   document.addEventListener("DOMAttrModified", Y, true);
    22   textNode.data += String.fromCharCode(0xDF53); // low surrogate
    23   document.removeEventListener("DOMAttrModified", Y, true);
    24 }
    26 </script>
    27 </head>
    29 <body onload="boom();"><div id="v"></div></body>
    31 </html>

mercurial