| Index: chrome/browser/extensions/api/dial/dial_api.cc
|
| diff --git a/chrome/browser/extensions/api/dial/dial_api.cc b/chrome/browser/extensions/api/dial/dial_api.cc
|
| index 6099c0277d891a24400da675b77269a342d7dfe3..783992bf2befac1cd57264254d3728ba5dc9f878 100644
|
| --- a/chrome/browser/extensions/api/dial/dial_api.cc
|
| +++ b/chrome/browser/extensions/api/dial/dial_api.cc
|
| @@ -240,6 +240,9 @@ void DialFetchDeviceDescriptionFunction::MaybeStartFetch(const GURL& url) {
|
|
|
| void DialFetchDeviceDescriptionFunction::OnFetchComplete(
|
| const api::dial::DialDeviceDescriptionData& result) {
|
| + // Destroy the DeviceDescriptionFetcher since it still contains a reference
|
| + // to |this| in its un-invoked callback.
|
| + device_description_fetcher_.reset();
|
| api::dial::DialDeviceDescription device_description;
|
| device_description.device_label = params_->device_label;
|
| device_description.app_url = result.app_url.spec();
|
| @@ -250,6 +253,9 @@ void DialFetchDeviceDescriptionFunction::OnFetchComplete(
|
|
|
| void DialFetchDeviceDescriptionFunction::OnFetchError(
|
| const std::string& message) {
|
| + // Destroy the DeviceDescriptionFetcher since it still contains a reference
|
| + // to |this| in its un-invoked callback.
|
| + device_description_fetcher_.reset();
|
| SetError(message);
|
| SendResponse(false);
|
| }
|
|
|