| Index: components/leveldb/public/cpp/remote_iterator.cc
|
| diff --git a/components/leveldb/public/cpp/remote_iterator.cc b/components/leveldb/public/cpp/remote_iterator.cc
|
| index b1042f70a53424e1012a14ac6489dd543d4e8f35..c7e0c4ac962f067f681445f7727625de097e8282 100644
|
| --- a/components/leveldb/public/cpp/remote_iterator.cc
|
| +++ b/components/leveldb/public/cpp/remote_iterator.cc
|
| @@ -34,7 +34,7 @@ void RemoteIterator::SeekToLast() {
|
| }
|
|
|
| void RemoteIterator::Seek(const Slice& target) {
|
| - database_->IteratorSeek(iterator_id_, GetArrayFor(target), &valid_, &status_,
|
| + database_->IteratorSeek(iterator_id_, GetVectorFor(target), &valid_, &status_,
|
| &key_, &value_);
|
| }
|
|
|
| @@ -47,15 +47,19 @@ void RemoteIterator::Prev() {
|
| }
|
|
|
| Slice RemoteIterator::key() const {
|
| - return GetSliceFor(key_);
|
| + if (!key_)
|
| + return leveldb::Slice();
|
| + return GetSliceFor(*key_);
|
| }
|
|
|
| Slice RemoteIterator::value() const {
|
| - return GetSliceFor(value_);
|
| + if (!value_)
|
| + return leveldb::Slice();
|
| + return GetSliceFor(*value_);
|
| }
|
|
|
| Status RemoteIterator::status() const {
|
| - return DatabaseErrorToStatus(status_, GetSliceFor(key_), GetSliceFor(value_));
|
| + return DatabaseErrorToStatus(status_, key(), value());
|
| }
|
|
|
| } // namespace leveldb
|
|
|