Avoid script injection unless the JS engine is inferred to be Firefox's.

Former-commit-id: 1e267374fe85a858197609b35b85670394c0b66d
This commit is contained in:
John-David Dalton
2012-12-01 00:40:54 -08:00
parent e7f5ebf912
commit 2edb11376d
5 changed files with 164 additions and 163 deletions

View File

@@ -348,7 +348,8 @@
};
try {
createFunction();
// use script injection if Firefox's script engine is detected
(/1/.test(function(){1}) || createFunction)();
} catch(e) {
createFunction = Function;
}