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

Side by Side Diff: src/debug.h

Issue 9190001: Backport @10366 to 3.6 Base URL: http://v8.googlecode.com/svn/branches/3.6/
Patch Set: '' Created 8 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 void Add(Handle<Script> script); 171 void Add(Handle<Script> script);
172 172
173 // Return the scripts in the cache. 173 // Return the scripts in the cache.
174 Handle<FixedArray> GetScripts(); 174 Handle<FixedArray> GetScripts();
175 175
176 // Generate debugger events for collected scripts. 176 // Generate debugger events for collected scripts.
177 void ProcessCollectedScripts(); 177 void ProcessCollectedScripts();
178 178
179 private: 179 private:
180 // Calculate the hash value from the key (script id). 180 // Calculate the hash value from the key (script id).
181 static uint32_t Hash(int key) { return ComputeIntegerHash(key); } 181 static uint32_t Hash(int key) {
182 return ComputeIntegerHash(key, v8::internal::kZeroHashSeed);
183 }
182 184
183 // Scripts match if their keys (script id) match. 185 // Scripts match if their keys (script id) match.
184 static bool ScriptMatch(void* key1, void* key2) { return key1 == key2; } 186 static bool ScriptMatch(void* key1, void* key2) { return key1 == key2; }
185 187
186 // Clear the cache releasing all the weak handles. 188 // Clear the cache releasing all the weak handles.
187 void Clear(); 189 void Clear();
188 190
189 // Weak handle callback for scripts in the cache. 191 // Weak handle callback for scripts in the cache.
190 static void HandleWeakScript(v8::Persistent<v8::Value> obj, void* data); 192 static void HandleWeakScript(v8::Persistent<v8::Value> obj, void* data);
191 193
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 1058
1057 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); 1059 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread);
1058 }; 1060 };
1059 1061
1060 1062
1061 } } // namespace v8::internal 1063 } } // namespace v8::internal
1062 1064
1063 #endif // ENABLE_DEBUGGER_SUPPORT 1065 #endif // ENABLE_DEBUGGER_SUPPORT
1064 1066
1065 #endif // V8_DEBUG_H_ 1067 #endif // V8_DEBUG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698