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

Unified Diff: extensions/renderer/module_system.cc

Issue 1074273002: Move the event attach/detach logic on unload from event.js to (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix memory leak Created 5 years, 8 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: extensions/renderer/module_system.cc
diff --git a/extensions/renderer/module_system.cc b/extensions/renderer/module_system.cc
index 6194b8ed4c4be059a5f298055d91df3b00bc4cab..f7b2ac7e6a266ebe017addbf2af5836025afcbde 100644
--- a/extensions/renderer/module_system.cc
+++ b/extensions/renderer/module_system.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/command_line.h"
+#include "base/logging.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
@@ -151,12 +152,10 @@ ModuleSystem::ModuleSystem(ScriptContext* context, SourceMap* source_map)
}
}
-ModuleSystem::~ModuleSystem() { Invalidate(); }
+ModuleSystem::~ModuleSystem() {
+}
void ModuleSystem::Invalidate() {
- if (!is_valid())
- return;
-
// Clear the module system properties from the global context. It's polite,
// and we use this as a signal in lazy handlers that we no longer exist.
{

Powered by Google App Engine
This is Rietveld 408576698