RESOLVED FIXED 167099
[JSC] export JSC::importModule API for WebCore dynamic import
https://bugs.webkit.org/show_bug.cgi?id=167099
Summary [JSC] export JSC::importModule API for WebCore dynamic import
Yusuke Suzuki
Reported 2017-01-16 11:20:54 PST
[JSC] export JSC::importModule API for WebCore dynamic import
Attachments
Patch (12.61 KB, patch)
2017-01-16 11:22 PST, Yusuke Suzuki
darin: review+
Yusuke Suzuki
Comment 1 2017-01-16 11:22:49 PST
Darin Adler
Comment 2 2017-01-21 13:51:47 PST
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?
Yusuke Suzuki
Comment 3 2017-01-21 14:23:02 PST
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.
Yusuke Suzuki
Comment 4 2017-01-21 14:24:12 PST
Note You need to log in before you can comment on or make changes to this bug.