Don't need fnName here.
This commit is contained in:
parent
ee9aeb8c3c
commit
a01a9a53b7
@ -82,7 +82,7 @@ export function WorkerPortal(context, worker, serialize) {
|
||||
}
|
||||
}
|
||||
|
||||
function injectionPointFactory(fnId, fnName, callbackFactory) {
|
||||
function injectionPointFactory(fnId, callbackFactory) {
|
||||
return () =>
|
||||
new Promise((resolve, reject) => {
|
||||
const id = callCount;
|
||||
@ -96,7 +96,7 @@ export function WorkerPortal(context, worker, serialize) {
|
||||
return linkedFunctionNames => {
|
||||
const externalInterface = {};
|
||||
linkedFunctionNames.forEach((fnName, index) => {
|
||||
externalInterface[fnName] = injectionPointFactory(index, fnName);
|
||||
externalInterface[fnName] = injectionPointFactory(index);
|
||||
});
|
||||
resolve(externalInterface);
|
||||
return contextIndex;
|
||||
@ -110,5 +110,5 @@ export function WorkerPortal(context, worker, serialize) {
|
||||
contextIndex.splice(0, 0, '__init');
|
||||
context.__init = resolveExternalInterfaceFactory(resolve);
|
||||
})
|
||||
: injectionPointFactory(0, '___init___', resolveExternalInterfaceFactory)(contextIndex);
|
||||
: injectionPointFactory(0, resolveExternalInterfaceFactory)(contextIndex);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user