| Index: Source/WebKit/chromium/src/StorageQuotaChromium.cpp
|
| diff --git a/Source/WebKit/chromium/src/StorageQuotaChromium.cpp b/Source/WebKit/chromium/src/StorageQuotaChromium.cpp
|
| index d75282684ec11ee9bd177b40e11836b6087a4ba8..8e20649b0c732e6bcd9cf48a18ca380a2f790ff0 100644
|
| --- a/Source/WebKit/chromium/src/StorageQuotaChromium.cpp
|
| +++ b/Source/WebKit/chromium/src/StorageQuotaChromium.cpp
|
| @@ -40,7 +40,7 @@
|
| #include "core/dom/Document.h"
|
| #include "core/dom/ExceptionCode.h"
|
| #include "core/dom/ScriptExecutionContext.h"
|
| -#include "core/workers/WorkerContext.h"
|
| +#include "core/workers/WorkerGlobalScope.h"
|
| #include "core/workers/WorkerThread.h"
|
| #include "modules/quota/StorageErrorCallback.h"
|
| #include "modules/quota/StorageQuotaCallback.h"
|
| @@ -53,13 +53,13 @@ namespace WebCore {
|
|
|
| static void queryUsageAndQuotaFromWorker(WebCommonWorkerClient* commonClient, WebStorageQuotaType storageType, WebStorageQuotaCallbacksImpl* callbacks)
|
| {
|
| - WorkerContext* workerContext = WorkerScriptController::controllerForContext()->workerContext();
|
| - WebCore::WorkerThread* workerThread = workerContext->thread();
|
| + WorkerGlobalScope* workerGlobalScope = WorkerScriptController::controllerForContext()->workerGlobalScope();
|
| + WebCore::WorkerThread* workerThread = workerGlobalScope->thread();
|
| WebCore::WorkerLoaderProxy* workerLoaderProxy = &workerThread->workerLoaderProxy();
|
|
|
| String mode = "queryUsageAndQuotaMode" + String::number(workerThread->runLoop().createUniqueId());
|
|
|
| - RefPtr<WorkerStorageQuotaCallbacksBridge> bridge = WorkerStorageQuotaCallbacksBridge::create(workerLoaderProxy, workerContext, callbacks);
|
| + RefPtr<WorkerStorageQuotaCallbacksBridge> bridge = WorkerStorageQuotaCallbacksBridge::create(workerLoaderProxy, workerGlobalScope, callbacks);
|
|
|
| // The bridge is held by the task that is created in posted to the main thread by this method.
|
| bridge->postQueryUsageAndQuotaToMainThread(commonClient, storageType, mode);
|
| @@ -79,8 +79,8 @@ void StorageQuota::queryUsageAndQuota(ScriptExecutionContext* scriptExecutionCon
|
| WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame());
|
| webFrame->client()->queryStorageUsageAndQuota(webFrame, storageType, new WebStorageQuotaCallbacksImpl(successCallback, errorCallback));
|
| } else {
|
| - WorkerContext* workerContext = static_cast<WorkerContext*>(scriptExecutionContext);
|
| - WebWorkerBase* webWorker = static_cast<WebWorkerBase*>(workerContext->thread()->workerLoaderProxy().toWebWorkerBase());
|
| + WorkerGlobalScope* workerGlobalScope = static_cast<WorkerGlobalScope*>(scriptExecutionContext);
|
| + WebWorkerBase* webWorker = static_cast<WebWorkerBase*>(workerGlobalScope->thread()->workerLoaderProxy().toWebWorkerBase());
|
| queryUsageAndQuotaFromWorker(webWorker->commonClient(), storageType, new WebStorageQuotaCallbacksImpl(successCallback, errorCallback));
|
| }
|
| }
|
|
|