Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(588)

Side by Side Diff: Source/modules/indexeddb/IDBOpenDBRequest.cpp

Issue 26890003: Remove ThreadLocalEventNames (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix build Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 ASSERT(!m_result); 52 ASSERT(!m_result);
53 ScriptWrappable::init(this); 53 ScriptWrappable::init(this);
54 } 54 }
55 55
56 IDBOpenDBRequest::~IDBOpenDBRequest() 56 IDBOpenDBRequest::~IDBOpenDBRequest()
57 { 57 {
58 } 58 }
59 59
60 const AtomicString& IDBOpenDBRequest::interfaceName() const 60 const AtomicString& IDBOpenDBRequest::interfaceName() const
61 { 61 {
62 return eventNames().interfaceForIDBOpenDBRequest; 62 return EventTargetNames::IDBOpenDBRequest;
63 } 63 }
64 64
65 void IDBOpenDBRequest::onBlocked(int64_t oldVersion) 65 void IDBOpenDBRequest::onBlocked(int64_t oldVersion)
66 { 66 {
67 IDB_TRACE("IDBOpenDBRequest::onBlocked()"); 67 IDB_TRACE("IDBOpenDBRequest::onBlocked()");
68 if (!shouldEnqueueEvent()) 68 if (!shouldEnqueueEvent())
69 return; 69 return;
70 RefPtr<IDBAny> newVersionAny = (m_version == IDBDatabaseMetadata::DefaultInt Version) ? IDBAny::createNull() : IDBAny::create(m_version); 70 RefPtr<IDBAny> newVersionAny = (m_version == IDBDatabaseMetadata::DefaultInt Version) ? IDBAny::createNull() : IDBAny::create(m_version);
71 enqueueEvent(IDBVersionChangeEvent::create(IDBAny::create(oldVersion), newVe rsionAny.release(), EventTypeNames::blocked)); 71 enqueueEvent(IDBVersionChangeEvent::create(IDBAny::create(oldVersion), newVe rsionAny.release(), EventTypeNames::blocked));
72 } 72 }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 if (event->type() == EventTypeNames::success && m_result->type() == IDBAny:: IDBDatabaseType && m_result->idbDatabase()->isClosePending()) { 152 if (event->type() == EventTypeNames::success && m_result->type() == IDBAny:: IDBDatabaseType && m_result->idbDatabase()->isClosePending()) {
153 m_result.clear(); 153 m_result.clear();
154 onError(DOMError::create(AbortError, "The connection was closed.")); 154 onError(DOMError::create(AbortError, "The connection was closed."));
155 return false; 155 return false;
156 } 156 }
157 157
158 return IDBRequest::dispatchEvent(event); 158 return IDBRequest::dispatchEvent(event);
159 } 159 }
160 160
161 } // namespace WebCore 161 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/indexeddb/IDBDatabase.cpp ('k') | Source/modules/indexeddb/IDBPendingTransactionMonitor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698