Commit f8ad17ff authored by earthdok@chromium.org's avatar earthdok@chromium.org

Do not leak a DictionaryValue from SessionsRestoreFunction::SetResultRestoredTab.

BUG=315046
TBR=kalman@chromium.org

Review URL: https://codereview.chromium.org/59743002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233411 0039d316-1c4b-4281-b951-d872f2087c98
parent f292cff9
...@@ -393,8 +393,9 @@ void SessionsRestoreFunction::SetInvalidIdError(const std::string& invalid_id) { ...@@ -393,8 +393,9 @@ void SessionsRestoreFunction::SetInvalidIdError(const std::string& invalid_id) {
void SessionsRestoreFunction::SetResultRestoredTab( void SessionsRestoreFunction::SetResultRestoredTab(
const content::WebContents* contents) { const content::WebContents* contents) {
scoped_ptr<tabs::Tab> tab(tabs::Tab::FromValue( scoped_ptr<DictionaryValue> tab_value(
*ExtensionTabUtil::CreateTabValue(contents, GetExtension()))); ExtensionTabUtil::CreateTabValue(contents, GetExtension()));
scoped_ptr<tabs::Tab> tab(tabs::Tab::FromValue(*tab_value));
scoped_ptr<api::sessions::Session> restored_session(CreateSessionModelHelper( scoped_ptr<api::sessions::Session> restored_session(CreateSessionModelHelper(
base::Time::Now().ToTimeT(), base::Time::Now().ToTimeT(),
tab.Pass(), tab.Pass(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment