diff options
author | Steve Block <steveblock@google.com> | 2010-02-02 14:57:50 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-02-04 15:06:55 +0000 |
commit | d0825bca7fe65beaee391d30da42e937db621564 (patch) | |
tree | 7461c49eb5844ffd1f35d1ba2c8b7584c1620823 /WebCore/workers/WorkerContext.cpp | |
parent | 3db770bd97c5a59b6c7574ca80a39e5a51c1defd (diff) | |
download | external_webkit-d0825bca7fe65beaee391d30da42e937db621564.zip external_webkit-d0825bca7fe65beaee391d30da42e937db621564.tar.gz external_webkit-d0825bca7fe65beaee391d30da42e937db621564.tar.bz2 |
Merge webkit.org at r54127 : Initial merge by git
Change-Id: Ib661abb595522f50ea406f72d3a0ce17f7193c82
Diffstat (limited to 'WebCore/workers/WorkerContext.cpp')
-rw-r--r-- | WebCore/workers/WorkerContext.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/WebCore/workers/WorkerContext.cpp b/WebCore/workers/WorkerContext.cpp index e823278..0ec24e6 100644 --- a/WebCore/workers/WorkerContext.cpp +++ b/WebCore/workers/WorkerContext.cpp @@ -32,6 +32,7 @@ #include "WorkerContext.h" #include "ActiveDOMObject.h" +#include "Database.h" #include "DOMTimer.h" #include "DOMWindow.h" #include "Event.h" @@ -254,6 +255,27 @@ NotificationCenter* WorkerContext::webkitNotifications() const } #endif +#if ENABLE(DATABASE) +PassRefPtr<Database> WorkerContext::openDatabase(const String& name, const String& version, const String& displayName, unsigned long estimatedSize, ExceptionCode& ec) +{ + if (!securityOrigin()->canAccessDatabase()) { + ec = SECURITY_ERR; + return 0; + } + + ASSERT(Database::isAvailable()); + if (!Database::isAvailable()) + return 0; + + return Database::openDatabase(this, name, version, displayName, estimatedSize, ec); +} +#endif + +bool WorkerContext::isContextThread() const +{ + return currentThread() == thread()->threadID(); +} + EventTargetData* WorkerContext::eventTargetData() { return &m_eventTargetData; |