3 years ago
Assignee: nobody → wmccloskey
Intermittent e10s test failure
Priority: -- → P5
I think I found the problem. We keep this contentWindow object around and rely on it to reference the outer window. For CPOWs, that doesn't work so well. The object we save is the current outer window proxy. When we navigate, we get a new compartment and a new outer window proxy in that compartment. The old outer window proxy could be collected at any time. Ideally I guess CPOWs would have some special way of storing outer windows so that the CPOW actual references the docshell or something. But that's pretty awkward to implement and I don't want to spend time on it. I think that setting contentWindow to null here isn't a problem. It means we skip an |is(contentWindow.document, event.target)| check in onTabLoaded. I don't think this is a big deal. There aren't any frames here, so I don't see what other document we could possibly be getting.
Attachment #8802335 - Flags: review?(mrbkap)
Attachment #8802335 - Flags: review?(mrbkap) → review+
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/d999217b98de Fix CPOW bug in browser_onbeforeunload_navigation.js (r=mrbkap)
You need to log in before you can comment on or make changes to this bug.