[gjs/wip/ptomato/mozjs45prep: 14/38] boxed: Undefined value for field	property
- From: Philip Chimento <pchimento src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gjs/wip/ptomato/mozjs45prep: 14/38] boxed: Undefined value for field	property
 
- Date: Tue,  4 Apr 2017 07:49:27 +0000 (UTC)
 
commit f9ee0a5e917a5a8a8d2314d143e30f45cd6d3dbe
Author: Philip Chimento <philip chimento gmail com>
Date:   Wed Mar 22 17:37:56 2017 +0000
    boxed: Undefined value for field property
    
    For boxed instances, the fields are implemented as properties with a
    getter and setter. In SpiderMonkey 45, those properties are required to
    have a value of undefined, rather than the (arbitrarily chosen) value of
    null that we previously had.
 gi/boxed.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gi/boxed.cpp b/gi/boxed.cpp
index e212b27..735145d 100644
--- a/gi/boxed.cpp
+++ b/gi/boxed.cpp
@@ -887,7 +887,7 @@ define_boxed_class_fields(JSContext       *cx,
         if (!setter)
             return false;
 
-        if (!JS_DefineProperty(cx, proto, field_name, JS::NullHandleValue,
+        if (!JS_DefineProperty(cx, proto, field_name, JS::UndefinedHandleValue,
                                JSPROP_PERMANENT | JSPROP_SHARED | JSPROP_GETTER | JSPROP_SETTER,
                                JS_DATA_TO_FUNC_PTR(JSNative, getter.get()),
                                JS_DATA_TO_FUNC_PTR(JSNative, setter.get())))
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]