Closed Bug 1211270 Opened 9 years ago Closed 8 years ago

Intermittent e10s browser_onbeforeunload_navigation.js | Test timed out

Categories

(Core :: DOM: Navigation, defect, P5)

defect

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
e10s + ---
firefox49 --- wontfix
firefox50 --- fixed
firefox51 --- fixed
firefox52 --- fixed

People

(Reporter: philor, Assigned: billm)

References

(Blocks 1 open bug)

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

Blocks: e10s-tests
tracking-e10s: --- → +
Bill, this seems to have started *around* the time you landed the changes in bug 967873.

All the logs I looked at have "Error: operation not possible on dead CPOW" like this:

 17:26:01     INFO -  402 INFO A document loaded in a tab!
 17:26:01     INFO -  403 INFO TEST-PASS | docshell/test/browser/browser_onbeforeunload_navigation.js | Loaded the expected page -
 17:26:01     INFO -  404 INFO TEST-PASS | docshell/test/browser/browser_onbeforeunload_navigation.js | Same doc -
 17:26:01     INFO -  405 INFO TEST-PASS | docshell/test/browser/browser_onbeforeunload_navigation.js | We should only fire if we're expecting to let the onbeforeunload dialog proceed to the new location -
 17:26:01     INFO -  406 INFO TEST-PASS | docshell/test/browser/browser_onbeforeunload_navigation.js | Should have loaded the expected new page -
 17:26:01     INFO -  407 INFO A document loaded in a tab!
 17:26:01     INFO -  408 INFO Console message: [JavaScript Error: "Error: operation not possible on dead CPOW" {file: "resource://gre/modules/RemoteAddonsParent.jsm" line: 568}]
 17:26:01     INFO -  409 INFO TEST-UNEXPECTED-FAIL | docshell/test/browser/browser_onbeforeunload_navigation.js | Test timed out -
 17:26:01     INFO -  MEMORY STAT | vsize 627MB | vsizeMaxContiguous 594MB | residentFast 211MB | heapAllocated 57MB
 17:26:01     INFO -  410 INFO TEST-OK | docshell/test/browser/browser_onbeforeunload_navigation.js | took 45096ms
 17:26:01     INFO -  411 INFO TEST-START | docshell/test/browser/browser_search_notification.js
Flags: needinfo?(wmccloskey)
Assignee: nobody → wmccloskey
Intermittent e10s test failure
Priority: -- → P5
Attached patch patchSplinter Review
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.
Flags: needinfo?(wmccloskey)
Attachment #8802335 - Flags: review?(mrbkap)
Attachment #8802335 - Flags: review?(mrbkap) → review+
Pushed by wmccloskey@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/d999217b98de
Fix CPOW bug in browser_onbeforeunload_navigation.js (r=mrbkap)
https://hg.mozilla.org/mozilla-central/rev/d999217b98de
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.