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 | 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 IDBIndex::IDBIndex(const IDBIndexMetadata& metadata, IDBObjectStore* objectStore
, IDBTransaction* transaction) | 47 IDBIndex::IDBIndex(const IDBIndexMetadata& metadata, IDBObjectStore* objectStore
, IDBTransaction* transaction) |
48 : m_metadata(metadata) | 48 : m_metadata(metadata) |
49 , m_objectStore(objectStore) | 49 , m_objectStore(objectStore) |
50 , m_transaction(transaction) | 50 , m_transaction(transaction) |
51 , m_deleted(false) | 51 , m_deleted(false) |
52 { | 52 { |
53 ASSERT(m_objectStore); | 53 ASSERT(m_objectStore); |
54 ASSERT(m_transaction); | 54 ASSERT(m_transaction); |
55 ASSERT(m_metadata.id != IDBIndexMetadata::InvalidId); | 55 ASSERT(m_metadata.id != IDBIndexMetadata::InvalidId); |
56 ScriptWrappable::init(this); | |
57 } | 56 } |
58 | 57 |
59 IDBIndex::~IDBIndex() | 58 IDBIndex::~IDBIndex() |
60 { | 59 { |
61 } | 60 } |
62 | 61 |
63 void IDBIndex::trace(Visitor* visitor) | 62 void IDBIndex::trace(Visitor* visitor) |
64 { | 63 { |
65 visitor->trace(m_objectStore); | 64 visitor->trace(m_objectStore); |
66 visitor->trace(m_transaction); | 65 visitor->trace(m_transaction); |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 { | 220 { |
222 return m_transaction->backendDB(); | 221 return m_transaction->backendDB(); |
223 } | 222 } |
224 | 223 |
225 bool IDBIndex::isDeleted() const | 224 bool IDBIndex::isDeleted() const |
226 { | 225 { |
227 return m_deleted || m_objectStore->isDeleted(); | 226 return m_deleted || m_objectStore->isDeleted(); |
228 } | 227 } |
229 | 228 |
230 } // namespace blink | 229 } // namespace blink |
OLD | NEW |