summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions
diff options
context:
space:
mode:
authorearthdok@chromium.org <earthdok@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-06 23:07:19 +0000
committerearthdok@chromium.org <earthdok@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-06 23:07:19 +0000
commitf8ad17ffb3ec79e400d36e56180efddad34065ac (patch)
treeb9f4f61f5eeaade76592676722a03778044958fa /chrome/browser/extensions
parentf292cff9d175baca5c87030f84feb3e0b880c0ab (diff)
downloadchromium_src-f8ad17ffb3ec79e400d36e56180efddad34065ac.zip
chromium_src-f8ad17ffb3ec79e400d36e56180efddad34065ac.tar.gz
chromium_src-f8ad17ffb3ec79e400d36e56180efddad34065ac.tar.bz2
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
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r--chrome/browser/extensions/api/sessions/sessions_api.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/extensions/api/sessions/sessions_api.cc b/chrome/browser/extensions/api/sessions/sessions_api.cc
index 013afa3..d2e68cf 100644
--- a/chrome/browser/extensions/api/sessions/sessions_api.cc
+++ b/chrome/browser/extensions/api/sessions/sessions_api.cc
@@ -393,8 +393,9 @@ void SessionsRestoreFunction::SetInvalidIdError(const std::string& invalid_id) {
void SessionsRestoreFunction::SetResultRestoredTab(
const content::WebContents* contents) {
- scoped_ptr<tabs::Tab> tab(tabs::Tab::FromValue(
- *ExtensionTabUtil::CreateTabValue(contents, GetExtension())));
+ scoped_ptr<DictionaryValue> tab_value(
+ ExtensionTabUtil::CreateTabValue(contents, GetExtension()));
+ scoped_ptr<tabs::Tab> tab(tabs::Tab::FromValue(*tab_value));
scoped_ptr<api::sessions::Session> restored_session(CreateSessionModelHelper(
base::Time::Now().ToTimeT(),
tab.Pass(),