diff --git a/js/src/jsfriendapi.cpp b/js/src/jsfriendapi.cpp index 19a7ad69345..ece220ade1c 100644 --- a/js/src/jsfriendapi.cpp +++ b/js/src/jsfriendapi.cpp @@ -747,7 +747,7 @@ NotifyDidPaint(JSRuntime *rt) extern JS_FRIEND_API(bool) IsIncrementalGCEnabled(JSRuntime *rt) { - return rt->gcIncrementalEnabled; + return rt->gcIncrementalEnabled && rt->gcMode == JSGC_MODE_INCREMENTAL; } extern JS_FRIEND_API(void)