New issue
Advanced search Search tips

Issue 834723 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: 2018-04-25
OS: iOS
Pri: 1
Type: Bug

Blocking:
issue 825431



Sign in to add a comment

Confirm that BookmarkActivity does not need a BoomarkModel

Project Member Reported by rohitrao@chromium.org, Apr 19 2018

Issue description

BookmarkActivity used to take a pointer to a BookmarkModel, but that was changed in https://chromium-review.googlesource.com/c/chromium/src/+/1017323 to precompute whether the URL was bookmarked or not and take that as a BOOL.  This was done because the BookmarkActivity can potentially outlive the C++ BookmarkModel, which was leading to crashes in unittests.

Please confirm that it is ok to precompute the bookmarked state like this.  If it is important for the BookmarkActivity to continue having a pointer to the model, we can do that as well, but I chose to make the simpler change to start.

(If we need to keep the model, we will need to register as a BookmarkModelObserver and listen for "model destroyed" calls.  We should also dynamically disable the activity if the model is destroyed out from underneath it.)
 
Status: Assigned (was: Untriaged)
Blocking: 825431
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 24 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0d5bf221b2211022ba95b80d2b8d885128e8c0ba

commit 0d5bf221b2211022ba95b80d2b8d885128e8c0ba
Author: Gauthier Ambard <gambard@chromium.org>
Date: Tue Apr 24 16:27:26 2018

Show bookmark action even if the model isn't loaded

This CL shows the 'Add to Bookmark' action in the activity menu even if
the bookmark model isn't loaded yet.
If the model isn't loaded and the user tries to add the page to the
bookmarks, the action will silently fails.

Bug:  834723 
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: Id4ae21e3c20cdfad5487d95a928b52103614807d
Reviewed-on: https://chromium-review.googlesource.com/1025101
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553158}
[modify] https://crrev.com/0d5bf221b2211022ba95b80d2b8d885128e8c0ba/ios/chrome/browser/ui/activity_services/activity_service_controller.mm

NextAction: 2018-04-25
Status: Fixed (was: Assigned)
The NextAction date has arrived: 2018-04-25

Sign in to add a comment