specific javascript code will crash firefox
Posted: Sat Apr 11, 2015 11:40 am
NoScript 2.6.9.21
Firefox 37 Linux / 38 Beta Win7
these codes below will crash firefox with noscript enabled
test.html
Firefox 37 Linux / 38 Beta Win7
these codes below will crash firefox with noscript enabled
test.html
Code: Select all
<!DOCTYPE HTML>
<html>
<head>
<title></title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<script>
(new window.MutationObserver(function (mRecords) {
var wPlugins = [];
mRecords.forEach(function (mRecord) {
var addedNodes = mRecord.addedNodes;
if (!addedNodes.length) {
return;
}
[].forEach.call(addedNodes, function (node) {
if (node.nodeType != 1) return;
if (/^(?:OBJECT|EMBED)$/.test(node.nodeName)) {
wPlugins.push(node);
};
[].push.apply(wPlugins, node.querySelectorAll('object, embed'));
});
});
initializer(wPlugins);
})).observe(document, {
childList: true,
subtree: true,
});
function initializer(plugins) {
plugins.forEach(function(plugin) {
if (plugin._reinitialized === true) {
return;
}
plugin._reinitialized = true;
var p = plugin.parentNode;
var s = plugin.previousSibling;
p.removeChild(plugin);
setTimeout(function() {
p.insertBefore(plugin, s);
}, 20);
});
}
</script>
</head>
<body>
<embed style="" class="" name="Player" id="Player" src="http://www.91jucai.com/ckplayer/ckplayer.swf" flashvars="a=XOTI4NDY2MDc2_wd1" quality="high" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" align="middle" width="550" height="400">
</body>
</html>