Use PendingScript in ScriptRunner
This CL replaces the most of ScriptLoader references in ScriptRunner with PendingScript. ScriptLoader is still used - When the script is evaluated, because ScriptLoader::Execute() is still in ScriptLoader. ScriptLoader is obtained by PendingScript::GetElement()->Loader() here, but this will be removed by [1] once ScriptLoader::Execute() is removed. - When the script element is moved between documents, because we have to get PendingScript via the Element->ScriptLoader->PendingScript path. This is done by GetPendingScriptIfControlledByScriptRunnerForCrossDocMove() in MovePendingScript(), which will be the last use of GetPendingScriptIfControlledByScriptRunner() that will remain until [2] that is not planned to land soon. No behavior changes. [1] https://chromium-review.googlesource.com/1054553 [2] https://chromium-review.googlesource.com/1041143 Bug: 842349 Change-Id: Idc36b00c8c25fe8e24ff60e980608d8b324fec5e Reviewed-on: https://chromium-review.googlesource.com/1053354 Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Reviewed-by:Kouhei Ueno <kouhei@chromium.org> Reviewed-by:
Daniel Vogelheim <vogelheim@chromium.org> Cr-Commit-Position: refs/heads/master@{#560874}
Showing
Please register or sign in to comment