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

Side by Side Diff: src/debug.cc

Issue 555072: Merge ObjectIterator::has_next and ObjectIterator::next methods.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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
« no previous file with comments | « no previous file | src/heap.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 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 1677 matching lines...) Expand 10 before | Expand all | Expand 10 after
1688 // scripts which is no longer referenced. 1688 // scripts which is no longer referenced.
1689 Heap::CollectAllGarbage(false); 1689 Heap::CollectAllGarbage(false);
1690 Heap::CollectAllGarbage(false); 1690 Heap::CollectAllGarbage(false);
1691 1691
1692 ASSERT(script_cache_ == NULL); 1692 ASSERT(script_cache_ == NULL);
1693 script_cache_ = new ScriptCache(); 1693 script_cache_ = new ScriptCache();
1694 1694
1695 // Scan heap for Script objects. 1695 // Scan heap for Script objects.
1696 int count = 0; 1696 int count = 0;
1697 HeapIterator iterator; 1697 HeapIterator iterator;
1698 while (iterator.has_next()) { 1698 for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) {
1699 HeapObject* obj = iterator.next();
1700 ASSERT(obj != NULL);
1701 if (obj->IsScript() && Script::cast(obj)->HasValidSource()) { 1699 if (obj->IsScript() && Script::cast(obj)->HasValidSource()) {
1702 script_cache_->Add(Handle<Script>(Script::cast(obj))); 1700 script_cache_->Add(Handle<Script>(Script::cast(obj)));
1703 count++; 1701 count++;
1704 } 1702 }
1705 } 1703 }
1706 } 1704 }
1707 1705
1708 1706
1709 void Debug::DestroyScriptCache() { 1707 void Debug::DestroyScriptCache() {
1710 // Get rid of the script cache if it was created. 1708 // Get rid of the script cache if it was created.
(...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after
2807 { 2805 {
2808 Locker locker; 2806 Locker locker;
2809 Debugger::CallMessageDispatchHandler(); 2807 Debugger::CallMessageDispatchHandler();
2810 } 2808 }
2811 } 2809 }
2812 } 2810 }
2813 2811
2814 #endif // ENABLE_DEBUGGER_SUPPORT 2812 #endif // ENABLE_DEBUGGER_SUPPORT
2815 2813
2816 } } // namespace v8::internal 2814 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698