Commit 252cc25e authored by erikkay@google.com's avatar erikkay@google.com

Fix a memory leak in extension install.

Review URL: http://codereview.chromium.org/27215

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10482 0039d316-1c4b-4281-b951-d872f2087c98
parent 9f156b1a
...@@ -717,7 +717,17 @@ void ExtensionsServiceBackend::ReportExtensionInstalled( ...@@ -717,7 +717,17 @@ void ExtensionsServiceBackend::ReportExtensionInstalled(
// After it's installed, load it right away with the same settings. // After it's installed, load it right away with the same settings.
extension_path_ = path; extension_path_ = path;
LoadExtensionCurrentVersion(); LOG(INFO) << "Loading extension " << path.value();
Extension* extension = LoadExtensionCurrentVersion();
if (extension) {
// Only one extension, but ReportExtensionsLoaded can handle multiple,
// so we need to construct a list.
scoped_ptr<ExtensionList> extensions(new ExtensionList);
extensions->push_back(extension);
LOG(INFO) << "Done.";
// Hand off ownership of the loaded extensions to the frontend.
ReportExtensionsLoaded(extensions.release());
}
} }
// Some extensions will autoupdate themselves externally from Chrome. These // Some extensions will autoupdate themselves externally from Chrome. These
......
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