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

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

Issue 3011009: Add a check that weak object handle is not in NEAR_DEATH state after weak callback invocation. (Closed)
Patch Set: Addressing Mads' comments Created 10 years, 5 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
« no previous file with comments | « src/global-handles.cc ('k') | test/cctest/test-api.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 token_locations_.Add(handle.location()); 67 token_locations_.Add(handle.location());
68 token_removed_.Add(false); 68 token_removed_.Add(false);
69 return token_locations_.length() - 1; 69 return token_locations_.length() - 1;
70 } 70 }
71 71
72 72
73 void TokenEnumerator::TokenRemovedCallback(v8::Persistent<v8::Value> handle, 73 void TokenEnumerator::TokenRemovedCallback(v8::Persistent<v8::Value> handle,
74 void* parameter) { 74 void* parameter) {
75 reinterpret_cast<TokenEnumerator*>(parameter)->TokenRemoved( 75 reinterpret_cast<TokenEnumerator*>(parameter)->TokenRemoved(
76 Utils::OpenHandle(*handle).location()); 76 Utils::OpenHandle(*handle).location());
77 handle.Dispose();
77 } 78 }
78 79
79 80
80 void TokenEnumerator::TokenRemoved(Object** token_location) { 81 void TokenEnumerator::TokenRemoved(Object** token_location) {
81 for (int i = 0; i < token_locations_.length(); ++i) { 82 for (int i = 0; i < token_locations_.length(); ++i) {
82 if (token_locations_[i] == token_location && !token_removed_[i]) { 83 if (token_locations_[i] == token_location && !token_removed_[i]) {
83 token_removed_[i] = true; 84 token_removed_[i] = true;
84 return; 85 return;
85 } 86 }
86 } 87 }
(...skipping 1733 matching lines...) Expand 10 before | Expand all | Expand 10 after
1820 HeapEntry* entry = added_entries[i]; 1821 HeapEntry* entry = added_entries[i];
1821 if (entry->painted_reachable()) 1822 if (entry->painted_reachable())
1822 diff->AddAddedEntry(entry); 1823 diff->AddAddedEntry(entry);
1823 } 1824 }
1824 return diff; 1825 return diff;
1825 } 1826 }
1826 1827
1827 } } // namespace v8::internal 1828 } } // namespace v8::internal
1828 1829
1829 #endif // ENABLE_LOGGING_AND_PROFILING 1830 #endif // ENABLE_LOGGING_AND_PROFILING
OLDNEW
« no previous file with comments | « src/global-handles.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698