diff options
Diffstat (limited to 'WebKit/chromium/src/IndexedDatabaseProxy.cpp')
| -rw-r--r-- | WebKit/chromium/src/IndexedDatabaseProxy.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/WebKit/chromium/src/IndexedDatabaseProxy.cpp b/WebKit/chromium/src/IndexedDatabaseProxy.cpp index 9069b46..a4bd0b1 100644 --- a/WebKit/chromium/src/IndexedDatabaseProxy.cpp +++ b/WebKit/chromium/src/IndexedDatabaseProxy.cpp @@ -29,9 +29,12 @@ #include "config.h" #include "IndexedDatabaseProxy.h" +#include "Document.h" +#include "Frame.h" #include "IDBCallbacksProxy.h" #include "IDBDatabaseError.h" #include "IDBDatabaseProxy.h" +#include "SecurityOrigin.h" #include "WebFrameImpl.h" #include "WebIDBDatabase.h" #include "WebIDBDatabaseError.h" @@ -57,11 +60,12 @@ IndexedDatabaseProxy::~IndexedDatabaseProxy() { } -void IndexedDatabaseProxy::open(const String& name, const String& description, bool modifyDatabase, PassRefPtr<IDBDatabaseCallbacks> callbacks, Frame* frame, ExceptionCode& ec) +void IndexedDatabaseProxy::open(const String& name, const String& description, bool modifyDatabase, PassRefPtr<IDBCallbacks> callbacks, Frame* frame, ExceptionCode& ec) { + if (!frame || !frame->document()) + return; WebKit::WebFrame* webFrame = WebKit::WebFrameImpl::fromFrame(frame); - typedef IDBCallbacksProxy<WebKit::WebIDBDatabase, IDBDatabase, IDBDatabaseProxy> CallbacksProxy; - m_webIndexedDatabase->open(name, description, modifyDatabase, new CallbacksProxy(callbacks), webFrame, ec); + m_webIndexedDatabase->open(name, description, modifyDatabase, new IDBCallbacksProxy(callbacks), frame->document()->securityOrigin()->toString(), webFrame, ec); } } // namespace WebCore |
