Index: chrome/renderer/extensions/dispatcher.cc |
diff --git a/chrome/renderer/extensions/dispatcher.cc b/chrome/renderer/extensions/dispatcher.cc |
index 19c4488e6494a2a991a3982a665c19b697ee950e..887a26df22a8931c14243bb13e37ebe5eeeae364 100644 |
--- a/chrome/renderer/extensions/dispatcher.cc |
+++ b/chrome/renderer/extensions/dispatcher.cc |
@@ -18,6 +18,7 @@ |
#include "chrome/common/extensions/extension_messages.h" |
#include "chrome/common/extensions/features/feature.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" |
@@ -579,6 +580,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. |