Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ES6] Return JSInternalPromise as result of evaluateModule
https://bugs.webkit.org/show_bug.cgi?id=148173 Reviewed by Saam Barati. Now evaluateModule returns JSInternalPromise* as its result value. When an error occurs while loading or executing the modules, this promise is rejected by that error. By leveraging this, we implemented asynchronous error reporting when executing the modules in JSC shell. And this patch also changes the evaluateModule signature to accept the entry point by the moduleName. By using it, JSC shell can start executing the modules with the entry point module name. * builtins/ModuleLoaderObject.js: (loadModule): * jsc.cpp: (dumpException): (runWithScripts): * runtime/Completion.cpp: (JSC::evaluateModule): * runtime/Completion.h: * runtime/JSInternalPromise.cpp: (JSC::JSInternalPromise::then): * runtime/JSInternalPromise.h: * runtime/ModuleLoaderObject.cpp: (JSC::ModuleLoaderObject::requestInstantiateAll): (JSC::ModuleLoaderObject::loadModule): (JSC::ModuleLoaderObject::resolve): (JSC::ModuleLoaderObject::fetch): (JSC::ModuleLoaderObject::translate): (JSC::ModuleLoaderObject::instantiate): (JSC::moduleLoaderObjectParseModule): * runtime/ModuleLoaderObject.h: Canonical link: https://commits.webkit.org/166521@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188894 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
36ffdd0
commit 4e4c32b
Showing
9 changed files
with
197 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.