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

Unified Diff: extensions/renderer/dispatcher.cc

Issue 2211213002: Revert of [Extensions] Ensure ordering of extension [un]loaded, activated messages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 4 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 | « extensions/browser/renderer_startup_helper.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/dispatcher.cc
diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc
index bfcbcf2b3d2648ba7818c441d5264dbfa57454c3..df6e9cd4aa1ce3853b575e82d99ced795d8c007f 100644
--- a/extensions/renderer/dispatcher.cc
+++ b/extensions/renderer/dispatcher.cc
@@ -996,7 +996,6 @@
const Extension* extension =
RendererExtensionRegistry::Get()->GetByID(extension_id);
if (!extension) {
- NOTREACHED();
// Extension was activated but was never loaded. This probably means that
// the renderer failed to load it (or the browser failed to tell us when it
// did). Failures shouldn't happen, but instead of crashing there (which
@@ -1092,11 +1091,8 @@
// Dispatcher is attached to a RenderThread. Presumably there is a
// mismatch there. In theory one would think it's possible for the
// browser to figure this out itself - but again, cost/benefit.
- if (!extension_registry->Insert(extension)) {
- // TODO(devlin): This may be fixed by crbug.com/528026. Monitor, and
- // consider making this a release CHECK.
- NOTREACHED();
- }
+ if (!extension_registry->Contains(extension->id()))
+ extension_registry->Insert(extension);
}
// Update the available bindings for all contexts. These may have changed if
@@ -1158,12 +1154,8 @@
void Dispatcher::OnUnloaded(const std::string& id) {
// See comment in OnLoaded for why it would be nice, but perhaps incorrect,
// to CHECK here rather than guarding.
- // TODO(devlin): This may be fixed by crbug.com/528026. Monitor, and
- // consider making this a release CHECK.
- if (!RendererExtensionRegistry::Get()->Remove(id)) {
- NOTREACHED();
+ if (!RendererExtensionRegistry::Get()->Remove(id))
return;
- }
active_extension_ids_.erase(id);
« no previous file with comments | « extensions/browser/renderer_startup_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698