From 67d7efc63211cffb4e8528d4dd40153968561cca Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Sun, 10 Dec 2017 01:09:13 -0800 Subject: js: Misc mozjs60 API changes - An argument that we didn't use was removed from the JSFinalizeCallback signature - JS_SetLocaleCallbacks API changed (is JSRuntime coming back again?) - Giving a JSVERSION to a compartment or CompileOptions is not supported anymore - Use JS::CurrentThreadIsHeapCollecting() instead of our hacky workaround in GC - JS::PromiseRejectionHandlingState now is in the JS namespace - JS::Value is now incompatible with C-linkage, so any function returning one must be moved outside G_BEGIN_DECLS/G_END_DECLS - JSPROP_SHARED is gone - Defining a property with getter and setter now doesn't take a JS::Value See: #161 --- gjs/jsapi-util-root.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'gjs/jsapi-util-root.h') diff --git a/gjs/jsapi-util-root.h b/gjs/jsapi-util-root.h index 785ba184..f3f862c2 100644 --- a/gjs/jsapi-util-root.h +++ b/gjs/jsapi-util-root.h @@ -84,10 +84,7 @@ struct GjsHeapOperation { /* If the object has been swept already, then the zone is nullptr */ if (!obj || !js::gc::detail::GetGCThingZone(uintptr_t(obj))) return; - /* COMPAT: Use JS::CurrentThreadIsHeapCollecting() in mozjs59 */ - JS::GCCellPtr ptr(obj, JS::TraceKind::Object); - JS::shadow::Runtime *rt = js::gc::detail::GetCellRuntime(ptr.asCell()); - if (!rt->isHeapCollecting()) + if (!JS::CurrentThreadIsHeapCollecting()) JS::ExposeObjectToActiveJS(obj); } }; -- cgit v1.2.1