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

Unified Diff: src/bootstrapper.cc

Issue 1074943002: Split TemplateHashMapImpl::Lookup into two methods (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix arm (and ppc) builds 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: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 2d9a13f19a6bc25a74d301c9e8ce07a58a9fc79e..982e35ab475ab20c550ee48b73a354ab7c28fc83 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -2514,7 +2514,7 @@ Genesis::ExtensionStates::ExtensionStates() : map_(HashMap::PointersMatch, 8) {}
Genesis::ExtensionTraversalState Genesis::ExtensionStates::get_state(
RegisteredExtension* extension) {
- i::HashMap::Entry* entry = map_.Lookup(extension, Hash(extension), false);
+ i::HashMap::Entry* entry = map_.Lookup(extension, Hash(extension));
if (entry == NULL) {
return UNVISITED;
}
@@ -2524,7 +2524,7 @@ Genesis::ExtensionTraversalState Genesis::ExtensionStates::get_state(
void Genesis::ExtensionStates::set_state(RegisteredExtension* extension,
ExtensionTraversalState state) {
- map_.Lookup(extension, Hash(extension), true)->value =
+ map_.LookupOrInsert(extension, Hash(extension))->value =
reinterpret_cast<void*>(static_cast<intptr_t>(state));
}
« no previous file with comments | « src/ast-value-factory.cc ('k') | src/compiler/state-values-utils.cc » ('j') | src/hashmap.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698