summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--WebKit/android/jni/WebCoreFrameBridge.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/WebKit/android/jni/WebCoreFrameBridge.cpp b/WebKit/android/jni/WebCoreFrameBridge.cpp
index 7d1d24d..46e4b64 100644
--- a/WebKit/android/jni/WebCoreFrameBridge.cpp
+++ b/WebKit/android/jni/WebCoreFrameBridge.cpp
@@ -1180,7 +1180,12 @@ static jobject StringByEvaluatingJavaScriptFromString(JNIEnv *env, jobject obj,
WebCore::ScriptValue value =
pFrame->script()->executeScript(to_string(env, script), true);
WebCore::String result = WebCore::String();
- if (!value.getString(result))
+#if USE(JSC)
+ ScriptState* scriptState = pFrame->script()->globalObject(mainThreadNormalWorld())->globalExec();
+#elif USE(V8)
+ ScriptState* scriptState = pFrame->script()->mainWorldScriptState();
+#endif
+ if (!value.getString(scriptState, result))
return NULL;
unsigned len = result.length();
if (len == 0)