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

Unified Diff: chrome/renderer/extensions/dispatcher.cc

Issue 12319073: Delete the extensions i18n message map when extension unload is received. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed to i18n_apitest and fixed up misc Created 7 years, 10 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
Index: chrome/renderer/extensions/dispatcher.cc
diff --git a/chrome/renderer/extensions/dispatcher.cc b/chrome/renderer/extensions/dispatcher.cc
index 930cb5d568e4bfc8812c9d484c4820e8c8efeaf5..89bb067067dc1f458f318148c53729e7939323ae 100644
--- a/chrome/renderer/extensions/dispatcher.cc
+++ b/chrome/renderer/extensions/dispatcher.cc
@@ -15,6 +15,7 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_messages.h"
#include "chrome/common/extensions/manifest.h"
+#include "chrome/common/extensions/message_bundle.h"
#include "chrome/common/extensions/permissions/permission_set.h"
#include "chrome/common/url_constants.h"
#include "chrome/common/view_type.h"
@@ -514,6 +515,10 @@ void Dispatcher::OnUnloaded(const std::string& id) {
v8_context_set_.OnExtensionUnloaded(id);
+ // Invalidates the messages map for the extension in case the extension is
+ // reloaded with a new messages map.
+ EraseL10nMessagesMap(id);
+
// We don't do anything with existing platform-app stylesheets. They will
// stay resident, but the URL pattern corresponding to the unloaded
// extension's URL just won't match anything anymore.

Powered by Google App Engine
This is Rietveld 408576698