Backed out changeset 9878f361d7f7 (bug 1115246) to see if it fixes linux builds on a CLOSED TREE

This commit is contained in:
Wes Kocher 2014-12-29 16:35:04 -08:00
parent 5ad6f6b2ba
commit 2cbf7ce33c

View File

@ -7192,10 +7192,10 @@ frontend::EmitTree(ExclusiveContext *cx, BytecodeEmitter *bce, ParseNode *pn)
// template object with copy on write elements that can be reused
// every time the initializer executes.
RootedValue value(cx);
if (bce->emitterMode != BytecodeEmitter::SelfHosting && pn->pn_count != 0) {
if (!pn->getConstantValue(cx, ParseNode::DontAllowNestedObjects, &value))
return false;
if (bce->emitterMode != BytecodeEmitter::SelfHosting &&
pn->pn_count != 0 &&
pn->getConstantValue(cx, ParseNode::DontAllowNestedObjects, &value))
{
// Note: the type of the template object might not yet reflect
// that the object has copy on write elements. When the
// interpreter or JIT compiler fetches the template, it should