Build fixes
authorvestbo@webkit.org <vestbo@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Jul 2008 11:28:43 +0000 (11:28 +0000)
committervestbo@webkit.org <vestbo@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Jul 2008 11:28:43 +0000 (11:28 +0000)
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34954 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/kjs/JSLock.cpp
WebCore/ChangeLog
WebCore/WebCore.pro
WebCore/bridge/qt/qt_instance.cpp
WebCore/bridge/qt/qt_runtime.cpp
WebCore/page/JavaScriptProfileNode.cpp
WebCore/plugins/qt/PluginViewQt.cpp
WebKit/qt/Api/qwebpage.cpp
WebKit/qt/ChangeLog

index 2059d4a24c6f64d190e4bf8db11de5d42805231f..f78f2cb100b132ff36bd1b9dc7f2fd6bdeac33bc 100644 (file)
@@ -1,3 +1,13 @@
+2008-07-02  Simon Hausmann  <hausmann@webkit.org>
+
+        Build fix. Implemented missing functions for single-threaded build.
+
+        * kjs/JSLock.cpp:
+        (KJS::JSLock::JSLock):
+        (KJS::JSLock::lock):
+        (KJS::JSLock::unlock):
+        (KJS::JSLock::DropAllLocks::DropAllLocks):
+
 2008-07-02  Alexey Proskuryakov  <ap@webkit.org>
 
         Another non-AllInOne build fix.
index c008a965fb24ba8ff51bc843582cd19e3ff094fa..9c630e358365c87f4c63e93cc097d30cb0ac79c9 100644 (file)
@@ -158,6 +158,11 @@ JSLock::DropAllLocks::~DropAllLocks()
 
 #else
 
+JSLock::JSLock(ExecState* exec)
+    : m_lockingForReal(false)
+{
+}
+
 // If threading support is off, set the lock count to a constant value of 1 so assertions
 // that the lock is held don't fail
 int JSLock::lockCount()
@@ -170,11 +175,19 @@ bool JSLock::currentThreadIsHoldingLock()
     return true;
 }
 
-void JSLock::lock()
+void JSLock::lock(bool)
+{
+}
+
+void JSLock::unlock(bool)
 {
 }
 
-void JSLock::unlock()
+void JSLock::lock(ExecState*)
+{
+}
+
+void JSLock::unlock(ExecState*)
 {
 }
 
@@ -182,7 +195,11 @@ void JSLock::registerThread()
 {
 }
 
-JSLock::DropAllLocks::DropAllLocks()
+JSLock::DropAllLocks::DropAllLocks(ExecState*)
+{
+}
+
+JSLock::DropAllLocks::DropAllLocks(bool)
 {
 }
 
index bf776b36227b0886da67a2e3e800210f8060080c..c7355fa6af423566dbcc645c46c452115eb33cc2 100644 (file)
@@ -1,3 +1,23 @@
+2008-07-02  Simon Hausmann  <hausmann@webkit.org>
+
+        Build fixes.
+
+        * WebCore.pro: Added plugins/PluginMainThreadScheduler.cpp to the
+        build.
+        * bridge/qt/qt_instance.cpp: Adjust to JSLock API change.
+        * bridge/qt/qt_runtime.cpp: Ditto.
+        (KJS::Bindings::convertValueToQVariant):
+        (KJS::Bindings::convertQVariantToValue):
+        (KJS::Bindings::QtRuntimeMetaMethod::call):
+        (KJS::Bindings::QtRuntimeConnectionMethod::call):
+        (KJS::Bindings::QtConnectionObject::execute):
+        * page/JavaScriptProfileNode.cpp: Inlude kjs/JSValue.h instead of
+        JavaScriptCore/JSValue.h.
+        * plugins/qt/PluginViewQt.cpp: Adjust to JSLock API changes.
+        (WebCore::PluginView::setNPWindowRect): Ditto.
+        (WebCore::PluginView::stop): Ditto.
+        (WebCore::PluginView::init): Ditto.
+
 2008-07-02  Alexey Proskuryakov  <ap@webkit.org>
 
         Build fix.
index d2466dcb8d8c1fd77387c8baa7a2f1dc4d3a98eb..4c5074d317baa7451e3d4cd791363db4e85311d0 100644 (file)
@@ -1042,7 +1042,8 @@ SOURCES += \
 
 contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=1) {
 
-        SOURCES += plugins/npapi.cpp
+        SOURCES += plugins/npapi.cpp \
+                   plugins/PluginMainThreadScheduler.cpp
 
         unix:!mac {
             SOURCES += \
index 2942b126b79651611a51ad9f27820e6017fec479..4ff0196ddcd222e2a37248fe891501dbad2877cb 100644 (file)
@@ -21,6 +21,7 @@
 #include "qt_instance.h"
 
 #include "JSGlobalObject.h"
+#include "JSLock.h"
 #include "list.h"
 #include "qt_class.h"
 #include "qt_runtime.h"
@@ -83,7 +84,7 @@ void QtRuntimeObjectImp::invalidate()
 
 void QtRuntimeObjectImp::removeFromCache()
 {
-    JSLock lock;
+    JSLock lock(false);
     QtInstance* key = cachedObjects.key(this);
     if (key)
         cachedObjects.remove(key);
@@ -134,7 +135,7 @@ QtInstance::QtInstance(QObject* o, PassRefPtr<RootObject> rootObject)
 
 QtInstance::~QtInstance()
 {
-    JSLock lock;
+    JSLock lock(false);
 
     cachedObjects.remove(this);
     cachedInstances.remove(m_hashkey);
@@ -150,7 +151,7 @@ QtInstance::~QtInstance()
 
 PassRefPtr<QtInstance> QtInstance::getQtInstance(QObject* o, PassRefPtr<RootObject> rootObject)
 {
-    JSLock lock;
+    JSLock lock(false);
 
     foreach(QtInstance* instance, cachedInstances.values(o)) {
         if (instance->rootObject() == rootObject)
@@ -165,7 +166,7 @@ PassRefPtr<QtInstance> QtInstance::getQtInstance(QObject* o, PassRefPtr<RootObje
 
 RuntimeObjectImp* QtInstance::getRuntimeObject(ExecState* exec, PassRefPtr<QtInstance> instance)
 {
-    JSLock lock;
+    JSLock lock(false);
     RuntimeObjectImp* ret = static_cast<RuntimeObjectImp*>(cachedObjects.value(instance.get()));
     if (!ret) {
         ret = new (exec) QtRuntimeObjectImp(instance);
index c2c7b7a44224c15a23e56373812a8b721dcc617d..65bd72e01aed734350960a0f2dc7504c82eee700 100644 (file)
@@ -21,6 +21,7 @@
 #include "qt_runtime.h"
 #include "qt_instance.h"
 #include "JSGlobalObject.h"
+#include "JSLock.h"
 #include "JSObject.h"
 #include "JSArray.h"
 #include "DateInstance.h"
@@ -150,7 +151,7 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue* value, QMetaType::Type
         return QVariant();
     }
 
-    JSLock lock;
+    JSLock lock(false);
     JSRealType type = valueRealType(exec, value);
     if (hint == QMetaType::Void) {
         switch(type) {
@@ -717,7 +718,7 @@ JSValue* convertQVariantToValue(ExecState* exec, PassRefPtr<RootObject> root, co
         return jsNull();
     }
 
-    JSLock lock;
+    JSLock lock(false);
 
     if (type == QMetaType::Bool)
         return jsBoolean(variant.toBool());
@@ -1294,7 +1295,7 @@ JSValue* QtRuntimeMetaMethod::call(ExecState* exec, JSObject* functionObject, JS
         return jsUndefined();
 
     // We have to pick a method that matches..
-    JSLock lock;
+    JSLock lock(false);
 
     QObject *obj = d->m_instance->getObject();
     if (obj) {
@@ -1387,7 +1388,7 @@ JSValue* QtRuntimeConnectionMethod::call(ExecState* exec, JSObject* functionObje
 {
     QtRuntimeConnectionMethodData* d = static_cast<QtRuntimeConnectionMethod *>(functionObject)->d_func();
 
-    JSLock lock;
+    JSLock lock(false);
 
     QObject* sender = d->m_instance->getObject();
 
@@ -1617,7 +1618,7 @@ void QtConnectionObject::execute(void **argv)
 
         int argc = parameterTypes.count();
 
-        JSLock lock;
+        JSLock lock(false);
 
         // ### Should the Interpreter/ExecState come from somewhere else?
         RefPtr<RootObject> ro = m_instance->rootObject();
index f2bc75ede8a11a8892895f14decc2ecef7822fa9..ec3e2fdda2a27b7285078c9ace68e5bdce1243bf 100644 (file)
@@ -34,7 +34,7 @@
 #include <JavaScriptCore/JSLock.h>
 #include <JavaScriptCore/JSRetainPtr.h>
 #include <JavaScriptCore/JSStringRef.h>
-#include <JavaScriptCore/JSValue.h>
+#include <kjs/JSValue.h>
 
 using namespace KJS;
 
index 115fc814c36f059ab67ecc71f46a1d88ff8f1949..c638a1539577b336c65a1596110bb488bf024383 100644 (file)
@@ -187,7 +187,7 @@ void PluginView::setNPWindowRect(const IntRect& rect)
 
     if (m_plugin->pluginFuncs()->setwindow) {
         PluginView::setCurrentPluginView(this);
-        KJS::JSLock::DropAllLocks dropAllLocks;
+        KJS::JSLock::DropAllLocks dropAllLocks(false);
         setCallingPlugin(true);
         m_plugin->pluginFuncs()->setwindow(m_instance, &m_npWindow);
         setCallingPlugin(false);
@@ -236,7 +236,7 @@ void PluginView::stop()
 
     m_isStarted = false;
 
-    KJS::JSLock::DropAllLocks dropAllLocks;
+    KJS::JSLock::DropAllLocks dropAllLocks(false);
 
     // Clear the window
     m_npWindow.window = 0;
@@ -446,7 +446,7 @@ void PluginView::init()
 
     if (m_plugin->pluginFuncs()->getvalue) {
         PluginView::setCurrentPluginView(this);
-        KJS::JSLock::DropAllLocks dropAllLocks;
+        KJS::JSLock::DropAllLocks dropAllLocks(false);
         setCallingPlugin(true);
         m_plugin->pluginFuncs()->getvalue(m_instance, NPPVpluginNeedsXEmbed, &m_needsXEmbed);
         setCallingPlugin(false);
index 62c9db3a1b6a5a6d42128328d1e4f2219dab382f..ff6a1784aa54344f4c6b3b80947f1e8c56b29314 100644 (file)
@@ -1364,13 +1364,13 @@ void QWebPage::triggerAction(WebAction action, bool checked)
             break;
 
         case SetTextDirectionDefault:
-            editor->setBaseWritingDirection("inherit");
+            editor->setBaseWritingDirection(NaturalWritingDirection);
             break;
         case SetTextDirectionLeftToRight:
-            editor->setBaseWritingDirection("ltr");
+            editor->setBaseWritingDirection(LeftToRightWritingDirection);
             break;
         case SetTextDirectionRightToLeft:
-            editor->setBaseWritingDirection("rtl");
+            editor->setBaseWritingDirection(RightToLeftWritingDirection);
             break;
 
         case ToggleBold:
index 23764687f2fbd98f07f36494e74dd89564a3f8b3..7c62a7ecbf887092f960200ba6c5e14778b71c9e 100644 (file)
@@ -1,3 +1,11 @@
+2008-07-02  Simon Hausmann  <hausmann@webkit.org>
+
+        Build fix.
+
+        * Api/qwebpage.cpp:
+        (QWebPage::triggerAction): The signature of setBaseWritingDirection
+        changed to take an enum instead of a string.
+
 2008-07-01  Alexey Proskuryakov  <ap@webkit.org>
 
         Reviewed by Darin.