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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/RetainedDOMInfo.cpp

Issue 1839003002: WTF: De-specialize PtrHash<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove extra equal() definitions. 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/api/LineLayoutItem.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 ASSERT(other); 66 ASSERT(other);
67 if (other == this) 67 if (other == this)
68 return true; 68 return true;
69 if (strcmp(GetLabel(), other->GetLabel())) 69 if (strcmp(GetLabel(), other->GetLabel()))
70 return false; 70 return false;
71 return static_cast<blink::RetainedObjectInfo*>(other)->GetEquivalenceClass() == this->GetEquivalenceClass(); 71 return static_cast<blink::RetainedObjectInfo*>(other)->GetEquivalenceClass() == this->GetEquivalenceClass();
72 } 72 }
73 73
74 intptr_t RetainedDOMInfo::GetHash() 74 intptr_t RetainedDOMInfo::GetHash()
75 { 75 {
76 return PtrHash<void*>::hash(m_root); 76 return PtrHash<void>::hash(m_root);
77 } 77 }
78 78
79 const char* RetainedDOMInfo::GetGroupLabel() 79 const char* RetainedDOMInfo::GetGroupLabel()
80 { 80 {
81 return m_root->inDocument() ? "(Document DOM trees)" : "(Detached DOM trees) "; 81 return m_root->inDocument() ? "(Document DOM trees)" : "(Detached DOM trees) ";
82 } 82 }
83 83
84 const char* RetainedDOMInfo::GetLabel() 84 const char* RetainedDOMInfo::GetLabel()
85 { 85 {
86 return m_root->inDocument() ? "Document DOM tree" : "Detached DOM tree"; 86 return m_root->inDocument() ? "Document DOM tree" : "Detached DOM tree";
(...skipping 28 matching lines...) Expand all
115 delete this; 115 delete this;
116 } 116 }
117 117
118 bool ActiveDOMObjectsInfo::IsEquivalent(v8::RetainedObjectInfo* other) 118 bool ActiveDOMObjectsInfo::IsEquivalent(v8::RetainedObjectInfo* other)
119 { 119 {
120 return this == other; 120 return this == other;
121 } 121 }
122 122
123 intptr_t ActiveDOMObjectsInfo::GetHash() 123 intptr_t ActiveDOMObjectsInfo::GetHash()
124 { 124 {
125 return PtrHash<void*>::hash(this); 125 return PtrHash<void>::hash(this);
126 } 126 }
127 127
128 const char* ActiveDOMObjectsInfo::GetGroupLabel() 128 const char* ActiveDOMObjectsInfo::GetGroupLabel()
129 { 129 {
130 return "(Pending activities group)"; 130 return "(Pending activities group)";
131 } 131 }
132 132
133 const char* ActiveDOMObjectsInfo::GetLabel() 133 const char* ActiveDOMObjectsInfo::GetLabel()
134 { 134 {
135 return "Pending activities"; 135 return "Pending activities";
136 } 136 }
137 137
138 intptr_t ActiveDOMObjectsInfo::GetElementCount() 138 intptr_t ActiveDOMObjectsInfo::GetElementCount()
139 { 139 {
140 return m_numberOfObjectsWithPendingActivity; 140 return m_numberOfObjectsWithPendingActivity;
141 } 141 }
142 142
143 intptr_t ActiveDOMObjectsInfo::GetEquivalenceClass() 143 intptr_t ActiveDOMObjectsInfo::GetEquivalenceClass()
144 { 144 {
145 return reinterpret_cast<intptr_t>(this); 145 return reinterpret_cast<intptr_t>(this);
146 } 146 }
147 147
148 } // namespace blink 148 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/api/LineLayoutItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698