[haiku-webkit-commits] r384 - webkit/trunk/WebKit/haiku/API

  • From: webkit@xxxxxxxxxxxxxxx
  • To: haiku-webkit-commits@xxxxxxxxxxxxx
  • Date: Sun, 04 Apr 2010 12:06:24 +0000

Author: stippi
Date: Sun Apr  4 12:06:23 2010
New Revision: 384
URL: http://mmlr.dyndns.org/changeset/384

Log:
The looper needs to be locked before messing with the focus, LoadURL() is called
from the app thread too.

Modified:
   webkit/trunk/WebKit/haiku/API/WebView.cpp

Modified: webkit/trunk/WebKit/haiku/API/WebView.cpp
==============================================================================
--- webkit/trunk/WebKit/haiku/API/WebView.cpp   Sun Apr  4 12:04:31 2010        
(r383)
+++ webkit/trunk/WebKit/haiku/API/WebView.cpp   Sun Apr  4 12:06:23 2010        
(r384)
@@ -247,8 +247,11 @@
     fWebPage->LoadURL(urlString);
        // Always focus the web view after firing off a load request.
        // This behavior is also observed in Firefox.
-       if (aquireFocus && !IsFocus())
-               MakeFocus(true);
+       if (LockLooper()) {
+               if (aquireFocus && !IsFocus())
+                       MakeFocus(true);
+               UnlockLooper();
+       }
 }
 
 void BWebView::Reload()

Other related posts:

  • » [haiku-webkit-commits] r384 - webkit/trunk/WebKit/haiku/API - webkit