success to call promise

This commit is contained in:
pengfei.zhou
2019-07-22 11:22:19 +08:00
parent eb1c076dfb
commit 410ee99414
6 changed files with 57 additions and 31 deletions

View File

@@ -46,7 +46,7 @@ export function jsCallResolve(contextId: string, callbackId: string, args?: any)
for (let i = 2; i < arguments.length; i++) {
argumentsList.push(arguments[i])
}
Reflect.apply(callback.resolve, context, args)
Reflect.apply(callback.resolve, context, argumentsList)
}
export function jsCallReject(contextId: string, callbackId: string, args?: any) {
@@ -64,7 +64,7 @@ export function jsCallReject(contextId: string, callbackId: string, args?: any)
for (let i = 2; i < arguments.length; i++) {
argumentsList.push(arguments[i])
}
Reflect.apply(callback.reject, context, args)
Reflect.apply(callback.reject, context, argumentsList)
}
export class Context {

View File

@@ -1,7 +1,6 @@
import { } from './../runtime/global';
import { View, Stack, Group } from "./view";
import { log } from 'util';
import { loge } from '../util/log';
import { loge, log } from '../util/log';
export function Link(context: any) {
return <T extends { new(...args: any[]): {} }>(constructor: T) => {