[gjs] Remove usage of JS_IsConstructing_PossiblyWithGivenThisObject



commit 2e37d241c0d5590220ff022f5e8dd9e056384fcb
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Nov 17 15:21:18 2011 -0500

    Remove usage of JS_IsConstructing_PossiblyWithGivenThisObject
    
    https://bugzilla.gnome.org/show_bug.cgi?id=663441

 gjs/compat.h |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gjs/compat.h b/gjs/compat.h
index 3ceeb1d..e06c1ef 100644
--- a/gjs/compat.h
+++ b/gjs/compat.h
@@ -95,12 +95,11 @@ gjs_##name##_constructor(JSContext  *context,           \
  */
 #define GJS_NATIVE_CONSTRUCTOR_PRELUDE(name)                                         \
     {                                                                                \
-        if (!JS_IsConstructing_PossiblyWithGivenThisObject(context, vp, &object)) {  \
+        if (!JS_IsConstructing(context, vp)) {  \
             gjs_throw_constructor_error(context);                                    \
             return JS_FALSE;                                                         \
         }                                                                            \
-        if (object == NULL)                                                          \
-            object = JS_NewObjectForConstructor(context, vp);                        \
+        object = JS_NewObjectForConstructor(context, vp);                            \
         if (object == NULL)                                                          \
             return JS_FALSE;                                                         \
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]