Bug 1027221 - Allow incremental GC barriers on off-main-thread permanent atoms. r=billm, a=sledru
☠☠ backed out by 4851cd40200f ☠ ☠
authorTerrence Cole <terrence@mozilla.com>
Thu, 26 Jun 2014 14:15:15 -0700
changeset 207516 9052bf4c9948a0bb9a82f052629a0986e8411d47
parent 207515 ee6dc0c0c2d754aaabf1fc0dfe2d491f163f78ef
child 207517 4856bfe6102b40653caf7dc1ceabe6ef5ad3fae4
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm, sledru
bugs1027221
milestone32.0a2
Bug 1027221 - Allow incremental GC barriers on off-main-thread permanent atoms. r=billm, a=sledru
js/src/jsfriendapi.cpp
--- a/js/src/jsfriendapi.cpp
+++ b/js/src/jsfriendapi.cpp
@@ -984,16 +984,19 @@ JS::IncrementalObjectBarrier(JSObject *o
 }
 
 JS_FRIEND_API(void)
 JS::IncrementalReferenceBarrier(void *ptr, JSGCTraceKind kind)
 {
     if (!ptr)
         return;
 
+    if (kind == JSTRACE_STRING && StringIsPermanentAtom(static_cast<JSString *>(ptr)))
+        return;
+
     gc::Cell *cell = static_cast<gc::Cell *>(ptr);
     Zone *zone = kind == JSTRACE_OBJECT
                  ? static_cast<JSObject *>(cell)->zone()
                  : cell->tenuredZone();
 
     JS_ASSERT(!zone->runtimeFromMainThread()->isHeapMajorCollecting());
 
     AutoMarkInDeadZone amn(zone);