]> git.saurik.com Git - cycript.git/commitdiff
Get this all working really everywhere again, seriously this time.
authorJay Freeman (saurik) <saurik@saurik.com>
Tue, 4 May 2010 03:19:25 +0000 (03:19 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Tue, 4 May 2010 03:19:25 +0000 (03:19 +0000)
Trampoline.t.cpp

index d7853ca1aba5cab138d576ca9f83a48e374079e3..6a87b5dfdd85bad78c3f123281883618ea88aefc 100644 (file)
@@ -56,6 +56,15 @@ void *Routine(void *arg) {
     void *(*dlopen)(const char *, int);
     dlset(baton, dlopen, "dlopen");
 
+    if (baton->dlsym(RTLD_DEFAULT, "JSEvaluateScript") == NULL)
+        dlopen("/System/Library/Frameworks/JavaScriptCore.framework/JavaScriptCore", RTLD_GLOBAL | RTLD_LAZY);
+
+    void *(*objc_getClass)(const char *);
+    dlset(baton, objc_getClass, "objc_getClass");
+
+    if (objc_getClass("WebUndefined") == NULL)
+        dlopen("/System/Library/Frameworks/WebKit.framework/WebKit", RTLD_GLOBAL | RTLD_LAZY);
+
     void *handle(dlopen(baton->library, RTLD_LAZY | RTLD_LOCAL));
     if (handle == NULL) {
         baton->dlerror();