People sometimes use WebLocalFrame::FrameForCurrentContext as a convenient way to get *some* frame.
This is dangerous because if the code is not a right context, it has a risk of leaking info of a wrong context.
There are multiple places using WebLocalFrame::FrameForCurrentContext in a wrong way...
e.g., https://bugs.chromium.org/p/chromium/issues/detail?id=795286
e.g., https://chromium-review.googlesource.com/c/chromium/src/+/987804
I think we should deprecate WebLocalFrame::FrameForCurrentContext. Or rename it to WebLocalFrame::SuperUnsafeFrameForCurrentContext.
Comment 1 by haraken@chromium.org
, Apr 13 2018