DescriptionFix ImportDataHandler crash.
The same ImportDataHandler lives throughout the browser process and handles all imports.
The following could thus result in derefing a NULL pointer:
1) Importer1 launches (and importer_host_ is set to it)
2) Importer2 launches (and importer_host_ is set to it)
3) Importer2 is done and notifies us via ImportEnded
4) This results in us setting importer_host_ = NULL;
5) Importer1 is done and notifies us via ImportEnded
6) This result in us calling importer_host_->set_observer(NULL); when importer_host_ is NULL
This CL makes it so that on a new import request if importer_host_ is not NULL we do importer_host_->set_observer(NULL) in order to let the ongoing import finish silently without bothering us when it's done.
The current UI is such that it is possible to spam-click the import button and generate multiple identical imports; perhaps this should be fixed, but as a fix for M30 I think this is the simplest we can do.
This problem was also present in another method added in http://crrev.com/216947; moved some code around to fix both issues at once.
BUG=292791
TEST=Repro steps @ https://code.google.com/p/chromium/issues/detail?id=292791#c4 no longer result in crash.
R=estade@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=223933
Patch Set 1 #
Total comments: 2
Patch Set 2 : nit #
Messages
Total messages: 5 (0 generated)
|