Reviewed by Anders.
* bindings/js/JSSQLTransactionCustom.cpp:
(WebCore::JSSQLTransaction::executeSql): Made the code a little
clearer and more correct.
* loader/icon/IconDatabase.cpp: Put parentheses around the expansion
of IS_ICON_SYNC_THREAD() so that ASSERT_NOT_SYNC_THREAD() does the
comparison it meant to.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27774
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-11-13 Adam Roben <aroben@apple.com>
+
+ Fix a bug and improve upon Brady's fix
+
+ Reviewed by Anders.
+
+ * bindings/js/JSSQLTransactionCustom.cpp:
+ (WebCore::JSSQLTransaction::executeSql): Made the code a little
+ clearer and more correct.
+ * loader/icon/IconDatabase.cpp: Put parentheses around the expansion
+ of IS_ICON_SYNC_THREAD() so that ASSERT_NOT_SYNC_THREAD() does the
+ comparison it meant to.
+
2007-11-13 Sam Weinig <sam@webkit.org>
Fix Qt and Gtk builds.
}
RefPtr<SQLStatementCallback> callback;
- if (args.size() > 2) {
- JSObject* object = 0;
- if (!args[2]->isNull() && !(object = args[2]->getObject())) {
+ if (args.size() > 2 && !args[2]->isNull()) {
+ JSObject* object = args[2]->getObject();
+ if (!object) {
setDOMException(exec, TYPE_MISMATCH_ERR);
return jsUndefined();
}
}
RefPtr<SQLStatementErrorCallback> errorCallback;
- if (args.size() > 3) {
- JSObject* object = 0;
- if (!args[3]->isNull() && !(object = args[3]->getObject())) {
+ if (args.size() > 3 && !args[3]->isNull()) {
+ JSObject* object = args[3]->getObject();
+ if (!object) {
setDOMException(exec, TYPE_MISMATCH_ERR);
return jsUndefined();
}
#define ASSERT_NOT_SYNC_THREAD() ASSERT(!m_syncThreadRunning || !IS_ICON_SYNC_THREAD())
// For methods that are meant to support the sync thread ONLY
-#define IS_ICON_SYNC_THREAD() m_syncThread == currentThread()
+#define IS_ICON_SYNC_THREAD() (m_syncThread == currentThread())
#define ASSERT_ICON_SYNC_THREAD() ASSERT(IS_ICON_SYNC_THREAD())
namespace WebCore {