|
|
Chromium Code Reviews|
Created:
3 years, 11 months ago by leonhsl(Using Gerrit) Modified:
3 years, 11 months ago CC:
chromium-reviews, darin-cc_chromium.org, jam, mlamouri+watch-screen-orientation_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
Description[ScreenOrientation] Fix a possible crash point in ScreenOrientationProvider.
ScreenOrientation does not need to maintain pending lock request,
just let ScreenOrientationProvider do that.
BUG=678545
Review-Url: https://codereview.chromium.org/2630323002
Cr-Commit-Position: refs/heads/master@{#445321}
Committed: https://chromium.googlesource.com/chromium/src/+/9aad73908ef510572cfe4504c36c2ece69438d1e
Patch Set 1 #
Total comments: 1
Patch Set 2 : ScreenOrientation does not maintain pending lock request #
Total comments: 2
Messages
Total messages: 49 (32 generated)
The CQ bit was checked by leon.han@intel.com 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...
leon.han@intel.com changed reviewers: + blundell@chromium.org, mlamouri@chromium.org
I found this while investigating for IPCs refactor of screen_orientation, PTAL, Thanks. https://codereview.chromium.org/2630323002/diff/1/content/public/browser/scre... File content/public/browser/screen_orientation_provider.cc (left): https://codereview.chromium.org/2630323002/diff/1/content/public/browser/scre... content/public/browser/screen_orientation_provider.cc:32: DCHECK(on_result_callback_.is_null()); Although ScreenOrientation have cancelled the pending request, it can't clear |on_result_callback_| here, |on_result_callback_| could still be non-null, we should just reset all the pending status.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Thanks for noticing this! Do you think it would be more clear to add a ScreenOrientationProvider::CancelLockRequest() method, which just calls its callback (if it has one) with CANCELED and then clears its state? Then ScreenOrientation would call that instead of directly calling its own NotifyLockOrientation() method, and we could maintain the DCHECKs in the top of ScreenOrientationProvider::LockOrientation().
The CQ bit was checked by leon.han@intel.com 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...
After further investigation I think we do not need to maintain the pending request in both ScreenOrientation and ScreenOrientationProvider, we could just put all those pending/cancel logic into ScreenOrientationProvider :) Uploaded ps#2, PTAnL, Thanks.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm, thanks!
Friendly ping mlamouri@ for OWNER review, Thanks.
lgtm but can you add tests? :)
On 2017/01/18 10:25:25, mlamouri wrote: > lgtm but can you add tests? :) No problem, I'll try to figure out one test for this :)
Description was changed from ========== [ScreenOrientation] Fix a possible crash point in ScreenOrientationProvider. BUG= ========== to ========== [ScreenOrientation] Fix a possible crash point in ScreenOrientationProvider. BUG=678545 ==========
The CQ bit was checked by leon.han@intel.com 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: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm6...) android_cronet on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_cron...) android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_...) cast_shell_android on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_a...)
Description was changed from ========== [ScreenOrientation] Fix a possible crash point in ScreenOrientationProvider. BUG=678545 ========== to ========== [ScreenOrientation] Merge ScreenOrientation into ScreenOrientationProvider. ScreenOrientation has no actual functionality other than forwarding lock/unlock requests to ScreenOrientationProvider, so this CL merges it into ScreenOrientationProvider and removes it. BUG=678545 ==========
The CQ bit was checked by leon.han@intel.com 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...
Patchset #3 (id:40001) has been deleted
Uploaded ps#3 to merge ScreenOrientation into ScreenOrientationProvider, PTAnL firstly while I'm considering how to add some tests, Thanks.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_comp...)
Patchset #4 (id:80001) has been deleted
The CQ bit was checked by leon.han@intel.com 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...
Patchset #3 (id:60001) has been deleted
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
On 2017/01/22 at 09:35:34, leon.han wrote: > Uploaded ps#3 to merge ScreenOrientation into ScreenOrientationProvider, PTAnL firstly while I'm considering how to add some tests, Thanks. I would recommend to upload this in another CL instead. Uploading a largely different CL after it was reviewed and approved isn't a good idea in general because reviewer might easily forget to look at it. I clicked out of curiosity to check the tests ;)
On 2017/01/23 01:14:20, mlamouri wrote: > On 2017/01/22 at 09:35:34, leon.han wrote: > > Uploaded ps#3 to merge ScreenOrientation into ScreenOrientationProvider, PTAnL > firstly while I'm considering how to add some tests, Thanks. > > I would recommend to upload this in another CL instead. Uploading a largely > different CL after it was reviewed and approved isn't a good idea in general > because reviewer might easily forget to look at it. I clicked out of curiosity > to check the tests ;) Oh, I see, I'll separate ps#3 to another CL, and could we just land ps#2 here and add tests in that new CL? Because some codes are supposed to be deleted in that new CL.
On 2017/01/23 at 02:03:40, leon.han wrote: > On 2017/01/23 01:14:20, mlamouri wrote: > > On 2017/01/22 at 09:35:34, leon.han wrote: > > > Uploaded ps#3 to merge ScreenOrientation into ScreenOrientationProvider, PTAnL > > firstly while I'm considering how to add some tests, Thanks. > > > > I would recommend to upload this in another CL instead. Uploading a largely > > different CL after it was reviewed and approved isn't a good idea in general > > because reviewer might easily forget to look at it. I clicked out of curiosity > > to check the tests ;) > > Oh, I see, I'll separate ps#3 to another CL, and could we just land ps#2 here and add tests in that new CL? Because some codes are supposed to be deleted in that new CL. Sure.
Description was changed from ========== [ScreenOrientation] Merge ScreenOrientation into ScreenOrientationProvider. ScreenOrientation has no actual functionality other than forwarding lock/unlock requests to ScreenOrientationProvider, so this CL merges it into ScreenOrientationProvider and removes it. BUG=678545 ========== to ========== [ScreenOrientation] Fix a possible crash point in ScreenOrientationProvider. ScreenOrientation does not need to maintain pending lock request, just let ScreenOrientationProvider do that. BUG=678545 ==========
Patchset #3 (id:100001) has been deleted
leon.han@intel.com changed reviewers: + kinuko@chromium.org
+kinuko@, would you PTAL for OWNER review of content/public/browser/? Thanks.
lgtm
The CQ bit was checked by leon.han@intel.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2630323002/diff/20001/content/public/browser/... File content/public/browser/screen_orientation_provider.cc (right): https://codereview.chromium.org/2630323002/diff/20001/content/public/browser/... content/public/browser/screen_orientation_provider.cc:111: } nit: no need of block for one-line body
https://codereview.chromium.org/2630323002/diff/20001/content/public/browser/... File content/public/browser/screen_orientation_provider.cc (right): https://codereview.chromium.org/2630323002/diff/20001/content/public/browser/... content/public/browser/screen_orientation_provider.cc:111: } On 2017/01/23 02:39:50, kinuko wrote: > nit: no need of block for one-line body Got it, as I've sent this CL to CQ now so I will address this in the follow-up CL which will also change this file :) Thanks!
CQ is committing da patch.
Bot data: {"patchset_id": 20001, "attempt_start_ts": 1485139163397460,
"parent_rev": "72b3d43cd95b330a4056e06371399af57b07bacd", "commit_rev":
"9aad73908ef510572cfe4504c36c2ece69438d1e"}
Message was sent while issue was closed.
Description was changed from ========== [ScreenOrientation] Fix a possible crash point in ScreenOrientationProvider. ScreenOrientation does not need to maintain pending lock request, just let ScreenOrientationProvider do that. BUG=678545 ========== to ========== [ScreenOrientation] Fix a possible crash point in ScreenOrientationProvider. ScreenOrientation does not need to maintain pending lock request, just let ScreenOrientationProvider do that. BUG=678545 Review-Url: https://codereview.chromium.org/2630323002 Cr-Commit-Position: refs/heads/master@{#445321} Committed: https://chromium.googlesource.com/chromium/src/+/9aad73908ef510572cfe4504c36c... ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/9aad73908ef510572cfe4504c36c... |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
