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

Unified Diff: extensions/renderer/module_system_test.cc

Issue 1880473003: Make ModuleSystem have a const view of ResourceBundleSourceMap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile Created 4 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_test.cc
diff --git a/extensions/renderer/module_system_test.cc b/extensions/renderer/module_system_test.cc
index 06a4d5590460f24d3ec457e47dbc07aa5772bf63..dcc37106d7a3fc0dbfc26e3a6d8c9e36aedb4d67 100644
--- a/extensions/renderer/module_system_test.cc
+++ b/extensions/renderer/module_system_test.cc
@@ -105,13 +105,14 @@ class ModuleSystemTestEnvironment::StringSourceMap
~StringSourceMap() override {}
v8::Local<v8::Value> GetSource(v8::Isolate* isolate,
- const std::string& name) override {
+ const std::string& name) const override {
if (source_map_.count(name) == 0)
Devlin 2016/04/12 17:01:25 Unrelated to this patch, but this is a double look
lazyboy 2016/04/12 17:29:28 Good catch, thank you. Done.
return v8::Undefined(isolate);
- return v8::String::NewFromUtf8(isolate, source_map_[name].c_str());
+ return v8::String::NewFromUtf8(isolate,
+ source_map_.find(name)->second.c_str());
}
- bool Contains(const std::string& name) override {
+ bool Contains(const std::string& name) const override {
return source_map_.count(name);
}

Powered by Google App Engine
This is Rietveld 408576698