[gjs/wip/ptomato/mozjs45prep: 30/39] Revert "jsapi-dynamic-class: Use JS_LinkConstructorAndPrototype()"
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/wip/ptomato/mozjs45prep: 30/39] Revert "jsapi-dynamic-class: Use JS_LinkConstructorAndPrototype()"
- Date: Wed, 12 Apr 2017 06:47:12 +0000 (UTC)
commit ddb84ac99c743c6b093a44c0b103f30cbb2f2c79
Author: Philip Chimento <philip chimento gmail com>
Date: Tue Apr 11 22:06:44 2017 -0700
Revert "jsapi-dynamic-class: Use JS_LinkConstructorAndPrototype()"
This reverts commit bd36b0b06cf1c889de2316d17b839997e8758ef0.
UUUUUGHHH
JSPROP_RESOLVING?
gjs/jsapi-dynamic-class.cpp | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gjs/jsapi-dynamic-class.cpp b/gjs/jsapi-dynamic-class.cpp
index 819a000..15297cc 100644
--- a/gjs/jsapi-dynamic-class.cpp
+++ b/gjs/jsapi-dynamic-class.cpp
@@ -109,7 +109,12 @@ gjs_init_class_dynamic(JSContext *context,
if (static_fs && !JS_DefineFunctions(context, constructor, static_fs))
goto out;
- if (!JS_LinkConstructorAndPrototype(context, constructor, prototype))
+ if (!JS_DefineProperty(context, constructor, "prototype", prototype,
+ JSPROP_PERMANENT | JSPROP_READONLY,
+ JS_STUBGETTER, JS_STUBSETTER))
+ goto out;
+ if (!JS_DefineProperty(context, prototype, "constructor", constructor,
+ 0, JS_STUBGETTER, JS_STUBSETTER))
goto out;
/* The constructor defined by JS_InitClass has no property attributes, but this
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]