X-Git-Url: https://git.webkit.org/?p=WebKit-https.git;a=blobdiff_plain;f=WebCore%2Fplatform%2Fsql%2FSQLiteDatabase.cpp;h=fd9539d569fcd8b6b00bdddb35adea5cc68cfe85;hp=63d1e87ec57a1a8b2c4e502b2eb0ee3598453480;hb=7ab04cac2ad5b427dc14c453150b02a1e23ac71c;hpb=6685fdfc2202f8343c1c7d90668e1441a9fbc3e0 diff --git a/WebCore/platform/sql/SQLiteDatabase.cpp b/WebCore/platform/sql/SQLiteDatabase.cpp index 63d1e87ec57a..fd9539d569fc 100644 --- a/WebCore/platform/sql/SQLiteDatabase.cpp +++ b/WebCore/platform/sql/SQLiteDatabase.cpp @@ -1,5 +1,6 @@ /* * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. + * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -44,10 +45,8 @@ const int SQLResultSchema = SQLITE_SCHEMA; SQLiteDatabase::SQLiteDatabase() : m_db(0) , m_transactionInProgress(false) + , m_openingThread(0) { -#ifndef NDEBUG - memset(&m_openingThread, 0, sizeof(pthread_t)); -#endif } SQLiteDatabase::~SQLiteDatabase() @@ -71,10 +70,8 @@ bool SQLiteDatabase::open(const String& filename) return false; } -#ifndef NDEBUG if (isOpen()) - m_openingThread = pthread_self(); -#endif + m_openingThread = currentThread(); if (!SQLiteStatement(*this, "PRAGMA temp_store = MEMORY;").executeCommand()) LOG_ERROR("SQLite database could not set temp_store to memory"); @@ -89,9 +86,8 @@ void SQLiteDatabase::close() m_path.truncate(0); m_db = 0; } -#ifndef NDEBUG - memset(&m_openingThread, 0, sizeof(pthread_t)); -#endif + + m_openingThread = 0; } void SQLiteDatabase::setFullsync(bool fsync) @@ -296,5 +292,3 @@ void SQLiteDatabase::unlock() } } // namespace WebCore - -