[FrameFetchContext] Stop consulting ScriptController when detached

FrameFetchContext::Detach can be called during V8 the collection step
and it's not safe to call ScriptController::ShouldBypassMainWorldCSP in
the function. On the other hand,
ScriptController::ShouldBypassMainWorldCSP relies on
v8::Isolate::GetCurrentContext and hence doesn't work correctly when
not directly called from JS. So eturning false when detached won't break
things.

Bug: 695939, 732755
Change-Id: I1a648fd57d0a31236aa8caf2890ae938f2166f62
Reviewed-on: https://chromium-review.googlesource.com/535255
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479308}
1 file changed