[gjs/wip/ptomato/mozjs45prep: 7/13] jsapi-class: Remove unnecessary default



commit 52d404b8926cd9153fcc726bde90e44f55d9a614
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.

 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]