0
0
Fork 0
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:
Jason Volk 2016-10-30 06:57:54 -07:00
parent 3fcd3d2bb0
commit 1adc76034c

View file

@ -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;