Chromium Code Reviews| Index: third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp |
| diff --git a/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp b/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp |
| index c2b3db184dff0d6b39b4879d7cabed9b32bf6cbf..776066b493105ddb875580820bfe85c5e0f017f9 100644 |
| --- a/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp |
| +++ b/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp |
| @@ -393,8 +393,9 @@ static IDBKey* idbKeyFromInspectorObject(PassOwnPtr<protocol::IndexedDB::Key> ke |
| return idbKey; |
| } |
| -static IDBKeyRange* idbKeyRangeFromKeyRange(PassOwnPtr<protocol::IndexedDB::KeyRange> keyRange) |
| +static IDBKeyRange* idbKeyRangeFromKeyRange(const Maybe<protocol::IndexedDB::KeyRange>& maybeRange) |
| { |
| + protocol::IndexedDB::KeyRange* keyRange = maybeRange.fromJust(); |
|
dgozman
2016/02/24 23:17:43
Let's pass raw pointer to this method since it alr
pfeldman
2016/02/24 23:38:39
Done.
|
| IDBKey* idbLower = idbKeyFromInspectorObject(keyRange->getLower(nullptr)); |
| if (keyRange->hasLower() && !idbLower) |
| return nullptr; |
| @@ -686,7 +687,15 @@ void InspectorIndexedDBAgent::requestDatabase(ErrorString* errorString, const St |
| databaseLoader->start(idbFactory, document->securityOrigin(), databaseName); |
| } |
| -void InspectorIndexedDBAgent::requestData(ErrorString* errorString, const String& securityOrigin, const String& databaseName, const String& objectStoreName, const String& indexName, int skipCount, int pageSize, PassOwnPtr<protocol::IndexedDB::KeyRange> keyRange, const PassRefPtr<RequestDataCallback> requestCallback) |
| +void InspectorIndexedDBAgent::requestData(ErrorString* errorString, |
| + const String& securityOrigin, |
| + const String& databaseName, |
| + const String& objectStoreName, |
| + const String& indexName, |
| + int skipCount, |
| + int pageSize, |
| + const Maybe<protocol::IndexedDB::KeyRange>& keyRange, |
| + const PassRefPtr<RequestDataCallback> requestCallback) |
| { |
| LocalFrame* frame = m_inspectedFrames->frameWithSecurityOrigin(securityOrigin); |
| Document* document = assertDocument(errorString, frame); |
| @@ -696,8 +705,8 @@ void InspectorIndexedDBAgent::requestData(ErrorString* errorString, const String |
| if (!idbFactory) |
| return; |
| - IDBKeyRange* idbKeyRange = keyRange ? idbKeyRangeFromKeyRange(keyRange) : nullptr; |
| - if (keyRange && !idbKeyRange) { |
| + IDBKeyRange* idbKeyRange = keyRange.isJust() ? idbKeyRangeFromKeyRange(keyRange) : nullptr; |
| + if (keyRange.isJust() && !idbKeyRange) { |
| *errorString = "Can not parse key range."; |
| return; |
| } |