|
|
Chromium Code Reviews|
Created:
4 years ago by amaralp Modified:
4 years ago Reviewers:
aelias_OOO_until_Jul13 CC:
agrieve+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, jam Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionSet fields before calling ActionMode.invalidate()
Previously mEditable/mIsPassword/mNeedsPrepare were set after calling invalidate().
This means that SelectionPopupController.onPrepareActionMode() sees the old values
of those fields which is incorrect. This fix could reduce flakiness in the scenario
where the IME thread updates after the action mode is created.
BUG=592428
Committed: https://crrev.com/fa17096f47dcc992185f1a09de28034f17d33b5d
Cr-Commit-Position: refs/heads/master@{#439291}
Patch Set 1 #Patch Set 2 : should set fields regardless of action mode status #Messages
Total messages: 32 (23 generated)
The CQ bit was checked by amaralp@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
The CQ bit was checked by amaralp@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
amaralp@chromium.org changed reviewers: + aelias@chromium.org
Description was changed from ========== Set fields before calling ActionMode.invalidate() Previously setting the fields after calling could cause a race condition where SelectionPopupController.onPrepareActionMode() is called before mEditable/mIsPasswordType/mNeedsPrepare are set. ========== to ========== Set fields before calling ActionMode.invalidate() Previously mEditable/mIsPassword/mNeedsPrepare were set after calling invalidate(). This could cause a race condition where SelectionPopupController.onPrepareActionMode() is called before mEditable/mIsPasswordType/mNeedsPrepare are set. ==========
Description was changed from ========== Set fields before calling ActionMode.invalidate() Previously mEditable/mIsPassword/mNeedsPrepare were set after calling invalidate(). This could cause a race condition where SelectionPopupController.onPrepareActionMode() is called before mEditable/mIsPasswordType/mNeedsPrepare are set. ========== to ========== Set fields before calling ActionMode.invalidate() Previously mEditable/mIsPassword/mNeedsPrepare were set after calling invalidate(). This could cause a race condition where SelectionPopupController.onPrepareActionMode() is called before mEditable/mIsPasswordType/mNeedsPrepare are set. ==========
Description was changed from ========== Set fields before calling ActionMode.invalidate() Previously mEditable/mIsPassword/mNeedsPrepare were set after calling invalidate(). This could cause a race condition where SelectionPopupController.onPrepareActionMode() is called before mEditable/mIsPasswordType/mNeedsPrepare are set. ========== to ========== Set fields before calling ActionMode.invalidate() Previously mEditable/mIsPassword/mNeedsPrepare were set after calling invalidate(). This could cause a race condition where SelectionPopupController.onPrepareActionMode() is called before mEditable/mIsPasswordType/mNeedsPrepare are set. ==========
Description was changed from ========== Set fields before calling ActionMode.invalidate() Previously mEditable/mIsPassword/mNeedsPrepare were set after calling invalidate(). This could cause a race condition where SelectionPopupController.onPrepareActionMode() is called before mEditable/mIsPasswordType/mNeedsPrepare are set. ========== to ========== Set fields before calling ActionMode.invalidate() Previously mEditable/mIsPassword/mNeedsPrepare were set after calling invalidate(). This could cause a race condition where SelectionPopupController.onPrepareActionMode() is called before mEditable/mIsPasswordType/mNeedsPrepare are set. ==========
PTAL
It sounds like you observed a bug, could you file a crbug for it and link it with BUG=?
Description was changed from ========== Set fields before calling ActionMode.invalidate() Previously mEditable/mIsPassword/mNeedsPrepare were set after calling invalidate(). This could cause a race condition where SelectionPopupController.onPrepareActionMode() is called before mEditable/mIsPasswordType/mNeedsPrepare are set. ========== to ========== Set fields before calling ActionMode.invalidate() Previously mEditable/mIsPassword/mNeedsPrepare were set after calling invalidate(). This could cause a race condition where SelectionPopupController.onPrepareActionMode() is called before mEditable/mIsPasswordType/mNeedsPrepare are set. BUG=592428 ==========
On 2016/12/16 at 22:48:42, aelias wrote: > It sounds like you observed a bug, could you file a crbug for it and link it with BUG=? I haven't actually traced a bug to this. It just has the potential to cause one. I've linked it to the flaky selection tests bug.
I don't think there can be a race here. If the callback is called synchronously, it would consistently fail (so it's not); if it's posted asychronously on the UI-thread message loop, the message loop needs to be yielded before it's run. The race you're imagining could only happen if the callback was posted on a side thread.
After offline discussion, ou confirmed this is synchronous and this is just a rarely seen corner case, so lgtm.
The CQ bit was checked by amaralp@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by amaralp@chromium.org
Description was changed from ========== Set fields before calling ActionMode.invalidate() Previously mEditable/mIsPassword/mNeedsPrepare were set after calling invalidate(). This could cause a race condition where SelectionPopupController.onPrepareActionMode() is called before mEditable/mIsPasswordType/mNeedsPrepare are set. BUG=592428 ========== to ========== Set fields before calling ActionMode.invalidate() Previously mEditable/mIsPassword/mNeedsPrepare were set after calling invalidate(). This means that SelectionPopupController.onPrepareActionMode() sees the old values of those fields which is incorrect. BUG= ==========
Description was changed from ========== Set fields before calling ActionMode.invalidate() Previously mEditable/mIsPassword/mNeedsPrepare were set after calling invalidate(). This means that SelectionPopupController.onPrepareActionMode() sees the old values of those fields which is incorrect. BUG= ========== to ========== Set fields before calling ActionMode.invalidate() Previously mEditable/mIsPassword/mNeedsPrepare were set after calling invalidate(). This means that SelectionPopupController.onPrepareActionMode() sees the old values of those fields which is incorrect. This fix could reduce flakiness in the scenario where the IME thread updates after the action mode is created. BUG=592428 ==========
Description was changed from ========== Set fields before calling ActionMode.invalidate() Previously mEditable/mIsPassword/mNeedsPrepare were set after calling invalidate(). This means that SelectionPopupController.onPrepareActionMode() sees the old values of those fields which is incorrect. This fix could reduce flakiness in the scenario where the IME thread updates after the action mode is created. BUG=592428 ========== to ========== Set fields before calling ActionMode.invalidate() Previously mEditable/mIsPassword/mNeedsPrepare were set after calling invalidate(). This means that SelectionPopupController.onPrepareActionMode() sees the old values of those fields which is incorrect. This fix could reduce flakiness in the scenario where the IME thread updates after the action mode is created. BUG=592428 ==========
The CQ bit was checked by amaralp@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 20001, "attempt_start_ts": 1481941278110680,
"parent_rev": "111abe4ad44be0890d5bc67d9a22cd18dcb82bc6", "commit_rev":
"d27427881507b16a5ddd72a886bd18bb4ac07034"}
Message was sent while issue was closed.
Description was changed from ========== Set fields before calling ActionMode.invalidate() Previously mEditable/mIsPassword/mNeedsPrepare were set after calling invalidate(). This means that SelectionPopupController.onPrepareActionMode() sees the old values of those fields which is incorrect. This fix could reduce flakiness in the scenario where the IME thread updates after the action mode is created. BUG=592428 ========== to ========== Set fields before calling ActionMode.invalidate() Previously mEditable/mIsPassword/mNeedsPrepare were set after calling invalidate(). This means that SelectionPopupController.onPrepareActionMode() sees the old values of those fields which is incorrect. This fix could reduce flakiness in the scenario where the IME thread updates after the action mode is created. BUG=592428 Review-Url: https://codereview.chromium.org/2584773002 ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Description was changed from ========== Set fields before calling ActionMode.invalidate() Previously mEditable/mIsPassword/mNeedsPrepare were set after calling invalidate(). This means that SelectionPopupController.onPrepareActionMode() sees the old values of those fields which is incorrect. This fix could reduce flakiness in the scenario where the IME thread updates after the action mode is created. BUG=592428 Review-Url: https://codereview.chromium.org/2584773002 ========== to ========== Set fields before calling ActionMode.invalidate() Previously mEditable/mIsPassword/mNeedsPrepare were set after calling invalidate(). This means that SelectionPopupController.onPrepareActionMode() sees the old values of those fields which is incorrect. This fix could reduce flakiness in the scenario where the IME thread updates after the action mode is created. BUG=592428 Committed: https://crrev.com/fa17096f47dcc992185f1a09de28034f17d33b5d Cr-Commit-Position: refs/heads/master@{#439291} ==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/fa17096f47dcc992185f1a09de28034f17d33b5d Cr-Commit-Position: refs/heads/master@{#439291} |
