Bug 912573 - Assert that JSCompartment::callsiteClones doesn't need post-barrier for now r=terrence
authorJon Coppeard <jcoppeard@mozilla.com>
Wed, 16 Oct 2013 09:45:27 +0100
changeset 165700 6cb17f49e135476fb2d4ca64cf6fc6aa96a8ecb0
parent 165699 ddfe7f3ad095d5195c81773def0b35bbec4f6796
child 165701 0d275749311ed3b285f3c62d1cc3cac7af1cf832
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence
bugs912573
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 912573 - Assert that JSCompartment::callsiteClones doesn't need post-barrier for now r=terrence
js/src/jscntxt.cpp
--- a/js/src/jscntxt.cpp
+++ b/js/src/jscntxt.cpp
@@ -112,16 +112,22 @@ JSCompartment::sweepCallsiteClones()
 JSFunction *
 js::CloneFunctionAtCallsite(JSContext *cx, HandleFunction fun, HandleScript script, jsbytecode *pc)
 {
     JS_ASSERT(cx->typeInferenceEnabled());
     JS_ASSERT(fun->nonLazyScript()->shouldCloneAtCallsite);
     JS_ASSERT(!fun->nonLazyScript()->enclosingStaticScope());
     JS_ASSERT(types::UseNewTypeForClone(fun));
 
+    /*
+     * If we start allocating function objects in the nursery, then the callsite
+     * clone table will need a postbarrier.
+     */
+    JS_ASSERT(fun->isTenured());
+
     typedef CallsiteCloneKey Key;
     typedef CallsiteCloneTable Table;
 
     Table &table = cx->compartment()->callsiteClones;
     if (!table.initialized() && !table.init())
         return nullptr;
 
     uint32_t offset = pc - script->code;