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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 return nullptr; | 427 return nullptr; |
428 idbKey = IDBKey::createString(key->getString(String())); | 428 idbKey = IDBKey::createString(key->getString(String())); |
429 } else if (type == s_date) { | 429 } else if (type == s_date) { |
430 if (!key->hasDate()) | 430 if (!key->hasDate()) |
431 return nullptr; | 431 return nullptr; |
432 idbKey = IDBKey::createDate(key->getDate(0)); | 432 idbKey = IDBKey::createDate(key->getDate(0)); |
433 } else if (type == s_array) { | 433 } else if (type == s_array) { |
434 IDBKey::KeyArray keyArray; | 434 IDBKey::KeyArray keyArray; |
435 auto array = key->getArray(nullptr); | 435 auto array = key->getArray(nullptr); |
436 for (size_t i = 0; array && i < array->length(); ++i) | 436 for (size_t i = 0; array && i < array->length(); ++i) |
437 keyArray.append(idbKeyFromInspectorObject(array->get(i))); | 437 keyArray.push_back(idbKeyFromInspectorObject(array->get(i))); |
438 idbKey = IDBKey::createArray(keyArray); | 438 idbKey = IDBKey::createArray(keyArray); |
439 } else { | 439 } else { |
440 return nullptr; | 440 return nullptr; |
441 } | 441 } |
442 | 442 |
443 return idbKey; | 443 return idbKey; |
444 } | 444 } |
445 | 445 |
446 static IDBKeyRange* idbKeyRangeFromKeyRange( | 446 static IDBKeyRange* idbKeyRangeFromKeyRange( |
447 protocol::IndexedDB::KeyRange* keyRange) { | 447 protocol::IndexedDB::KeyRange* keyRange) { |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
951 clearObjectStore->start(idbFactory, document->getSecurityOrigin(), | 951 clearObjectStore->start(idbFactory, document->getSecurityOrigin(), |
952 databaseName); | 952 databaseName); |
953 } | 953 } |
954 | 954 |
955 DEFINE_TRACE(InspectorIndexedDBAgent) { | 955 DEFINE_TRACE(InspectorIndexedDBAgent) { |
956 visitor->trace(m_inspectedFrames); | 956 visitor->trace(m_inspectedFrames); |
957 InspectorBaseAgent::trace(visitor); | 957 InspectorBaseAgent::trace(visitor); |
958 } | 958 } |
959 | 959 |
960 } // namespace blink | 960 } // namespace blink |
OLD | NEW |