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 #include "vm/code_observers.h" | 5 #include "vm/code_observers.h" |
6 | 6 |
7 #include "vm/os.h" | 7 #include "vm/os.h" |
8 | 8 |
9 namespace dart { | 9 namespace dart { |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 } | 43 } |
44 return false; | 44 return false; |
45 } | 45 } |
46 | 46 |
47 | 47 |
48 void CodeObservers::DeleteAll() { | 48 void CodeObservers::DeleteAll() { |
49 for (intptr_t i = 0; i < observers_length_; i++) { | 49 for (intptr_t i = 0; i < observers_length_; i++) { |
50 delete observers_[i]; | 50 delete observers_[i]; |
51 } | 51 } |
52 free(observers_); | 52 free(observers_); |
| 53 observers_length_ = 0; |
| 54 observers_ = NULL; |
53 } | 55 } |
54 | 56 |
55 | 57 |
56 void CodeObservers::InitOnce() { | 58 void CodeObservers::InitOnce() { |
57 OS::RegisterCodeObservers(); | 59 OS::RegisterCodeObservers(); |
58 } | 60 } |
59 | 61 |
60 | 62 |
61 } // namespace dart | 63 } // namespace dart |
OLD | NEW |