From c7a5d3480ede6cd8af98b9439cd2034ecd386df3 Mon Sep 17 00:00:00 2001 From: Juriy Zaytsev Date: Thu, 19 Mar 2009 16:47:07 -0400 Subject: [PATCH] Make sure try/catch/finally is used instead of try/finally [#421 state:resolved] --- CHANGELOG | 4 +++- src/lang/periodical_executer.js | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 57cb79c..dfe1afe 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,6 @@ -* . Use `in` operator when accessing property of a nodelist to prevent Safari <=2.0.4 from crashing (kangax) +* Make sure try/catch/finally is used instead of try/finally for clients without support for the latter one (e.g. Blackberry, IE) (Ville Koskinen, kangax) + +* Use `in` operator when accessing property of a nodelist to prevent Safari <=2.0.4 from crashing (kangax) * Add Element#clone as a safe wrapper of native `cloneNode`. (Andrew Dupont, kangax) diff --git a/src/lang/periodical_executer.js b/src/lang/periodical_executer.js index 266f324..c0584fb 100644 --- a/src/lang/periodical_executer.js +++ b/src/lang/periodical_executer.js @@ -52,9 +52,12 @@ var PeriodicalExecuter = Class.create({ try { this.currentlyExecuting = true; this.execute(); - } finally { + } catch(e) { + /* empty catch for clients that don't support try/finally */ + } + finally { this.currentlyExecuting = false; } } } -}); +}); \ No newline at end of file