Guard against callback being called twice
This commit is contained in:
parent
96d53d279e
commit
ee51e37db7
3 changed files with 26 additions and 19 deletions
|
@ -64,7 +64,7 @@ class JsAsker : public RequestJob {
|
|||
// Called when the JS handler has sent the response, we need to decide whether
|
||||
// to start, or fail the job.
|
||||
void OnResponse(bool success, scoped_ptr<base::Value> options) {
|
||||
if (success) {
|
||||
if (success && options) {
|
||||
StartAsync(options.Pass());
|
||||
} else {
|
||||
RequestJob::NotifyStartError(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue