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

Issue 2520833003: Create ExtensionSystemImpl::quota_service_ before loading any extension (Closed)

Created:
4 years, 1 month ago by lazyboy
Modified:
4 years ago
Reviewers:
Devlin
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Create ExtensionSystemImpl::quota_service_ before loading any extension There is a possibility that during Init(), ExtensionFunctionDispatcher tries to access |quota_service_|. This can happen in chromeos as the bug suggests: ExtensionService::Init() loads component extensions and then non-component extensions. If one of those non-component extensions (easy to repro with --load-extension flag) is showing a modal error dialog via ReportExtensionLoadError, extension APIs from the component extension can arrive in ExtensionFunctionDispatcher while the modal dialog is being shown. This can lead to accessing ExtensionSystemImpl::quota_service_ before it is initialized. This CL avoid that by initializing quota_service_ before loading any extension. BUG=642941 Committed: https://crrev.com/a885afcca33e88c96d4070dc885f26315bdd4c2a Cr-Commit-Position: refs/heads/master@{#434009}

Patch Set 1 #

Patch Set 2 : ok #

Total comments: 2

Patch Set 3 : move QuotaService init before loading any extension #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -2 lines) Patch
M chrome/browser/extensions/extension_system_impl.cc View 1 2 2 chunks +4 lines, -2 lines 0 comments Download

Messages

Total messages: 21 (14 generated)
lazyboy
I spent few hours trying to write a test but couldn't find a way that ...
4 years, 1 month ago (2016-11-22 04:36:31 UTC) #2
Devlin
https://codereview.chromium.org/2520833003/diff/20001/chrome/browser/extensions/extension_system_impl.cc File chrome/browser/extensions/extension_system_impl.cc (right): https://codereview.chromium.org/2520833003/diff/20001/chrome/browser/extensions/extension_system_impl.cc#newcode278 chrome/browser/extensions/extension_system_impl.cc:278: // ExtensionService::Init() might finish loading a component extension before ...
4 years ago (2016-11-22 16:02:20 UTC) #7
lazyboy
https://codereview.chromium.org/2520833003/diff/20001/chrome/browser/extensions/extension_system_impl.cc File chrome/browser/extensions/extension_system_impl.cc (right): https://codereview.chromium.org/2520833003/diff/20001/chrome/browser/extensions/extension_system_impl.cc#newcode278 chrome/browser/extensions/extension_system_impl.cc:278: // ExtensionService::Init() might finish loading a component extension before ...
4 years ago (2016-11-22 19:33:30 UTC) #9
Devlin
lgtm
4 years ago (2016-11-22 19:40:42 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2520833003/40001
4 years ago (2016-11-22 22:23:41 UTC) #16
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years ago (2016-11-22 22:44:09 UTC) #19
commit-bot: I haz the power
4 years ago (2016-11-22 22:46:37 UTC) #21
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/a885afcca33e88c96d4070dc885f26315bdd4c2a
Cr-Commit-Position: refs/heads/master@{#434009}

Powered by Google App Engine
This is Rietveld 408576698