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

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

Issue 15817014: remove most uses of raw handle constructors (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: stupid cast needed Created 7 years, 6 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/mksnapshot.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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 token_locations_.Add(handle.location()); 72 token_locations_.Add(handle.location());
73 token_removed_.Add(false); 73 token_removed_.Add(false);
74 return token_locations_.length() - 1; 74 return token_locations_.length() - 1;
75 } 75 }
76 76
77 77
78 void TokenEnumerator::TokenRemovedCallback(v8::Isolate* isolate, 78 void TokenEnumerator::TokenRemovedCallback(v8::Isolate* isolate,
79 v8::Persistent<v8::Value>* handle, 79 v8::Persistent<v8::Value>* handle,
80 void* parameter) { 80 void* parameter) {
81 reinterpret_cast<TokenEnumerator*>(parameter)->TokenRemoved( 81 reinterpret_cast<TokenEnumerator*>(parameter)->TokenRemoved(
82 Utils::OpenHandle(**handle).location()); 82 Utils::OpenPersistent(handle).location());
83 handle->Dispose(isolate); 83 handle->Dispose(isolate);
84 } 84 }
85 85
86 86
87 void TokenEnumerator::TokenRemoved(Object** token_location) { 87 void TokenEnumerator::TokenRemoved(Object** token_location) {
88 for (int i = 0; i < token_locations_.length(); ++i) { 88 for (int i = 0; i < token_locations_.length(); ++i) {
89 if (token_locations_[i] == token_location && !token_removed_[i]) { 89 if (token_locations_[i] == token_location && !token_removed_[i]) {
90 token_removed_[i] = true; 90 token_removed_[i] = true;
91 return; 91 return;
92 } 92 }
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 if (no_symbolized_entries) { 956 if (no_symbolized_entries) {
957 *entry++ = EntryForVMState(sample.state); 957 *entry++ = EntryForVMState(sample.state);
958 } 958 }
959 } 959 }
960 960
961 profiles_->AddPathToCurrentProfiles(entries); 961 profiles_->AddPathToCurrentProfiles(entries);
962 } 962 }
963 963
964 964
965 } } // namespace v8::internal 965 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mksnapshot.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698