mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-27 20:20:52 +00:00
bugfix:Proxy function backstack error
issue:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I9GJXA Signed-off-by: hecunmao <hecunmao@huawei.com> Change-Id: I9209666fa479e30ef8950d3e1f44225c4452027d
This commit is contained in:
parent
46cbbff369
commit
bbb5853e50
@ -1026,9 +1026,15 @@ JSTaggedValue JSProxy::ConstructInternal(EcmaRuntimeCallInfo *info)
|
||||
JSHandle<JSArray> arrHandle = JSArray::CreateArrayFromList(thread, taggedArray);
|
||||
|
||||
// step 8 ~ 9 Call(trap, handler, «target, argArray, newTarget »).
|
||||
JSHandle<JSTaggedValue> newTarget(info->GetNewTarget());
|
||||
JSHandle<JSTaggedValue> newTarget(thread, info->GetNewTargetValue());
|
||||
const uint32_t argsLength = 3; // 3: «target, argArray, newTarget »
|
||||
JSHandle<JSTaggedValue> undefined = globalConst->GetHandledUndefined();
|
||||
|
||||
JSTaggedType *currentSp = reinterpret_cast<JSTaggedType *>(info);
|
||||
InterpretedEntryFrame *currentEntryState = InterpretedEntryFrame::GetFrameFromSp(currentSp);
|
||||
JSTaggedType *prevSp = currentEntryState->base.prev;
|
||||
thread->SetCurrentSPFrame(prevSp);
|
||||
|
||||
EcmaRuntimeCallInfo *runtimeInfo =
|
||||
EcmaInterpreter::NewRuntimeCallInfo(thread, method, handler, undefined, argsLength);
|
||||
RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread);
|
||||
|
@ -25,3 +25,4 @@ constructor is fail
|
||||
TypeError
|
||||
[object Array]
|
||||
TypeError: function.toString() target is incompatible object
|
||||
test proxy constructor success!
|
||||
|
@ -110,4 +110,14 @@ print(Object.prototype.toString.call(pro1));
|
||||
} catch (error) {
|
||||
print(error);
|
||||
}
|
||||
}
|
||||
}
|
||||
class C9{};
|
||||
let v4 = new Proxy(Uint32Array,Reflect);
|
||||
class C4 extends v4 {
|
||||
constructor(a6,a7,a8){
|
||||
super();
|
||||
new C9(a7,C4);
|
||||
}
|
||||
}
|
||||
new C4();
|
||||
print("test proxy constructor success!")
|
||||
|
Loading…
Reference in New Issue
Block a user