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

Side by Side Diff: src/debug.h

Issue 12033011: Add Isolate parameter to Persistent class. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added explicit Created 7 years, 10 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
« no previous file with comments | « src/d8.cc ('k') | src/debug.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 return ComputeIntegerHash(key, v8::internal::kZeroHashSeed); 182 return ComputeIntegerHash(key, v8::internal::kZeroHashSeed);
183 } 183 }
184 184
185 // Scripts match if their keys (script id) match. 185 // Scripts match if their keys (script id) match.
186 static bool ScriptMatch(void* key1, void* key2) { return key1 == key2; } 186 static bool ScriptMatch(void* key1, void* key2) { return key1 == key2; }
187 187
188 // Clear the cache releasing all the weak handles. 188 // Clear the cache releasing all the weak handles.
189 void Clear(); 189 void Clear();
190 190
191 // Weak handle callback for scripts in the cache. 191 // Weak handle callback for scripts in the cache.
192 static void HandleWeakScript(v8::Persistent<v8::Value> obj, void* data); 192 static void HandleWeakScript(v8::Isolate* isolate,
193 v8::Persistent<v8::Value> obj,
194 void* data);
193 195
194 // List used during GC to temporarily store id's of collected scripts. 196 // List used during GC to temporarily store id's of collected scripts.
195 List<int> collected_scripts_; 197 List<int> collected_scripts_;
196 }; 198 };
197 199
198 200
199 // Linked list holding debug info objects. The debug info objects are kept as 201 // Linked list holding debug info objects. The debug info objects are kept as
200 // weak handles to avoid a debug info object to keep a function alive. 202 // weak handles to avoid a debug info object to keep a function alive.
201 class DebugInfoListNode { 203 class DebugInfoListNode {
202 public: 204 public:
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 // Access to the debug break in debug break slot code. 379 // Access to the debug break in debug break slot code.
378 Code* debug_break_slot() { return debug_break_slot_; } 380 Code* debug_break_slot() { return debug_break_slot_; }
379 Code** debug_break_slot_address() { 381 Code** debug_break_slot_address() {
380 return &debug_break_slot_; 382 return &debug_break_slot_;
381 } 383 }
382 384
383 static const int kEstimatedNofDebugInfoEntries = 16; 385 static const int kEstimatedNofDebugInfoEntries = 16;
384 static const int kEstimatedNofBreakPointsInFunction = 16; 386 static const int kEstimatedNofBreakPointsInFunction = 16;
385 387
386 // Passed to MakeWeak. 388 // Passed to MakeWeak.
387 static void HandleWeakDebugInfo(v8::Persistent<v8::Value> obj, void* data); 389 static void HandleWeakDebugInfo(v8::Isolate* isolate,
390 v8::Persistent<v8::Value> obj,
391 void* data);
388 392
389 friend class Debugger; 393 friend class Debugger;
390 friend Handle<FixedArray> GetDebuggedFunctions(); // In test-debug.cc 394 friend Handle<FixedArray> GetDebuggedFunctions(); // In test-debug.cc
391 friend void CheckDebuggerUnloaded(bool check_functions); // In test-debug.cc 395 friend void CheckDebuggerUnloaded(bool check_functions); // In test-debug.cc
392 396
393 // Threading support. 397 // Threading support.
394 char* ArchiveDebug(char* to); 398 char* ArchiveDebug(char* to);
395 char* RestoreDebug(char* from); 399 char* RestoreDebug(char* from);
396 static int ArchiveSpacePerThread(); 400 static int ArchiveSpacePerThread();
397 void FreeThreadResources() { } 401 void FreeThreadResources() { }
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 1047
1044 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); 1048 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread);
1045 }; 1049 };
1046 1050
1047 1051
1048 } } // namespace v8::internal 1052 } } // namespace v8::internal
1049 1053
1050 #endif // ENABLE_DEBUGGER_SUPPORT 1054 #endif // ENABLE_DEBUGGER_SUPPORT
1051 1055
1052 #endif // V8_DEBUG_H_ 1056 #endif // V8_DEBUG_H_
OLDNEW
« no previous file with comments | « src/d8.cc ('k') | src/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698