Chromium Code Reviews| Index: content/common/indexed_db/proxy_webidbcursor_impl.cc |
| diff --git a/content/common/indexed_db/proxy_webidbcursor_impl.cc b/content/common/indexed_db/proxy_webidbcursor_impl.cc |
| index f043356171fdbe58f43eac00908d79113b030043..a86a74e361977797b3f3276521a222af13f24c26 100644 |
| --- a/content/common/indexed_db/proxy_webidbcursor_impl.cc |
| +++ b/content/common/indexed_db/proxy_webidbcursor_impl.cc |
| @@ -62,24 +62,26 @@ void RendererWebIDBCursorImpl::update(const WebSerializedScriptValue& value, |
| } |
| void RendererWebIDBCursorImpl::continueFunction(const WebIDBKey& key, |
| - WebIDBCallbacks* callbacks, |
| + WebIDBCallbacks* callbacks_ptr, |
| WebExceptionCode& ec) { |
| IndexedDBDispatcher* dispatcher = |
| IndexedDBDispatcher::ThreadSpecificInstance(); |
| + scoped_ptr<WebIDBCallbacks> callbacks(callbacks_ptr); |
|
michaeln
2012/03/17 02:44:46
lgtm
|
| - if (key.type() == WebIDBKey::InvalidType) { |
| + if (key.type() == WebIDBKey::NullType) { |
| // No key, so this would qualify for a prefetch. |
| ++continue_count_; |
| if (!prefetch_keys_.empty()) { |
| // We have a prefetch cache, so serve the result from that. |
| - CachedContinue(callbacks); |
| + CachedContinue(callbacks.get()); |
| return; |
| } |
| if (continue_count_ > kPrefetchContinueThreshold) { |
| // Request pre-fetch. |
| - dispatcher->RequestIDBCursorPrefetch(prefetch_amount_, callbacks, |
| + dispatcher->RequestIDBCursorPrefetch(prefetch_amount_, |
| + callbacks.release(), |
| idb_cursor_id_, &ec); |
| // Increase prefetch_amount_ exponentially. |
| @@ -94,7 +96,7 @@ void RendererWebIDBCursorImpl::continueFunction(const WebIDBKey& key, |
| ResetPrefetchCache(); |
| } |
| - dispatcher->RequestIDBCursorContinue(IndexedDBKey(key), callbacks, |
| + dispatcher->RequestIDBCursorContinue(IndexedDBKey(key), callbacks.release(), |
| idb_cursor_id_, &ec); |
| } |