summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/src/DatabaseObserver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/chromium/src/DatabaseObserver.cpp')
-rw-r--r--Source/WebKit/chromium/src/DatabaseObserver.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/WebKit/chromium/src/DatabaseObserver.cpp b/Source/WebKit/chromium/src/DatabaseObserver.cpp
index 40b504803..2196c9b44 100644
--- a/Source/WebKit/chromium/src/DatabaseObserver.cpp
+++ b/Source/WebKit/chromium/src/DatabaseObserver.cpp
@@ -165,7 +165,10 @@ bool DatabaseObserver::canEstablishDatabase(ScriptExecutionContext* scriptExecut
WorkerContext* workerContext = static_cast<WorkerContext*>(scriptExecutionContext);
WorkerLoaderProxy* workerLoaderProxy = &workerContext->thread()->workerLoaderProxy();
WebWorkerBase* webWorker = static_cast<WebWorkerBase*>(workerLoaderProxy);
- return allowDatabaseForWorker(webWorker->commonClient(), webWorker->view()->mainFrame(), name, displayName, estimatedSize);
+ WebView* view = webWorker->view();
+ if (!view)
+ return false;
+ return allowDatabaseForWorker(webWorker->commonClient(), view->mainFrame(), name, displayName, estimatedSize);
#else
ASSERT_NOT_REACHED();
#endif