|
|
Chromium Code Reviews|
Created:
3 years, 10 months ago by Ken Rockot(use gerrit already) Modified:
3 years, 10 months ago Reviewers:
mtomasz CC:
chromium-reviews, davemoore+watch_chromium.org, fukino+watch_chromium.org, oka+watch_chromium.org, oshima+watch_chromium.org, rginda+watch_chromium.org, yamaguchi+watch_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionAvoid re-entrancy in DriveIntegrationService testing factory
This avoids potential re-entrancy in various Drive API integration
tests which was made possible by running the MessageLoop from within
the stack of a KeyedService factory. This behavior can trivially
lead to main-thread tasks re-entering the factory if they try to
access a Profile, as Profile access on Chrome OS lazily invokes this
factory.
With minimal modifications, we avoid the need to wait for any async
work in FakeDriveService and thus avoid the need to run the MessageLoop
within the test service factory.
There's also some minor cleanup here: NULL -> nullptr, and switched to
field initializers where appropriate.
BUG=692682
Review-Url: https://codereview.chromium.org/2695403002
Cr-Commit-Position: refs/heads/master@{#451220}
Committed: https://chromium.googlesource.com/chromium/src/+/fa44a170953dea4680dc68f1eb0e145b97307958
Patch Set 1 : . #Patch Set 2 : . #
Total comments: 1
Dependent Patchsets: Messages
Total messages: 33 (24 generated)
The CQ bit was checked by rockot@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...
Patchset #1 (id:1) has been deleted
The CQ bit was checked by rockot@chromium.org to run a CQ dry run
Patchset #1 (id:20001) has been deleted
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== re-enable prefs service BUG= ========== to ========== Avoid re-entrancy in DriveIntegrationService testing factory This avoids potential re-entrancy in various Drive API integration tests which was made possible by running the MessageLoop from within the stack of the KeyedService factory. This behavior can trivially lead to main-thread tasks re-entering the factory on Profile access. Instead, we now wait until SetUpOnMainThread to populate the fake Drive filesystem entries, because all Profiles (and their associated DriveIntegrationService instances) are fully created by the time SetUpOnMainThread is called, and the entries don't need to be present until this point. There should be no meaningful change in behavior for these tests, but it's now safe for other parts of the browser system to run early tasks which touch the Profile without breaking these tests. BUG=692682 ==========
Description was changed from ========== Avoid re-entrancy in DriveIntegrationService testing factory This avoids potential re-entrancy in various Drive API integration tests which was made possible by running the MessageLoop from within the stack of the KeyedService factory. This behavior can trivially lead to main-thread tasks re-entering the factory on Profile access. Instead, we now wait until SetUpOnMainThread to populate the fake Drive filesystem entries, because all Profiles (and their associated DriveIntegrationService instances) are fully created by the time SetUpOnMainThread is called, and the entries don't need to be present until this point. There should be no meaningful change in behavior for these tests, but it's now safe for other parts of the browser system to run early tasks which touch the Profile without breaking these tests. BUG=692682 ========== to ========== Avoid re-entrancy in DriveIntegrationService testing factory This avoids potential re-entrancy in various Drive API integration tests which was made possible by running the MessageLoop from within the stack of the KeyedService factory. This behavior can trivially lead to main-thread tasks re-entering the factory on Profile access. Instead, we now wait until SetUpOnMainThread to populate the fake Drive filesystem entries, because all Profiles and their associated DriveIntegrationService instances are fully created by the time SetUpOnMainThread is called, and the entries don't need to be present until this point. There should be no meaningful change in behavior for these tests, but it's now safe for other parts of the browser system to run early tasks which touch the Profile without breaking these tests. BUG=692682 ==========
rockot@chromium.org changed reviewers: + mtomasz@chromium.org
PTAL, thanks!
lgtm, but the tests seem to regressed
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by rockot@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...
Description was changed from ========== Avoid re-entrancy in DriveIntegrationService testing factory This avoids potential re-entrancy in various Drive API integration tests which was made possible by running the MessageLoop from within the stack of the KeyedService factory. This behavior can trivially lead to main-thread tasks re-entering the factory on Profile access. Instead, we now wait until SetUpOnMainThread to populate the fake Drive filesystem entries, because all Profiles and their associated DriveIntegrationService instances are fully created by the time SetUpOnMainThread is called, and the entries don't need to be present until this point. There should be no meaningful change in behavior for these tests, but it's now safe for other parts of the browser system to run early tasks which touch the Profile without breaking these tests. BUG=692682 ========== to ========== Avoid re-entrancy in DriveIntegrationService testing factory This avoids potential re-entrancy in various Drive API integration tests which was made possible by running the MessageLoop from within the stack of the KeyedService factory. This behavior can trivially lead to main-thread tasks re-entering the factory on Profile access. With minimal modifications, we avoid the need to wait for any async work in FakeDriveService and thus avoid the need to run the MessageLoop within the test service factory. There's also some minor cleanup here: NULL -> nullptr, and switched to field initializers where appropriate. BUG=692682 ==========
Description was changed from ========== Avoid re-entrancy in DriveIntegrationService testing factory This avoids potential re-entrancy in various Drive API integration tests which was made possible by running the MessageLoop from within the stack of the KeyedService factory. This behavior can trivially lead to main-thread tasks re-entering the factory on Profile access. With minimal modifications, we avoid the need to wait for any async work in FakeDriveService and thus avoid the need to run the MessageLoop within the test service factory. There's also some minor cleanup here: NULL -> nullptr, and switched to field initializers where appropriate. BUG=692682 ========== to ========== Avoid re-entrancy in DriveIntegrationService testing factory This avoids potential re-entrancy in various Drive API integration tests which was made possible by running the MessageLoop from within the stack of the KeyedService factory. This behavior can trivially lead to main-thread tasks re-entering the factory if they try to access a Profile, as Profile access on Chrome OS lazily invokes the factory. With minimal modifications, we avoid the need to wait for any async work in FakeDriveService and thus avoid the need to run the MessageLoop within the test service factory. There's also some minor cleanup here: NULL -> nullptr, and switched to field initializers where appropriate. BUG=692682 ==========
Description was changed from ========== Avoid re-entrancy in DriveIntegrationService testing factory This avoids potential re-entrancy in various Drive API integration tests which was made possible by running the MessageLoop from within the stack of the KeyedService factory. This behavior can trivially lead to main-thread tasks re-entering the factory if they try to access a Profile, as Profile access on Chrome OS lazily invokes the factory. With minimal modifications, we avoid the need to wait for any async work in FakeDriveService and thus avoid the need to run the MessageLoop within the test service factory. There's also some minor cleanup here: NULL -> nullptr, and switched to field initializers where appropriate. BUG=692682 ========== to ========== Avoid re-entrancy in DriveIntegrationService testing factory This avoids potential re-entrancy in various Drive API integration tests which was made possible by running the MessageLoop from within the stack of a KeyedService factory. This behavior can trivially lead to main-thread tasks re-entering the factory if they try to access a Profile, as Profile access on Chrome OS lazily invokes this factory. With minimal modifications, we avoid the need to wait for any async work in FakeDriveService and thus avoid the need to run the MessageLoop within the test service factory. There's also some minor cleanup here: NULL -> nullptr, and switched to field initializers where appropriate. BUG=692682 ==========
Thanks for the review. Since I've completely changed the approach here to something I feel is much less fragile, I'd like to solicit you for one more pass. :)
The CQ bit was checked by rockot@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...
Patchset #2 (id:60001) has been deleted
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2695403002/diff/80001/chrome/browser/chromeos... File chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc (left): https://codereview.chromium.org/2695403002/diff/80001/chrome/browser/chromeos... chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc:214: if (error != google_apis::HTTP_CREATED) We're losing all these error checks, right? This sounds like unnecessary regression. Why didn't your previous approach work?
On Feb 16, 2017 6:53 PM, <mtomasz@chromium.org> wrote: https://codereview.chromium.org/2695403002/diff/80001/ chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc File chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc (left): https://codereview.chromium.org/2695403002/diff/80001/ chrome/browser/chromeos/file_manager/external_filesystem_ apitest.cc#oldcode214 chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc:214: if (error != google_apis::HTTP_CREATED) We're losing all these error checks, right? This sounds like unnecessary regression. Why didn't your previous approach work? Work can be done in the background by component extension background pages and some tests rely on it being affected by the filesystem state. The error checks are pointless as this is a fake object and the calls can never fail. https://codereview.chromium.org/2695403002/ -- You received this message because you are subscribed to the Google Groups "Chromium-reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
sgtm. lgtm, thanks for fixing!
sgtm. lgtm, thanks for fixing!
The CQ bit was checked by rockot@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": 80001, "attempt_start_ts": 1487300809039580,
"parent_rev": "ec269885f32e22ded6c3d0531038a18782e5c438", "commit_rev":
"fa44a170953dea4680dc68f1eb0e145b97307958"}
Message was sent while issue was closed.
Description was changed from ========== Avoid re-entrancy in DriveIntegrationService testing factory This avoids potential re-entrancy in various Drive API integration tests which was made possible by running the MessageLoop from within the stack of a KeyedService factory. This behavior can trivially lead to main-thread tasks re-entering the factory if they try to access a Profile, as Profile access on Chrome OS lazily invokes this factory. With minimal modifications, we avoid the need to wait for any async work in FakeDriveService and thus avoid the need to run the MessageLoop within the test service factory. There's also some minor cleanup here: NULL -> nullptr, and switched to field initializers where appropriate. BUG=692682 ========== to ========== Avoid re-entrancy in DriveIntegrationService testing factory This avoids potential re-entrancy in various Drive API integration tests which was made possible by running the MessageLoop from within the stack of a KeyedService factory. This behavior can trivially lead to main-thread tasks re-entering the factory if they try to access a Profile, as Profile access on Chrome OS lazily invokes this factory. With minimal modifications, we avoid the need to wait for any async work in FakeDriveService and thus avoid the need to run the MessageLoop within the test service factory. There's also some minor cleanup here: NULL -> nullptr, and switched to field initializers where appropriate. BUG=692682 Review-Url: https://codereview.chromium.org/2695403002 Cr-Commit-Position: refs/heads/master@{#451220} Committed: https://chromium.googlesource.com/chromium/src/+/fa44a170953dea4680dc68f1eb0e... ==========
Message was sent while issue was closed.
Committed patchset #2 (id:80001) as https://chromium.googlesource.com/chromium/src/+/fa44a170953dea4680dc68f1eb0e... |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
