OLD | NEW |
---|---|
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef VM_BASE_ISOLATE_H_ | 5 #ifndef VM_BASE_ISOLATE_H_ |
6 #define VM_BASE_ISOLATE_H_ | 6 #define VM_BASE_ISOLATE_H_ |
7 | 7 |
8 namespace dart { | 8 namespace dart { |
9 | 9 |
10 class HandleScope; | 10 class HandleScope; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
73 #endif | 73 #endif |
74 } | 74 } |
75 | 75 |
76 void DecrementNoGCScopeDepth() { | 76 void DecrementNoGCScopeDepth() { |
77 #if defined(DEBUG) | 77 #if defined(DEBUG) |
78 ASSERT(no_gc_scope_depth_ > 0); | 78 ASSERT(no_gc_scope_depth_ > 0); |
79 no_gc_scope_depth_ -= 1; | 79 no_gc_scope_depth_ -= 1; |
80 #endif | 80 #endif |
81 } | 81 } |
82 | 82 |
83 void ResetNoGCScopeDepth() { | |
Ivan Posva
2012/11/13 08:12:46
As discussed in person we should try to avoid the
siva
2012/11/13 19:46:54
Done.
Now a longjmp is done at the point of failu
| |
84 #if defined(DEBUG) | |
85 ASSERT(no_gc_scope_depth_ > 0); | |
86 no_gc_scope_depth_ = 0; | |
87 #endif | |
88 } | |
89 | |
83 #if defined(DEBUG) | 90 #if defined(DEBUG) |
84 static void AssertCurrent(BaseIsolate* isolate); | 91 static void AssertCurrent(BaseIsolate* isolate); |
85 #endif | 92 #endif |
86 | 93 |
87 protected: | 94 protected: |
88 BaseIsolate() | 95 BaseIsolate() |
89 : top_resource_(NULL), | 96 : top_resource_(NULL), |
90 #if defined(DEBUG) | 97 #if defined(DEBUG) |
91 current_zone_(NULL), | 98 current_zone_(NULL), |
92 top_handle_scope_(NULL), | 99 top_handle_scope_(NULL), |
(...skipping 15 matching lines...) Expand all Loading... | |
108 int32_t no_handle_scope_depth_; | 115 int32_t no_handle_scope_depth_; |
109 int32_t no_gc_scope_depth_; | 116 int32_t no_gc_scope_depth_; |
110 #endif | 117 #endif |
111 | 118 |
112 DISALLOW_COPY_AND_ASSIGN(BaseIsolate); | 119 DISALLOW_COPY_AND_ASSIGN(BaseIsolate); |
113 }; | 120 }; |
114 | 121 |
115 } // namespace dart | 122 } // namespace dart |
116 | 123 |
117 #endif // VM_BASE_ISOLATE_H_ | 124 #endif // VM_BASE_ISOLATE_H_ |
OLD | NEW |