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

Unified Diff: chrome/browser/extensions/extension_sorting.cc

Issue 9956020: Fix Crash in ExtensionSorting::SyncIfNeeded (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_sorting.cc
diff --git a/chrome/browser/extensions/extension_sorting.cc b/chrome/browser/extensions/extension_sorting.cc
index f9340dc7cc37bd1d4b62ad14d5102e8ad6320a34..afd3d7c54554019a873dbe628554dbe690887ead 100644
--- a/chrome/browser/extensions/extension_sorting.cc
+++ b/chrome/browser/extensions/extension_sorting.cc
@@ -505,7 +505,11 @@ void ExtensionSorting::SyncIfNeeded(const std::string& extension_id) {
extension_service_->GetInstalledExtension(extension_id);
if (ext) {
- CHECK(ext->is_app());
+ // It is possible for old extension to have ordinal values, but they
+ // shouldn't so we clear them.
+ if (!ext->is_app())
+ ClearOrdinals(extension_id);
+
extension_service_->SyncExtensionChangeIfNeeded(*ext);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698