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

Side by Side Diff: src/profile-generator.cc

Issue 12254007: Make the Isolate parameter mandatory for internal HandleScopes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased 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/objects-printer.cc ('k') | src/runtime.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 2691 matching lines...) Expand 10 before | Expand all | Expand 10 after
2702 int count() { return objects_.length(); } 2702 int count() { return objects_.length(); }
2703 Handle<JSGlobalObject>& at(int i) { return objects_[i]; } 2703 Handle<JSGlobalObject>& at(int i) { return objects_[i]; }
2704 2704
2705 private: 2705 private:
2706 List<Handle<JSGlobalObject> > objects_; 2706 List<Handle<JSGlobalObject> > objects_;
2707 }; 2707 };
2708 2708
2709 2709
2710 // Modifies heap. Must not be run during heap traversal. 2710 // Modifies heap. Must not be run during heap traversal.
2711 void V8HeapExplorer::TagGlobalObjects() { 2711 void V8HeapExplorer::TagGlobalObjects() {
2712 HandleScope scope;
2713 Isolate* isolate = Isolate::Current(); 2712 Isolate* isolate = Isolate::Current();
2713 HandleScope scope(isolate);
2714 GlobalObjectsEnumerator enumerator; 2714 GlobalObjectsEnumerator enumerator;
2715 isolate->global_handles()->IterateAllRoots(&enumerator); 2715 isolate->global_handles()->IterateAllRoots(&enumerator);
2716 const char** urls = NewArray<const char*>(enumerator.count()); 2716 const char** urls = NewArray<const char*>(enumerator.count());
2717 for (int i = 0, l = enumerator.count(); i < l; ++i) { 2717 for (int i = 0, l = enumerator.count(); i < l; ++i) {
2718 if (global_object_name_resolver_) { 2718 if (global_object_name_resolver_) {
2719 HandleScope scope; 2719 HandleScope scope(isolate);
2720 Handle<JSGlobalObject> global_obj = enumerator.at(i); 2720 Handle<JSGlobalObject> global_obj = enumerator.at(i);
2721 urls[i] = global_object_name_resolver_->GetName( 2721 urls[i] = global_object_name_resolver_->GetName(
2722 Utils::ToLocal(Handle<JSObject>::cast(global_obj))); 2722 Utils::ToLocal(Handle<JSObject>::cast(global_obj)));
2723 } else { 2723 } else {
2724 urls[i] = NULL; 2724 urls[i] = NULL;
2725 } 2725 }
2726 } 2726 }
2727 2727
2728 AssertNoAllocation no_allocation; 2728 AssertNoAllocation no_allocation;
2729 for (int i = 0, l = enumerator.count(); i < l; ++i) { 2729 for (int i = 0, l = enumerator.count(); i < l; ++i) {
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
3589 3589
3590 3590
3591 void HeapSnapshotJSONSerializer::SortHashMap( 3591 void HeapSnapshotJSONSerializer::SortHashMap(
3592 HashMap* map, List<HashMap::Entry*>* sorted_entries) { 3592 HashMap* map, List<HashMap::Entry*>* sorted_entries) {
3593 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p)) 3593 for (HashMap::Entry* p = map->Start(); p != NULL; p = map->Next(p))
3594 sorted_entries->Add(p); 3594 sorted_entries->Add(p);
3595 sorted_entries->Sort(SortUsingEntryValue); 3595 sorted_entries->Sort(SortUsingEntryValue);
3596 } 3596 }
3597 3597
3598 } } // namespace v8::internal 3598 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-printer.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698