diff --git a/js/src/ion/CompilerRoot.h b/js/src/ion/CompilerRoot.h index 21428d1f631..6a5382d5db4 100644 --- a/js/src/ion/CompilerRoot.h +++ b/js/src/ion/CompilerRoot.h @@ -21,10 +21,6 @@ template 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(ptr); } T operator ->() const { return static_cast(ptr); } + + private: + CompilerRoot() MOZ_DELETE; + CompilerRoot(const CompilerRoot &) MOZ_DELETE; + CompilerRoot &operator =(const CompilerRoot &) MOZ_DELETE; }; typedef CompilerRoot CompilerRootObject; diff --git a/js/src/ion/MIR.h b/js/src/ion/MIR.h index b216ea43581..63895a1b808 100644 --- a/js/src/ion/MIR.h +++ b/js/src/ion/MIR.h @@ -5254,9 +5254,9 @@ class MInstanceOf public: MInstanceOf(MDefinition *obj, RawObject proto) - : MUnaryInstruction(obj) + : MUnaryInstruction(obj), + protoObj_(proto) { - protoObj_ = proto; setResultType(MIRType_Boolean); } diff --git a/js/src/jit-test/tests/basic/bug815652.js b/js/src/jit-test/tests/basic/bug815652.js new file mode 100644 index 00000000000..54297d12b76 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug815652.js @@ -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();