mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-19 17:38:36 +00:00
Bug 815652 - Remove accidental temporary rooting object (r=bhackett)
This commit is contained in:
parent
03de16d9f8
commit
9dcd123cfb
@ -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;
|
||||
|
@ -5254,9 +5254,9 @@ class MInstanceOf
|
||||
|
||||
public:
|
||||
MInstanceOf(MDefinition *obj, RawObject proto)
|
||||
: MUnaryInstruction(obj)
|
||||
: MUnaryInstruction(obj),
|
||||
protoObj_(proto)
|
||||
{
|
||||
protoObj_ = proto;
|
||||
setResultType(MIRType_Boolean);
|
||||
}
|
||||
|
||||
|
10
js/src/jit-test/tests/basic/bug815652.js
Normal file
10
js/src/jit-test/tests/basic/bug815652.js
Normal 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();
|
Loading…
x
Reference in New Issue
Block a user