[JSC] export JSC::importModule API for WebCore dynamic import
Created attachment 298977 [details] Patch
Comment on attachment 298977 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=298977&action=review > Source/JavaScriptCore/jsc.cpp:1443 > + JSInternalPromiseDeferred* deferred = JSInternalPromiseDeferred::create(exec, globalObject); > + return deferred->reject(exec, error); I think this would read better without the local variable. > Source/JavaScriptCore/runtime/Completion.cpp:258 > + JSGlobalObject* globalObject = exec->vmEntryGlobalObject(); > + return globalObject->moduleLoader()->requestImportModule(exec, moduleKey, scriptFetcher); I think this would read better without the local variable. > Source/JavaScriptCore/runtime/JSModuleLoader.cpp:145 > + ASSERT(callType != CallType::None); What guarantees this is true?
Comment on attachment 298977 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=298977&action=review >> Source/JavaScriptCore/jsc.cpp:1443 >> + return deferred->reject(exec, error); > > I think this would read better without the local variable. Fixed. >> Source/JavaScriptCore/runtime/Completion.cpp:258 >> + return globalObject->moduleLoader()->requestImportModule(exec, moduleKey, scriptFetcher); > > I think this would read better without the local variable. Fixed. >> Source/JavaScriptCore/runtime/JSModuleLoader.cpp:145 >> + ASSERT(callType != CallType::None); > > What guarantees this is true? Yes. JSModuleLoader is not visible to users. Thus, JSC can guarantee this condition.
Committed r211018: <http://trac.webkit.org/changeset/211018>