X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2FWebKit%2FSource%2Fweb%2FDatabaseClientImpl.cpp;h=254735290ce94f12b1e6a8fc2e422837fe046a64;hb=3545e9f2671f595d2a2f3ee75ca0393b01e35ef6;hp=73f3dcbcad134a28aa862614d4109147c3ebb809;hpb=7d210d4c7e9ba36e635eabc5b5780495f8a63292;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/WebKit/Source/web/DatabaseClientImpl.cpp b/src/third_party/WebKit/Source/web/DatabaseClientImpl.cpp index 73f3dcb..2547352 100644 --- a/src/third_party/WebKit/Source/web/DatabaseClientImpl.cpp +++ b/src/third_party/WebKit/Source/web/DatabaseClientImpl.cpp @@ -33,10 +33,8 @@ #include "core/dom/Document.h" #include "core/dom/ExecutionContext.h" -#include "core/workers/WorkerGlobalScope.h" #include "public/web/WebPermissionClient.h" #include "web/WebLocalFrameImpl.h" -#include "web/WorkerPermissionClient.h" namespace blink { @@ -52,18 +50,12 @@ DatabaseClientImpl::~DatabaseClientImpl() bool DatabaseClientImpl::allowDatabase(ExecutionContext* executionContext, const String& name, const String& displayName, unsigned long estimatedSize) { ASSERT(executionContext->isContextThread()); - ASSERT(executionContext->isDocument() || executionContext->isWorkerGlobalScope()); - if (executionContext->isDocument()) { - Document* document = toDocument(executionContext); - WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(document->frame()); - if (!webFrame) - return false; - if (webFrame->permissionClient()) - return webFrame->permissionClient()->allowDatabase(name, displayName, estimatedSize); - } else { - WorkerGlobalScope& workerGlobalScope = *toWorkerGlobalScope(executionContext); - return WorkerPermissionClient::from(workerGlobalScope)->allowDatabase(name, displayName, estimatedSize); - } + Document* document = toDocument(executionContext); + WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(document->frame()); + if (!webFrame) + return false; + if (webFrame->permissionClient()) + return webFrame->permissionClient()->allowDatabase(name, displayName, estimatedSize); return true; }