From efe06f23279336052a3d11a8aec156fe032bcf80 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 9 Nov 2009 07:06:25 +0000 Subject: [PATCH] Script blocks for text/cycript should be ignored if Cycript is not available. --- LockScreen.mm | 16 +++++++--------- control | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/LockScreen.mm b/LockScreen.mm index ec5d652..1653fe8 100644 --- a/LockScreen.mm +++ b/LockScreen.mm @@ -815,17 +815,15 @@ MSHook(void, _ZN7WebCore13HTMLTokenizer14notifyFinishedEPNS_14CachedResourceE, v } MSHook(bool, _ZN7WebCore16MIMETypeRegistry29isSupportedJavaScriptMIMETypeERKNS_6StringE, const WebCore::String &mime) { - bool jscript; + if (!GetParser1() || mime != "text/cycript") + return __ZN7WebCore16MIMETypeRegistry29isSupportedJavaScriptMIMETypeERKNS_6StringE(mime); - if (!GetParser1()) through: - jscript = __ZN7WebCore16MIMETypeRegistry29isSupportedJavaScriptMIMETypeERKNS_6StringE(mime); - else if (mime == "text/cycript") { - SetParser(true, true); - jscript = true; - } else - goto through; + static void *handle(dlopen("/usr/lib/libcycript.dylib", RTLD_LAZY | RTLD_GLOBAL)); + if (handle == NULL) + return false; - return jscript; + SetParser(true, true); + return true; } /* Cydget:// Protocol {{{ */ diff --git a/control b/control index 441f1e1..64a5ab2 100644 --- a/control +++ b/control @@ -3,7 +3,7 @@ Priority: optional Section: Development Maintainer: Jay Freeman (saurik) Architecture: iphoneos-arm -Version: 0.9.3082-1 +Version: 0.9.3083-1 Description: framework for managing lock screen plugins Name: Cydget Depends: mobilesubstrate (>= 0.9.2587-1), firmware (>= 2.2), preferenceloader, apr-lib -- 2.45.2