From 10401a9c64d32462574a1ea5096dc800da966f2f Mon Sep 17 00:00:00 2001 From: Jan de Mooij Date: Tue, 18 Feb 2014 10:13:48 +0100 Subject: [PATCH] Bug 973574 - Fix AutoDebugModeInvalidation to not call FinishDiscardJitCode if it didn't discard JIT code. r=shu --- js/src/jit/Ion.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/src/jit/Ion.cpp b/js/src/jit/Ion.cpp index 5df40c480e43..a5122976e31a 100644 --- a/js/src/jit/Ion.cpp +++ b/js/src/jit/Ion.cpp @@ -2879,7 +2879,9 @@ AutoDebugModeInvalidation::~AutoDebugModeInvalidation() if (comp_) { FinishDiscardJitCode(fop, comp_); } else { - for (CompartmentsInZoneIter comp(zone_); !comp.done(); comp.next()) - FinishDiscardJitCode(fop, comp); + for (CompartmentsInZoneIter comp(zone_); !comp.done(); comp.next()) { + if (comp->principals) + FinishDiscardJitCode(fop, comp); + } } }