Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[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
Showing
with
197 additions
and 46 deletions.
- +37 −0 Source/JavaScriptCore/ChangeLog
- +18 −0 Source/JavaScriptCore/builtins/ModuleLoaderObject.js
- +37 −14 Source/JavaScriptCore/jsc.cpp
- +42 −20 Source/JavaScriptCore/runtime/Completion.cpp
- +4 −1 Source/JavaScriptCore/runtime/Completion.h
- +15 −0 Source/JavaScriptCore/runtime/JSInternalPromise.cpp
- +12 −0 Source/JavaScriptCore/runtime/JSInternalPromise.h
- +24 −6 Source/JavaScriptCore/runtime/ModuleLoaderObject.cpp
- +8 −5 Source/JavaScriptCore/runtime/ModuleLoaderObject.h
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.