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

Side by Side Diff: src/global-handles.cc

Issue 25250002: Split extra checks into extra checks and handle zapping (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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/api.cc ('k') | src/handles.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 Internals::kNodeStateMask); 72 Internals::kNodeStateMask);
73 STATIC_ASSERT(WEAK == Internals::kNodeStateIsWeakValue); 73 STATIC_ASSERT(WEAK == Internals::kNodeStateIsWeakValue);
74 STATIC_ASSERT(PENDING == Internals::kNodeStateIsPendingValue); 74 STATIC_ASSERT(PENDING == Internals::kNodeStateIsPendingValue);
75 STATIC_ASSERT(NEAR_DEATH == Internals::kNodeStateIsNearDeathValue); 75 STATIC_ASSERT(NEAR_DEATH == Internals::kNodeStateIsNearDeathValue);
76 STATIC_ASSERT(static_cast<int>(IsIndependent::kShift) == 76 STATIC_ASSERT(static_cast<int>(IsIndependent::kShift) ==
77 Internals::kNodeIsIndependentShift); 77 Internals::kNodeIsIndependentShift);
78 STATIC_ASSERT(static_cast<int>(IsPartiallyDependent::kShift) == 78 STATIC_ASSERT(static_cast<int>(IsPartiallyDependent::kShift) ==
79 Internals::kNodeIsPartiallyDependentShift); 79 Internals::kNodeIsPartiallyDependentShift);
80 } 80 }
81 81
82 #ifdef ENABLE_EXTRA_CHECKS 82 #ifdef ENABLE_HANDLE_ZAPPING
83 ~Node() { 83 ~Node() {
84 // TODO(1428): if it's a weak handle we should have invoked its callback. 84 // TODO(1428): if it's a weak handle we should have invoked its callback.
85 // Zap the values for eager trapping. 85 // Zap the values for eager trapping.
86 object_ = reinterpret_cast<Object*>(kGlobalHandleZapValue); 86 object_ = reinterpret_cast<Object*>(kGlobalHandleZapValue);
87 class_id_ = v8::HeapProfiler::kPersistentHandleNoClassId; 87 class_id_ = v8::HeapProfiler::kPersistentHandleNoClassId;
88 index_ = 0; 88 index_ = 0;
89 set_independent(false); 89 set_independent(false);
90 set_partially_dependent(false); 90 set_partially_dependent(false);
91 set_in_new_space_list(false); 91 set_in_new_space_list(false);
92 parameter_or_next_free_.next_free = NULL; 92 parameter_or_next_free_.next_free = NULL;
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 ASSERT_EQ(isolate->heap()->the_hole_value(), blocks_[block][offset]); 1111 ASSERT_EQ(isolate->heap()->the_hole_value(), blocks_[block][offset]);
1112 blocks_[block][offset] = object; 1112 blocks_[block][offset] = object;
1113 if (isolate->heap()->InNewSpace(object)) { 1113 if (isolate->heap()->InNewSpace(object)) {
1114 new_space_indices_.Add(size_); 1114 new_space_indices_.Add(size_);
1115 } 1115 }
1116 *index = size_++; 1116 *index = size_++;
1117 } 1117 }
1118 1118
1119 1119
1120 } } // namespace v8::internal 1120 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698