| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 | 171 |
| 172 IDBOpenDBRequest* idbOpenDBRequest = static_cast<IDBOpenDBRequest*>(even
t->target()); | 172 IDBOpenDBRequest* idbOpenDBRequest = static_cast<IDBOpenDBRequest*>(even
t->target()); |
| 173 IDBAny* requestResult = idbOpenDBRequest->resultAsAny(); | 173 IDBAny* requestResult = idbOpenDBRequest->resultAsAny(); |
| 174 if (requestResult->type() != IDBAny::IDBDatabaseType) { | 174 if (requestResult->type() != IDBAny::IDBDatabaseType) { |
| 175 m_executableWithDatabase->requestCallback()->sendFailure("Unexpected
result type."); | 175 m_executableWithDatabase->requestCallback()->sendFailure("Unexpected
result type."); |
| 176 return; | 176 return; |
| 177 } | 177 } |
| 178 | 178 |
| 179 IDBDatabase* idbDatabase = requestResult->idbDatabase(); | 179 IDBDatabase* idbDatabase = requestResult->idbDatabase(); |
| 180 m_executableWithDatabase->execute(idbDatabase); | 180 m_executableWithDatabase->execute(idbDatabase); |
| 181 V8PerIsolateData::from(m_executableWithDatabase->scriptState()->isolate(
))->ensureIDBPendingTransactionMonitor()->deactivateNewTransactions(); | 181 V8PerIsolateData::from(m_executableWithDatabase->scriptState()->isolate(
))->runEndOfScopeTasks(); |
| 182 idbDatabase->close(); | 182 idbDatabase->close(); |
| 183 } | 183 } |
| 184 | 184 |
| 185 private: | 185 private: |
| 186 OpenDatabaseCallback(ExecutableWithDatabase* executableWithDatabase) | 186 OpenDatabaseCallback(ExecutableWithDatabase* executableWithDatabase) |
| 187 : EventListener(EventListener::CPPEventListenerType) | 187 : EventListener(EventListener::CPPEventListenerType) |
| 188 , m_executableWithDatabase(executableWithDatabase) { } | 188 , m_executableWithDatabase(executableWithDatabase) { } |
| 189 RefPtr<ExecutableWithDatabase> m_executableWithDatabase; | 189 RefPtr<ExecutableWithDatabase> m_executableWithDatabase; |
| 190 }; | 190 }; |
| 191 | 191 |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 clearObjectStore->start(idbFactory, document->securityOrigin(), databaseName
); | 784 clearObjectStore->start(idbFactory, document->securityOrigin(), databaseName
); |
| 785 } | 785 } |
| 786 | 786 |
| 787 void InspectorIndexedDBAgent::trace(Visitor* visitor) | 787 void InspectorIndexedDBAgent::trace(Visitor* visitor) |
| 788 { | 788 { |
| 789 visitor->trace(m_page); | 789 visitor->trace(m_page); |
| 790 InspectorBaseAgent::trace(visitor); | 790 InspectorBaseAgent::trace(visitor); |
| 791 } | 791 } |
| 792 | 792 |
| 793 } // namespace blink | 793 } // namespace blink |
| OLD | NEW |