Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSpiderMonkey assertion failure (!IsCrossCompartmentWrapper(obj)) #24914
Comments
|
I can reproduce this crash with the following page served from a local HTTP server: <script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-2120330-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-4265510776914414"
data-ad-slot="9760224084"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
|
|
Same crash: <iframe srcdoc='<script>frameElement.onload=()=>{console.log("hi")}</script>'></iframe>When an iframe runs script that creates a callback object which will be invoked by the parent, we end up with a cross-compartment wrapper. The following is another way of triggering the same problem: <iframe></iframe>
<script>document.querySelector('iframe').contentWindow.setTimeout(()=>{}, 0)</script> |
|
We should look into Gecko's CallSetup implementation, which is more complex than Servo's. There are subtleties in which JS object we use (unwrapped or not unwrapped) to obtain a GlobalScope as well as for entering a JS realm. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With a build with
--debug-mozjs, I get the following output: