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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 WebViewImpl* webView = webFrame->viewImpl(); | 163 WebViewImpl* webView = webFrame->viewImpl(); |
164 if (!webView) | 164 if (!webView) |
165 return false; | 165 return false; |
166 if (webView->permissionClient()) | 166 if (webView->permissionClient()) |
167 return webView->permissionClient()->allowDatabase(webFrame, name, di
splayName, estimatedSize); | 167 return webView->permissionClient()->allowDatabase(webFrame, name, di
splayName, estimatedSize); |
168 } else { | 168 } else { |
169 #if ENABLE(WORKERS) | 169 #if ENABLE(WORKERS) |
170 WorkerContext* workerContext = static_cast<WorkerContext*>(scriptExecuti
onContext); | 170 WorkerContext* workerContext = static_cast<WorkerContext*>(scriptExecuti
onContext); |
171 WorkerLoaderProxy* workerLoaderProxy = &workerContext->thread()->workerL
oaderProxy(); | 171 WorkerLoaderProxy* workerLoaderProxy = &workerContext->thread()->workerL
oaderProxy(); |
172 NewWebWorkerBase* webWorker = static_cast<NewWebWorkerBase*>(workerLoade
rProxy); | 172 NewWebWorkerBase* webWorker = static_cast<NewWebWorkerBase*>(workerLoade
rProxy); |
173 return allowDatabaseForWorker(webWorker->newCommonClient(), webWorker->v
iew()->mainFrame(), name, displayName, estimatedSize); | 173 WebView* view = webWorker->view(); |
| 174 if (!view) |
| 175 return false; |
| 176 return allowDatabaseForWorker(webWorker->newCommonClient(), view->mainFr
ame(), name, displayName, estimatedSize); |
174 #else | 177 #else |
175 ASSERT_NOT_REACHED(); | 178 ASSERT_NOT_REACHED(); |
176 #endif | 179 #endif |
177 } | 180 } |
178 | 181 |
179 return true; | 182 return true; |
180 } | 183 } |
181 | 184 |
182 void DatabaseObserver::databaseOpened(AbstractDatabase* database) | 185 void DatabaseObserver::databaseOpened(AbstractDatabase* database) |
183 { | 186 { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 } | 226 } |
224 | 227 |
225 void DatabaseObserver::reportVacuumDatabaseResult(AbstractDatabase* database, in
t sqliteErrorCode) | 228 void DatabaseObserver::reportVacuumDatabaseResult(AbstractDatabase* database, in
t sqliteErrorCode) |
226 { | 229 { |
227 WebDatabase::observer()->reportVacuumDatabaseResult(WebDatabase(database), s
qliteErrorCode); | 230 WebDatabase::observer()->reportVacuumDatabaseResult(WebDatabase(database), s
qliteErrorCode); |
228 } | 231 } |
229 | 232 |
230 } // namespace WebCore | 233 } // namespace WebCore |
231 | 234 |
232 #endif // ENABLE(SQL_DATABASE) | 235 #endif // ENABLE(SQL_DATABASE) |
OLD | NEW |