Merge module script evaluation methods
Before this CL, there are three slightly different methods for module script evaluation: - Modulator::ExecuteModule() - ModuleRecord::Evaluate() - V8ScriptRunner::EvaluateModule() To unify the code paths and behavior, this CL - Merges them into V8ScriptRunner::EvaluateModule() (Mostly just inlining) - Merges Modulator::CaptureEvalErrorFlag into V8ScriptRunner::RethrowErrorsOption, and - Introduces a thin wrapper ModuleScript::RunScriptAndReturnValue() to align with the ClassicScript conterpart. The new behavior of V8ScriptRunner::EvaluateModule() is the same as the previous ModulatorImplBase::ExecuteModule(). This CL shouldn't change the non-test behavior, because all non-test code path went through ModulatorImplBase::ExecuteModule(), This CL also replaces some Modulator calls (that were in Modulator::ExecuteModule() and are now in V8ScriptRunner::EvaluateModule()) with equivalent direct calls to ExecutionContext, to avoid many more overrides in DummyModulator subclasses in unit tests. Bug: 1111134 Change-Id: Icbda1e657b33077f0ae1e681045b04857229cbfc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2462885Reviewed-by:Kentaro Hara <haraken@chromium.org> Reviewed-by:
Kouhei Ueno <kouhei@chromium.org> Reviewed-by:
Dominic Farolino <dom@chromium.org> Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org> Cr-Commit-Position: refs/heads/master@{#822046}
Showing
Please register or sign in to comment