OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 WebViewImpl* webView = webFrame->viewImpl(); | 158 WebViewImpl* webView = webFrame->viewImpl(); |
159 if (!webView) | 159 if (!webView) |
160 return false; | 160 return false; |
161 if (webView->permissionClient()) | 161 if (webView->permissionClient()) |
162 return webView->permissionClient()->allowDatabase(webFrame, name, di
splayName, estimatedSize); | 162 return webView->permissionClient()->allowDatabase(webFrame, name, di
splayName, estimatedSize); |
163 } else { | 163 } else { |
164 #if ENABLE(WORKERS) | 164 #if ENABLE(WORKERS) |
165 WorkerContext* workerContext = static_cast<WorkerContext*>(scriptExecuti
onContext); | 165 WorkerContext* workerContext = static_cast<WorkerContext*>(scriptExecuti
onContext); |
166 WorkerLoaderProxy* workerLoaderProxy = &workerContext->thread()->workerL
oaderProxy(); | 166 WorkerLoaderProxy* workerLoaderProxy = &workerContext->thread()->workerL
oaderProxy(); |
167 WebWorkerBase* webWorker = static_cast<WebWorkerBase*>(workerLoaderProxy
); | 167 WebWorkerBase* webWorker = static_cast<WebWorkerBase*>(workerLoaderProxy
); |
168 return allowDatabaseForWorker(webWorker->commonClient(), webWorker->view
()->mainFrame(), name, displayName, estimatedSize); | 168 WebView* view = webWorker->view(); |
| 169 if (!view) |
| 170 return false; |
| 171 return allowDatabaseForWorker(webWorker->commonClient(), view->mainFrame
(), name, displayName, estimatedSize); |
169 #else | 172 #else |
170 ASSERT_NOT_REACHED(); | 173 ASSERT_NOT_REACHED(); |
171 #endif | 174 #endif |
172 } | 175 } |
173 | 176 |
174 return true; | 177 return true; |
175 } | 178 } |
176 | 179 |
177 void DatabaseObserver::databaseOpened(AbstractDatabase* database) | 180 void DatabaseObserver::databaseOpened(AbstractDatabase* database) |
178 { | 181 { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 } | 221 } |
219 | 222 |
220 void DatabaseObserver::reportVacuumDatabaseResult(AbstractDatabase* database, in
t sqliteErrorCode) | 223 void DatabaseObserver::reportVacuumDatabaseResult(AbstractDatabase* database, in
t sqliteErrorCode) |
221 { | 224 { |
222 WebDatabase::observer()->reportVacuumDatabaseResult(WebDatabase(database), s
qliteErrorCode); | 225 WebDatabase::observer()->reportVacuumDatabaseResult(WebDatabase(database), s
qliteErrorCode); |
223 } | 226 } |
224 | 227 |
225 } // namespace WebCore | 228 } // namespace WebCore |
226 | 229 |
227 #endif // ENABLE(SQL_DATABASE) | 230 #endif // ENABLE(SQL_DATABASE) |
OLD | NEW |