diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
commit | 32761a6cee1d0dee366b885b7b9c777e67885688 (patch) | |
tree | d6bec92bebfb216f4126356e55518842c2f476a1 /Source/WebCore/Modules/webdatabase/DOMWindowWebDatabase.cpp | |
parent | a4e969f4965059196ca948db781e52f7cfebf19e (diff) | |
download | WebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz |
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/WebCore/Modules/webdatabase/DOMWindowWebDatabase.cpp')
-rw-r--r-- | Source/WebCore/Modules/webdatabase/DOMWindowWebDatabase.cpp | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/Source/WebCore/Modules/webdatabase/DOMWindowWebDatabase.cpp b/Source/WebCore/Modules/webdatabase/DOMWindowWebDatabase.cpp index 5b9fdb32b..8ccaa5a80 100644 --- a/Source/WebCore/Modules/webdatabase/DOMWindowWebDatabase.cpp +++ b/Source/WebCore/Modules/webdatabase/DOMWindowWebDatabase.cpp @@ -11,10 +11,10 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR @@ -25,6 +25,9 @@ */ #include "config.h" + +#if ENABLE(SQL_DATABASE) + #include "DOMWindowWebDatabase.h" #include "DOMWindow.h" @@ -37,16 +40,16 @@ namespace WebCore { -RefPtr<Database> DOMWindowWebDatabase::openDatabase(DOMWindow& window, const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassRefPtr<DatabaseCallback> creationCallback, ExceptionCode& ec) +PassRefPtr<Database> DOMWindowWebDatabase::openDatabase(DOMWindow* window, const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassRefPtr<DatabaseCallback> creationCallback, ExceptionCode& ec) { - if (!window.isCurrentlyDisplayedInFrame()) - return nullptr; + if (!window->isCurrentlyDisplayedInFrame()) + return 0; - RefPtr<Database> database = nullptr; - DatabaseManager& dbManager = DatabaseManager::singleton(); + RefPtr<Database> database = 0; + DatabaseManager& dbManager = DatabaseManager::manager(); DatabaseError error = DatabaseError::None; - if (dbManager.isAvailable() && window.document()->securityOrigin()->canAccessDatabase(window.document()->topOrigin())) { - database = dbManager.openDatabase(window.document(), name, version, displayName, estimatedSize, creationCallback, error); + if (dbManager.isAvailable() && window->document()->securityOrigin()->canAccessDatabase(window->document()->topOrigin())) { + database = dbManager.openDatabase(window->document(), name, version, displayName, estimatedSize, creationCallback, error); ASSERT(database || error != DatabaseError::None); ec = DatabaseManager::exceptionCodeForDatabaseError(error); } else @@ -56,3 +59,5 @@ RefPtr<Database> DOMWindowWebDatabase::openDatabase(DOMWindow& window, const Str } } // namespace WebCore + +#endif // ENABLE(SQL_DATABASE) |