mirror of
https://github.com/matrix-construct/construct
synced 2024-06-02 18:18:56 +02:00
ircd::js: Fix trap constructor handler (?)
This commit is contained in:
parent
3fcd3d2bb0
commit
1adc76034c
|
@ -549,7 +549,7 @@ noexcept try
|
|||
auto &trap(from(that));
|
||||
trap.debug("ctor: '%s'", trap.name().c_str());
|
||||
|
||||
object ret(JS_NewObjectForConstructor(*cx, &trap.jsclass(), args));
|
||||
object ret(JS_NewObjectWithGivenProto(*cx, &trap.jsclass(), that));
|
||||
trap.on_ctor(ret, args);
|
||||
args.rval().set(ret);
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue