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

Issue 1950983002: PasswordController initialization: WebStateObserverBridge to the end (Closed)

Created:
4 years, 7 months ago by vabr (Chromium)
Modified:
4 years, 7 months ago
Reviewers:
vasilii
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@608090_isbeingdestroyed
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

PasswordController initialization: WebStateObserverBridge to the end 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); } While the most likely cause of that bug is being addressed in https://codereview.chromium.org/1941363002/, the initialization order in PasswordController's -initWithWebState is also suspicious: PasswordController starts observing the WebState before it creates the supporting objects like passwordManager_. This CL changes the initialisation order to only create the bridge once the two pointers are non-null. BUG=608090 Committed: https://crrev.com/bcd8636b075e7bcf9f5861f981695236dd533baf Cr-Commit-Position: refs/heads/master@{#392588}

Patch Set 1 #

Patch Set 2 : #

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

Depends on Patchset:

Messages

Total messages: 10 (3 generated)
vabr (Chromium)
Hi Vasilii, Does this make sense to you? Cheers, Vaclav
4 years, 7 months ago (2016-05-04 14:53:55 UTC) #2
vasilii
https://codereview.chromium.org/1950983002/diff/20001/ios/chrome/browser/passwords/password_controller.mm File ios/chrome/browser/passwords/password_controller.mm (right): https://codereview.chromium.org/1950983002/diff/20001/ios/chrome/browser/passwords/password_controller.mm#newcode244 ios/chrome/browser/passwords/password_controller.mm:244: web::WebState* webState_; // weak Why is the new member ...
4 years, 7 months ago (2016-05-10 12:38:47 UTC) #3
vabr (Chromium)
https://codereview.chromium.org/1950983002/diff/20001/ios/chrome/browser/passwords/password_controller.mm File ios/chrome/browser/passwords/password_controller.mm (right): https://codereview.chromium.org/1950983002/diff/20001/ios/chrome/browser/passwords/password_controller.mm#newcode244 ios/chrome/browser/passwords/password_controller.mm:244: web::WebState* webState_; // weak On 2016/05/10 12:38:47, vasilii wrote: ...
4 years, 7 months ago (2016-05-10 12:48:47 UTC) #4
vasilii
lgtm
4 years, 7 months ago (2016-05-10 12:52:00 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1950983002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1950983002/20001
4 years, 7 months ago (2016-05-10 12:54:58 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 7 months ago (2016-05-10 13:28:27 UTC) #8
commit-bot: I haz the power
4 years, 7 months ago (2016-05-10 13:31:12 UTC) #10
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/bcd8636b075e7bcf9f5861f981695236dd533baf
Cr-Commit-Position: refs/heads/master@{#392588}

Powered by Google App Engine
This is Rietveld 408576698