Support window.parent in the one-window case.
Merge pull request #2948 from jgraham/window_parent

Support window.parent in the one-window case; r=Ms2ger