[BlackBerry] Use APIEntryShim when making JS call
authoryoli@rim.com <yoli@rim.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Feb 2013 18:04:38 +0000 (18:04 +0000)
committeryoli@rim.com <yoli@rim.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Feb 2013 18:04:38 +0000 (18:04 +0000)
https://bugs.webkit.org/show_bug.cgi?id=110787

Reviewed by Rob Buis.

PR# 301451.
Use APIEntryShim to fix an assert and ensure it is thread-safe.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::executeJavaScriptFunction):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144069 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/blackberry/Api/WebPage.cpp
Source/WebKit/blackberry/ChangeLog

index cd50097699e6e0d4af63726fa784a73fbcff230a..ab0f8bf3743aa2cfbffd21a3495352f857f1609d 100644 (file)
@@ -19,6 +19,7 @@
 #include "config.h"
 #include "WebPage.h"
 
 #include "config.h"
 #include "WebPage.h"
 
+#include "APIShims.h"
 #include "ApplicationCacheStorage.h"
 #include "AuthenticationChallengeManager.h"
 #include "AutofillManager.h"
 #include "ApplicationCacheStorage.h"
 #include "AuthenticationChallengeManager.h"
 #include "AutofillManager.h"
@@ -888,7 +889,7 @@ void WebPage::executeJavaScriptFunction(const std::vector<BlackBerry::Platform::
     JSC::ExecState* exec = root->globalObject()->globalExec();
     JSGlobalContextRef ctx = toGlobalRef(exec);
 
     JSC::ExecState* exec = root->globalObject()->globalExec();
     JSGlobalContextRef ctx = toGlobalRef(exec);
 
-    JSC::JSLockHolder lock(exec);
+    JSC::APIEntryShim shim(exec);
     WTF::Vector<JSValueRef> argListRef(args.size());
     for (unsigned i = 0; i < args.size(); ++i)
         argListRef[i] = BlackBerryJavaScriptVariantToJSValueRef(ctx, args[i]);
     WTF::Vector<JSValueRef> argListRef(args.size());
     for (unsigned i = 0; i < args.size(); ++i)
         argListRef[i] = BlackBerryJavaScriptVariantToJSValueRef(ctx, args[i]);
index cbae054568be86489e735c2951e594338e3dae95..55e693d50104d8d197d388122e4eef4c371d8f19 100644 (file)
@@ -1,3 +1,16 @@
+2013-02-26  Yong Li  <yoli@rim.com>
+
+        [BlackBerry] Use APIEntryShim when making JS call
+        https://bugs.webkit.org/show_bug.cgi?id=110787
+
+        Reviewed by Rob Buis.
+
+        PR# 301451.
+        Use APIEntryShim to fix an assert and ensure it is thread-safe.
+
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPage::executeJavaScriptFunction):
+
 2013-02-26  Alberto Garcia  <agarcia@igalia.com>
 
         [BlackBerry] Upstream the datalist support UI
 2013-02-26  Alberto Garcia  <agarcia@igalia.com>
 
         [BlackBerry] Upstream the datalist support UI