Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Issue 1941363002: PasswordController should give up on WebState destruction (Closed)

Created:
4 years, 7 months ago by vabr (Chromium)
Modified:
4 years, 7 months ago
CC:
chromium-reviews, gcasto+watchlist_chromium.org, mkwst+watchlist-passwords_chromium.org, vabr+watchlistpasswordmanager_chromium.org, sdefresne+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

PasswordController should give up on WebState destruction The associated bug has a crash where a WebStateObserverBridge method of PasswordController dereferences a null pointer. The block where the dereference happens is: if (weakSelf) { weakSelf.get()->passwordManager_->OnPasswordFormSubmitted( weakSelf.get()->passwordManagerDriver_.get(), form); } It is likely that between the call to -webState:didSubmitDocumentWithFormNamed:userInitiated: and the execution of the block the WebState has been destroyed, and therefore also passwordManager_ and passwordManagerDriver_ nulled. This CL adds a BOOL to keep track of the destruction of the WebState, allowing the controller to give up when the WS is destroyed. R=eugenebut@chromium.org BUG=608090 Committed: https://crrev.com/0e96a24352e1ed49716b86177e65b09069ed05a2 Cr-Commit-Position: refs/heads/master@{#391511}

Patch Set 1 #

Patch Set 2 : Keep webState separately from the bridge #

Patch Set 3 : Fix compile #

Patch Set 4 : Just rebased #

Patch Set 5 : isBeingDestroyed #

Total comments: 12

Patch Set 6 : Just rebased #

Patch Set 7 : Comments addressed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -1 line) Patch
M ios/chrome/browser/passwords/password_controller.mm View 1 2 3 4 5 6 4 chunks +11 lines, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 33 (13 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1941363002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1941363002/1
4 years, 7 months ago (2016-05-03 08:53:09 UTC) #2
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-03 10:12:12 UTC) #4
vabr (Chromium)
Keep webState separately from the bridge
4 years, 7 months ago (2016-05-03 10:50:53 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1941363002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1941363002/20001
4 years, 7 months ago (2016-05-03 10:51:51 UTC) #7
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/169204) ios_rel_device_ninja on ...
4 years, 7 months ago (2016-05-03 11:03:49 UTC) #9
vabr (Chromium)
Fix compile
4 years, 7 months ago (2016-05-03 11:19:00 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1941363002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1941363002/40001
4 years, 7 months ago (2016-05-03 11:19:23 UTC) #12
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-03 11:49:10 UTC) #14
vabr (Chromium)
Hi Eugene, Could you PTAL? I ran the downstream smoke bot on this and it ...
4 years, 7 months ago (2016-05-03 12:35:09 UTC) #16
Eugene But (OOO till 7-30)
The block where app crashes is called asynchronously and can be called after detach. I ...
4 years, 7 months ago (2016-05-03 15:17:10 UTC) #17
vabr (Chromium)
Just rebased
4 years, 7 months ago (2016-05-03 17:16:23 UTC) #18
vabr (Chromium)
isBeingDestroyed
4 years, 7 months ago (2016-05-03 17:24:27 UTC) #19
vabr (Chromium)
Thanks, Eugene. PTAL (the downstream smoke bot is green as well). I was not sure ...
4 years, 7 months ago (2016-05-03 17:41:34 UTC) #21
Eugene But (OOO till 7-30)
Please update CL comment to reflect the actual changes. lgtm, so you are not blocked ...
4 years, 7 months ago (2016-05-03 17:49:49 UTC) #22
vabr (Chromium)
Just rebased
4 years, 7 months ago (2016-05-04 14:09:07 UTC) #23
vabr (Chromium)
Comments addressed
4 years, 7 months ago (2016-05-04 14:20:29 UTC) #24
vabr (Chromium)
Thanks, Eugene! Comments addressed, and the downstream smoke test passed as well, so I'm sending ...
4 years, 7 months ago (2016-05-04 15:03:46 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1941363002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1941363002/120001
4 years, 7 months ago (2016-05-04 15:04:27 UTC) #29
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 7 months ago (2016-05-04 15:09:25 UTC) #31
commit-bot: I haz the power
4 years, 7 months ago (2016-05-04 15:10:20 UTC) #33
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/0e96a24352e1ed49716b86177e65b09069ed05a2
Cr-Commit-Position: refs/heads/master@{#391511}

Powered by Google App Engine
This is Rietveld 408576698