[gjs/wip/ptomato/mozjs38: 16/32] js: Adapt to upcoming JS::Heap API



commit 331733c98828af303f6f7a7c9a05858680ca74ad
Author: Philip Chimento <philip chimento gmail com>
Date:   Wed Jan 11 23:41:44 2017 -0800

    js: Adapt to upcoming JS::Heap API
    
    These lines as they previously were cause compile errors in SpiderMonkey
    38. JS::Heap's operators are defined slightly differently than they
    previously were.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=776966

 gi/fundamental.cpp |    2 +-
 gjs/context.cpp    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gi/fundamental.cpp b/gi/fundamental.cpp
index 8bf0153..5f10fef 100644
--- a/gi/fundamental.cpp
+++ b/gi/fundamental.cpp
@@ -381,7 +381,7 @@ fundamental_invoke_constructor(FundamentalInstance        *priv,
 
     if (!gjs_object_require_property_value(context, obj, NULL,
                                            constructor_const, &js_constructor) ||
-        priv->prototype->constructor_name == JSID_VOID) {
+        priv->prototype->constructor_name.get() == JSID_VOID) {
         gjs_throw (context,
                    "Couldn't find a constructor for type %s.%s",
                    g_base_info_get_namespace((GIBaseInfo*) priv->prototype->info),
diff --git a/gjs/context.cpp b/gjs/context.cpp
index 1c3b829..e814841 100644
--- a/gjs/context.cpp
+++ b/gjs/context.cpp
@@ -487,7 +487,7 @@ gjs_context_constructed(GObject *object)
     if (!JS_DefineFunctions(js_context->context, global, &global_funcs[0]))
         g_error("Failed to define properties on the global object");
 
-    js_context->global.set(global);
+    js_context->global = global;
     JS_AddExtraGCRootsTracer(js_context->runtime, gjs_context_tracer, js_context);
 
     gjs_define_constructor_proxy_factory(js_context->context);


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