[ES6 modules] ModulatorImpl::ExecuteModule should report error acquired via GetError

Before this CL, ExecuteModule reported error acquired via
ModuleScript::GetErrorInternal. This is not always correct after
40485cc21560912f7b2c943a4d6b5646480faa61. ModuleScript::GetErrorInternal only
refers to preinstantiation errors, and we may have errors stored inside
module records as [[ErrorCompletion]] field's [[Value]].

This CL corrects ExecuteModule to report the appropriate error by using error
acquired by ModulatorImpl::GetError, which correctly implements the
"#concept-module-script-error" spec concept.

This is tested by wpt/html/semantics/scripting-1/the-script-element/module/evaluation-error-*.html.
However the wpt tests don't pass until we have updated

Bug: 594639, 727299, https://github.com/whatwg/html/pull/2674 , https://github.com/tc39/ecma262/pull/916
Change-Id: I97de9762bfad58e1f1b71bedf524761e53d43158
Reviewed-on: https://chromium-review.googlesource.com/558725
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#483908}
1 file changed