[gjs/wip/ptomato/mozjs45: 4/27] jsapi-class: Remove unnecessary default



commit 726c23071b4c5f20297f28cfc512c3c97b1b883d
Author: Philip Chimento <philip chimento gmail com>
Date:   Sun Mar 19 05:19:41 2017 +0000

    jsapi-class: Remove unnecessary default
    
    This would have to change to nullptr in SpiderMonkey 45 since JS::Rooted
    now treats nullptr differently from NULL. But instead we can just remove
    it since it is already the default initial value for JS::RootedObject.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=781429

 gjs/jsapi-class.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gjs/jsapi-class.h b/gjs/jsapi-class.h
index 3c28c18..7797901 100644
--- a/gjs/jsapi-class.h
+++ b/gjs/jsapi-class.h
@@ -287,7 +287,7 @@ gjs_##name##_constructor(JSContext  *context,           \
  * be at the very top.
  */
 #define GJS_NATIVE_CONSTRUCTOR_VARIABLES(name)                      \
-    JS::RootedObject object(context, NULL);                         \
+    JS::RootedObject object(context);                               \
     JS::CallArgs argv G_GNUC_UNUSED = JS::CallArgsFromVp(argc, vp);
 
 /**


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