[SyntheticModules] Rename ModuleRecordResolver::GetHostDefined and Remove Spec Reference
The purpose of ModuleRecordResolver::GetHostDefined has been to convert from a Module Record to the corresponding Module Script, which previously happened to always be the [[HostDefined]] -- however that is no longer the case. The root cause of the divergence from the spec is that while the spec defines [[HostDefined]] as a field on the ES Module Record, the Chromium implementation chose to define it in Blink using ModuleRecordResolver. Now that the usage of [[HostDefined]] has been expanded for other purposes, this divergence is more obvious. Therefore we propose the following to make it clear that ModuleRecordResolver functionality does not correspond to the spec's concept of [[HostDefined]]: 1) Remove the spec reference comment: "// Corresponds to the spec concept "[[HostDefined]]"." from the GetHostDefined method. 2) Change the name of the ModuleRecordResolver::GetHostDefined to GetModuleScriptFromModuleRecord. This need for this CL was exposed by a related CL: https://chromium-review.googlesource.com/c/chromium/src/+/1694604 Change-Id: Ie020443d7618803e422cb833ac6e173cfabb045f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1707468 Commit-Queue: Kouhei Ueno <kouhei@chromium.org> Reviewed-by:Kouhei Ueno <kouhei@chromium.org> Cr-Commit-Position: refs/heads/master@{#678522}
Showing
Please register or sign in to comment