Bug 815652 - Remove accidental temporary rooting object (r=bhackett)

This commit is contained in:
Bill McCloskey 2012-11-27 13:59:13 -08:00
parent 3e7d164419
commit a3a7931962
3 changed files with 17 additions and 6 deletions

View File

@ -21,10 +21,6 @@ template <typename T>
class CompilerRoot : public CompilerRootNode
{
public:
CompilerRoot()
: CompilerRootNode(NULL)
{ }
CompilerRoot(T ptr)
: CompilerRootNode(NULL)
{
@ -46,6 +42,11 @@ class CompilerRoot : public CompilerRootNode
public:
operator T () const { return static_cast<T>(ptr); }
T operator ->() const { return static_cast<T>(ptr); }
private:
CompilerRoot() MOZ_DELETE;
CompilerRoot(const CompilerRoot<T> &) MOZ_DELETE;
CompilerRoot<T> &operator =(const CompilerRoot<T> &) MOZ_DELETE;
};
typedef CompilerRoot<JSObject*> CompilerRootObject;

View File

@ -5254,9 +5254,9 @@ class MInstanceOf
public:
MInstanceOf(MDefinition *obj, RawObject proto)
: MUnaryInstruction(obj)
: MUnaryInstruction(obj),
protoObj_(proto)
{
protoObj_ = proto;
setResultType(MIRType_Boolean);
}

View File

@ -0,0 +1,10 @@
gczeal(9, 2)
function testScatterConflict() {
var p = new ParallelArray([1,2,3,4,5]);
var r = p.scatter([0,1,0,3,(0)], 9, function (a,b) { return a+b; });
function assertEqParallelArray(a, b)
assertEq(a instanceof ParallelArray, true);
assertEqParallelArray(r, new ParallelArray([4,2,(false),4,5]));
}
testScatterConflict();