summaryrefslogtreecommitdiff
path: root/gjs/jsapi-util-root.h
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2017-12-10 01:09:13 -0800
committerPhilip Chimento <philip.chimento@gmail.com>2018-07-28 22:15:51 -0400
commit67d7efc63211cffb4e8528d4dd40153968561cca (patch)
treefdaf17e33622ded1abf2f31169a1af02ce48d41f /gjs/jsapi-util-root.h
parentfbd03385b5acd785b61dede79013adfe65f39b42 (diff)
downloadgjs-67d7efc63211cffb4e8528d4dd40153968561cca.tar.gz
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
Diffstat (limited to 'gjs/jsapi-util-root.h')
-rw-r--r--gjs/jsapi-util-root.h5
1 files changed, 1 insertions, 4 deletions
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<JSObject *> {
/* 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);
}
};