From a93ff61bdee92cdfea1f9684ea9877ab5fb6cbb0 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Wed, 22 Dec 2010 22:17:07 -0500 Subject: [PATCH] If setting a secure property fails, it will force a fallback to prevent performance degredation due to exceptions --- lib/util.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/util.js b/lib/util.js index db7b5c3..ad42769 100644 --- a/lib/util.js +++ b/lib/util.js @@ -493,6 +493,10 @@ function getDefineSecureProp() } catch ( e ) { + // let's not have this happen again, as repeatedly throwing + // exceptions will do nothing but slow down the system + exports.secureFallback( true ); + // if there's an error (ehem, IE8), fall back fallback( obj, prop, value ); }