Index: chrome/browser/sessions/session_service.cc |
diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc |
index c5864b1c72eb22d6cbcbd4ab360c8882e65cea0b..49ee9162e0a3f67bafeb6d5e77904d88288c51ea 100644 |
--- a/chrome/browser/sessions/session_service.cc |
+++ b/chrome/browser/sessions/session_service.cc |
@@ -1263,8 +1263,8 @@ bool SessionService::ReplacePendingCommand(SessionCommand* command) { |
// well. |
if (command->id() != kCommandUpdateTabNavigation) |
return false; |
- void* iterator = NULL; |
scoped_ptr<Pickle> command_pickle(command->PayloadAsPickle()); |
+ PickleReader iterator(*command_pickle); |
SessionID::id_type command_tab_id; |
int command_nav_index; |
if (!command_pickle->ReadInt(&iterator, &command_tab_id) || |
@@ -1282,7 +1282,7 @@ bool SessionService::ReplacePendingCommand(SessionCommand* command) { |
// the command. Make sure we delete the pickle before the command, else |
// the pickle references deleted memory. |
scoped_ptr<Pickle> existing_pickle(existing_command->PayloadAsPickle()); |
- iterator = NULL; |
+ iterator = PickleReader(*existing_pickle); |
if (!existing_pickle->ReadInt(&iterator, &existing_tab_id) || |
!existing_pickle->ReadInt(&iterator, &existing_nav_index)) { |
return false; |