Use ToScriptState in ScriptController
This CL merges the logic for getting `v8::Context` in ScriptController into ToScriptState*() methods, in order to Unify code paths around script evaluation and decouple them from ScriptController. This is preparation for https://chromium-review.googlesource.com/c/chromium/src/+/2413430 that will move out script evaluation methods out of ScriptController. Since `ScriptController::window_proxy_manager_` is equal to its LocalDOMWindow's Frame's `window_proxy_manager_`, this CL keeps the existing behavior, except that ToScriptState*() methods have more checks that result in null ScriptState and thus skipping script evaluation. This CL removes MainWorldProxy() methods that are no longer used after this CL. Bug: 1111134 Change-Id: I49247650ec984d04f3dd44115d197044f021c1f7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2543189Reviewed-by:Yuki Shiino <yukishiino@chromium.org> Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Cr-Commit-Position: refs/heads/master@{#829941}
Showing
Please register or sign in to comment