From a8b6d60cdd0a1254320fd788ce95e827e35eec2c Mon Sep 17 00:00:00 2001 From: Kannan Vijayan Date: Thu, 12 Mar 2015 12:13:16 -0400 Subject: [PATCH] Bug 1134515 - Ensure SPSBaselineOSRMarker checks pseudostack size properly. r=shu --- js/src/vm/SPSProfiler.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/src/vm/SPSProfiler.cpp b/js/src/vm/SPSProfiler.cpp index 332c2c2f8fd..f365cc49e13 100644 --- a/js/src/vm/SPSProfiler.cpp +++ b/js/src/vm/SPSProfiler.cpp @@ -358,7 +358,9 @@ SPSBaselineOSRMarker::SPSBaselineOSRMarker(JSRuntime *rt, bool hasSPSFrame : profiler(&rt->spsProfiler) { MOZ_GUARD_OBJECT_NOTIFIER_INIT; - if (!hasSPSFrame || !profiler->enabled()) { + if (!hasSPSFrame || !profiler->enabled() || + profiler->size() >= profiler->maxSize()) + { profiler = nullptr; return; }