whatwg / loader

Loader Standard
https://whatwg.github.io/loader/
Creative Commons Zero v1.0 Universal
607 stars 45 forks source link

Separate "force fulfill" operation from the CommitInstantiated #67

Closed Constellation closed 9 years ago

Constellation commented 9 years ago

While the RequestInstantiate fulfills entry.[[Instantiate]] promise with the registry entry (as the returned value of the promise), CommitInstantiated step 4 will fulfill it with the module instance proactively.

In this patch, we separate the "force fulfill" operation from the CommitInstantiated. Move this operation to the FulFillInstantiate. And here, we will fulfill the entry.[[Instantiate]] promise with the registry entry because the hander side requires it.

Constellation commented 9 years ago

Thanks for your reviews! I'll update the PR to reflect your comments.

dherman commented 9 years ago

Recent overhauls to the spec have obsoleted this PR -- in particular, commit 261543c66c235b2a4b3a9e5076b6dd0386a94ec3 eliminates the explicit fulfillment of the [[Instantiate]] promise, which is now simply piped through the pipeline thanks to Caridy's work in commit 2eff7f162b1d34ed1a2220c07e91d5b1c2513038.