Don't crash in V8Window::openMethodCustom when called on RemoteDOMWindow.
Don't crash in V8Window::openMethodCustom when called on RemoteDOMWindow.

Currently, openMethodCustom assumes it's called on a LocalDOMWindow,
which may not be true in --site-per-process mode.  This CL moves the
cast to LocalDOMWindow to be done after the BindingSecurity check,
which should throw exceptions when called on RemoteDOMWindows (since
those are always cross-origin).

BUG=501414, 477150
TEST=http/tests/security/xss-exception.html with --site-per-process

Review URL: https://codereview.chromium.org/1194563003

git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@197295 bbb929c8-8fbe-4397-9dbb-9b2b20218538

Pluto-tv/blink-crosswalk,Pluto-tv/blink-crosswalk,Pluto-tv/blink-crosswalk,Pluto-tv/blink-crosswalk,Pluto-tv/blink-crosswalk,Pluto-tv/blink-crosswalk,Pluto-tv/blink-crosswalk,Pluto-tv/blink-crosswalk,Pluto-tv/blink-crosswalk,Pluto-tv/blink-crosswalk