| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * Copyright (C) 2011 Google, Inc. All Rights Reserved. | 3 * Copyright (C) 2011 Google, Inc. All Rights Reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // To do this, we stop the database and let everything shutdown naturally | 124 // To do this, we stop the database and let everything shutdown naturally |
| 125 // because the database closing process may still make use of this context. | 125 // because the database closing process may still make use of this context. |
| 126 // It is not safe to just delete the context here. | 126 // It is not safe to just delete the context here. |
| 127 void DatabaseContext::contextDestroyed() | 127 void DatabaseContext::contextDestroyed() |
| 128 { | 128 { |
| 129 stopDatabases(); | 129 stopDatabases(); |
| 130 ActiveDOMObject::contextDestroyed(); | 130 ActiveDOMObject::contextDestroyed(); |
| 131 deref(); // paired with the ref() call on create(). | 131 deref(); // paired with the ref() call on create(). |
| 132 } | 132 } |
| 133 | 133 |
| 134 void DatabaseContext::willStop() |
| 135 { |
| 136 DatabaseManager::manager().interruptAllDatabasesForContext(this); |
| 137 } |
| 138 |
| 134 // stop() is from stopActiveDOMObjects() which indicates that the owner LocalFra
me | 139 // stop() is from stopActiveDOMObjects() which indicates that the owner LocalFra
me |
| 135 // or WorkerThread is shutting down. Initiate the orderly shutdown by stopping | 140 // or WorkerThread is shutting down. Initiate the orderly shutdown by stopping |
| 136 // the associated databases. | 141 // the associated databases. |
| 137 void DatabaseContext::stop() | 142 void DatabaseContext::stop() |
| 138 { | 143 { |
| 139 stopDatabases(); | 144 stopDatabases(); |
| 140 } | 145 } |
| 141 | 146 |
| 142 PassRefPtr<DatabaseContext> DatabaseContext::backend() | 147 PassRefPtr<DatabaseContext> DatabaseContext::backend() |
| 143 { | 148 { |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 { | 240 { |
| 236 return executionContext()->securityOrigin(); | 241 return executionContext()->securityOrigin(); |
| 237 } | 242 } |
| 238 | 243 |
| 239 bool DatabaseContext::isContextThread() const | 244 bool DatabaseContext::isContextThread() const |
| 240 { | 245 { |
| 241 return executionContext()->isContextThread(); | 246 return executionContext()->isContextThread(); |
| 242 } | 247 } |
| 243 | 248 |
| 244 } // namespace WebCore | 249 } // namespace WebCore |
| OLD | NEW |