Binding: toV8Context should use scriptState->contextIsValid to validate the context
Binding: toV8Context should use scriptState->contextIsValid to validate the context

Currently toV8Context validates the context by checking toFrameIfNotDetached.
However, it is inconsistent that toV8Context uses toFrameIfNotDetached
but ScriptState::from uses scriptState->contextIsValid to validate the context.
toV8Context should use scriptState->contextIsValid as well.

I don't think there is any practical difference between the two checks,
but I inserted an ASSERT to compare the result of the two checks just in case.

BUG=506440

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

git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@198190 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