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

Unified Diff: third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp

Issue 1739613002: DevTools: validate protocol input parameters. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaselined a test. Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
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 3156680940dedc7c26d827b090dc94c8a94d13fd..e8abe9e3ed724f4579e98cb373ec435a735210d1 100644
--- a/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp
@@ -355,11 +355,11 @@ private:
RefPtr<RequestDatabaseCallback> m_requestCallback;
};
-static IDBKey* idbKeyFromInspectorObject(PassOwnPtr<protocol::IndexedDB::Key> key)
+static IDBKey* idbKeyFromInspectorObject(protocol::IndexedDB::Key* key)
{
IDBKey* idbKey;
- if (!key || !key->hasType())
+ if (!key)
return nullptr;
String type = key->getType();
@@ -403,14 +403,8 @@ static IDBKeyRange* idbKeyRangeFromKeyRange(protocol::IndexedDB::KeyRange* keyRa
if (keyRange->hasUpper() && !idbUpper)
return nullptr;
- if (!keyRange->hasLowerOpen())
- return nullptr;
IDBKeyRange::LowerBoundType lowerBoundType = keyRange->getLowerOpen() ? IDBKeyRange::LowerBoundOpen : IDBKeyRange::LowerBoundClosed;
-
- if (!keyRange->hasUpperOpen())
- return nullptr;
IDBKeyRange::UpperBoundType upperBoundType = keyRange->getUpperOpen() ? IDBKeyRange::UpperBoundOpen : IDBKeyRange::UpperBoundClosed;
-
return IDBKeyRange::create(idbLower, idbUpper, lowerBoundType, upperBoundType);
}

Powered by Google App Engine
This is Rietveld 408576698