From 5d7cc6d52918fbf09b9af24f6165961cae52836f Mon Sep 17 00:00:00 2001
From: "Jay Freeman (saurik)" <saurik@saurik.com>
Date: Tue, 4 May 2010 03:19:25 +0000
Subject: [PATCH] Get this all working really everywhere again, seriously this
 time.

---
 Trampoline.t.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Trampoline.t.cpp b/Trampoline.t.cpp
index d7853ca..6a87b5d 100644
--- a/Trampoline.t.cpp
+++ b/Trampoline.t.cpp
@@ -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();
-- 
2.47.2