Index: Source/WebKit/chromium/src/IDBFactoryBackendProxy.cpp |
diff --git a/Source/WebKit/chromium/src/IDBFactoryBackendProxy.cpp b/Source/WebKit/chromium/src/IDBFactoryBackendProxy.cpp |
index c93a084df6f41779e6b2e1a8db8b5bb2c55e3894..4f3714614a4952a6858d759fe5f8b205ea4f5aea 100644 |
--- a/Source/WebKit/chromium/src/IDBFactoryBackendProxy.cpp |
+++ b/Source/WebKit/chromium/src/IDBFactoryBackendProxy.cpp |
@@ -47,7 +47,7 @@ |
#include "bindings/v8/WorkerScriptController.h" |
#include "core/dom/CrossThreadTask.h" |
#include "core/dom/ScriptExecutionContext.h" |
-#include "core/workers/WorkerContext.h" |
+#include "core/workers/WorkerGlobalScope.h" |
#include "core/workers/WorkerLoaderProxy.h" |
#include "core/workers/WorkerThread.h" |
#include "modules/indexeddb/IDBDatabaseCallbacks.h" |
@@ -77,9 +77,9 @@ static const char allowIndexedDBMode[] = "allowIndexedDBMode"; |
class AllowIndexedDBMainThreadBridge : public WorkerAllowMainThreadBridgeBase { |
public: |
- static PassRefPtr<AllowIndexedDBMainThreadBridge> create(WorkerContext* workerContext, WebWorkerBase* webWorkerBase, const String& mode, const String& name) |
+ static PassRefPtr<AllowIndexedDBMainThreadBridge> create(WorkerGlobalScope* workerGlobalScope, WebWorkerBase* webWorkerBase, const String& mode, const String& name) |
{ |
- return adoptRef(new AllowIndexedDBMainThreadBridge(workerContext, webWorkerBase, mode, name)); |
+ return adoptRef(new AllowIndexedDBMainThreadBridge(workerGlobalScope, webWorkerBase, mode, name)); |
} |
private: |
@@ -94,8 +94,8 @@ private: |
String m_name; |
}; |
- AllowIndexedDBMainThreadBridge(WorkerContext* workerContext, WebWorkerBase* webWorkerBase, const String& mode, const String& name) |
- : WorkerAllowMainThreadBridgeBase(workerContext, webWorkerBase) |
+ AllowIndexedDBMainThreadBridge(WorkerGlobalScope* workerGlobalScope, WebWorkerBase* webWorkerBase, const String& mode, const String& name) |
+ : WorkerAllowMainThreadBridgeBase(workerGlobalScope, webWorkerBase) |
{ |
postTaskToMainThread(adoptPtr(new AllowIDBParams(mode, name))); |
} |
@@ -111,7 +111,7 @@ private: |
bool IDBFactoryBackendProxy::allowIndexedDB(ScriptExecutionContext* context, const String& name, const WebSecurityOrigin& origin, PassRefPtr<IDBCallbacks> callbacks) |
{ |
bool allowed; |
- ASSERT_WITH_SECURITY_IMPLICATION(context->isDocument() || context->isWorkerContext()); |
+ ASSERT_WITH_SECURITY_IMPLICATION(context->isDocument() || context->isWorkerGlobalScope()); |
if (context->isDocument()) { |
Document* document = static_cast<Document*>(context); |
WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame()); |
@@ -119,16 +119,16 @@ bool IDBFactoryBackendProxy::allowIndexedDB(ScriptExecutionContext* context, con |
// FIXME: webView->permissionClient() returns 0 in test_shell and content_shell http://crbug.com/137269 |
allowed = !webView->permissionClient() || webView->permissionClient()->allowIndexedDB(webFrame, name, origin); |
} else { |
- WorkerContext* workerContext = static_cast<WorkerContext*>(context); |
- WebWorkerBase* webWorkerBase = static_cast<WebWorkerBase*>(workerContext->thread()->workerLoaderProxy().toWebWorkerBase()); |
- WorkerRunLoop& runLoop = workerContext->thread()->runLoop(); |
+ WorkerGlobalScope* workerGlobalScope = static_cast<WorkerGlobalScope*>(context); |
+ WebWorkerBase* webWorkerBase = static_cast<WebWorkerBase*>(workerGlobalScope->thread()->workerLoaderProxy().toWebWorkerBase()); |
+ WorkerRunLoop& runLoop = workerGlobalScope->thread()->runLoop(); |
String mode = allowIndexedDBMode; |
mode.append(String::number(runLoop.createUniqueId())); |
- RefPtr<AllowIndexedDBMainThreadBridge> bridge = AllowIndexedDBMainThreadBridge::create(workerContext, webWorkerBase, mode, name); |
+ RefPtr<AllowIndexedDBMainThreadBridge> bridge = AllowIndexedDBMainThreadBridge::create(workerGlobalScope, webWorkerBase, mode, name); |
// Either the bridge returns, or the queue gets terminated. |
- if (runLoop.runInMode(workerContext, mode) == MessageQueueTerminated) { |
+ if (runLoop.runInMode(workerGlobalScope, mode) == MessageQueueTerminated) { |
bridge->cancel(); |
return false; |
} |