From 96e1b12dd96e6c42a72e1b95616605a228a55120 Mon Sep 17 00:00:00 2001 From: Shu-yu Guo Date: Mon, 25 Jul 2011 11:02:44 -0700 Subject: [PATCH] [INFER] Fix assertion failure, bug 673705. r=bhackett --- js/src/jit-test/tests/basic/bug673705.js | 10 ++++++++++ js/src/jsanalyze.cpp | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 js/src/jit-test/tests/basic/bug673705.js diff --git a/js/src/jit-test/tests/basic/bug673705.js b/js/src/jit-test/tests/basic/bug673705.js new file mode 100644 index 000000000000..42fc30591c2d --- /dev/null +++ b/js/src/jit-test/tests/basic/bug673705.js @@ -0,0 +1,10 @@ +function bug673705() { + var x; + try { + } catch (e) { + } finally { + print(x); + } + return x; +} +assertEq(bug673705(), undefined); diff --git a/js/src/jsanalyze.cpp b/js/src/jsanalyze.cpp index e35666e50470..3f1cbcd18592 100644 --- a/js/src/jsanalyze.cpp +++ b/js/src/jsanalyze.cpp @@ -1247,7 +1247,7 @@ inline void ScriptAnalysis::ensureVariable(LifetimeVariable &var, unsigned until) { JS_ASSERT(var.lifetime); - JS_ASSERT(until < var.lifetime->start); + JS_ASSERT(until <= var.lifetime->start); var.lifetime->start = until; var.ensured = true; }