From 72049981ca46eeff2560b2582b95fb657cb3c81e Mon Sep 17 00:00:00 2001 From: Terrence Cole Date: Wed, 1 May 2013 10:25:24 -0700 Subject: [PATCH] Bug 867426 - Extra cleanups identified in review; r=jonco --HG-- extra : rebase_source : 5dd22eabd18112b5a6bfbb53ea3737ffcd46d40f --- js/src/gc/Marking.cpp | 2 +- js/src/gc/RootMarking.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/src/gc/Marking.cpp b/js/src/gc/Marking.cpp index 89d14f5dba1..4a76db4d527 100644 --- a/js/src/gc/Marking.cpp +++ b/js/src/gc/Marking.cpp @@ -698,7 +698,7 @@ gc::MarkCrossCompartmentObjectUnbarriered(JSTracer *trc, JSObject *src, JSObject void gc::MarkCrossCompartmentScriptUnbarriered(JSTracer *trc, JSObject *src, JSScript **dst, - const char *name) + const char *name) { if (ShouldMarkCrossCompartment(trc, src, *dst)) MarkScriptUnbarriered(trc, dst, name); diff --git a/js/src/gc/RootMarking.cpp b/js/src/gc/RootMarking.cpp index 43a74106c38..9cc53994910 100644 --- a/js/src/gc/RootMarking.cpp +++ b/js/src/gc/RootMarking.cpp @@ -485,7 +485,7 @@ AutoGCRooter::trace(JSTracer *trc) AutoObjectObjectHashMap::HashMapImpl &map = static_cast(this)->map; for (AutoObjectObjectHashMap::Enum e(map); !e.empty(); e.popFront()) { mozilla::DebugOnly key = e.front().key; - MarkObjectRoot(trc, (JSObject **) &e.front().key, "AutoObjectObjectHashMap key"); + MarkObjectRoot(trc, const_cast(&e.front().key), "AutoObjectObjectHashMap key"); JS_ASSERT(key == e.front().key); // Needs rewriting for moving GC, see bug 726687. MarkObjectRoot(trc, &e.front().value, "AutoObjectObjectHashMap value"); } @@ -497,7 +497,7 @@ AutoGCRooter::trace(JSTracer *trc) AutoObjectUnsigned32HashMap::HashMapImpl &map = self->map; for (AutoObjectUnsigned32HashMap::Enum e(map); !e.empty(); e.popFront()) { mozilla::DebugOnly key = e.front().key; - MarkObjectRoot(trc, (JSObject **) &e.front().key, "AutoObjectUnsignedHashMap key"); + MarkObjectRoot(trc, const_cast(&e.front().key), "AutoObjectUnsignedHashMap key"); JS_ASSERT(key == e.front().key); // Needs rewriting for moving GC, see bug 726687. } return; @@ -508,7 +508,7 @@ AutoGCRooter::trace(JSTracer *trc) AutoObjectHashSet::HashSetImpl &set = self->set; for (AutoObjectHashSet::Enum e(set); !e.empty(); e.popFront()) { mozilla::DebugOnly obj = e.front(); - MarkObjectRoot(trc, (JSObject **) &e.front(), "AutoObjectHashSet value"); + MarkObjectRoot(trc, const_cast(&e.front()), "AutoObjectHashSet value"); JS_ASSERT(obj == e.front()); // Needs rewriting for moving GC, see bug 726687. } return;