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

Side by Side Diff: src/profiler/strings-storage.cc

Issue 2175233003: Replace SmartPointer<T> with unique_ptr<T> (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@smart-array
Patch Set: Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/profiler/strings-storage.h" 5 #include "src/profiler/strings-storage.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "src/base/smart-pointers.h"
10 #include "src/objects-inl.h" 9 #include "src/objects-inl.h"
11 10
12 namespace v8 { 11 namespace v8 {
13 namespace internal { 12 namespace internal {
14 13
15 14
16 bool StringsStorage::StringsMatch(void* key1, void* key2) { 15 bool StringsStorage::StringsMatch(void* key1, void* key2) {
17 return strcmp(reinterpret_cast<char*>(key1), reinterpret_cast<char*>(key2)) == 16 return strcmp(reinterpret_cast<char*>(key1), reinterpret_cast<char*>(key2)) ==
18 0; 17 0;
19 } 18 }
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 116 }
118 return size; 117 return size;
119 } 118 }
120 119
121 base::HashMap::Entry* StringsStorage::GetEntry(const char* str, int len) { 120 base::HashMap::Entry* StringsStorage::GetEntry(const char* str, int len) {
122 uint32_t hash = StringHasher::HashSequentialString(str, len, hash_seed_); 121 uint32_t hash = StringHasher::HashSequentialString(str, len, hash_seed_);
123 return names_.LookupOrInsert(const_cast<char*>(str), hash); 122 return names_.LookupOrInsert(const_cast<char*>(str), hash);
124 } 123 }
125 } // namespace internal 124 } // namespace internal
126 } // namespace v8 125 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698