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

Side by Side Diff: runtime/vm/verifier.h

Issue 22303002: Auto create ApiLocalScope before calling native functions, this ensures that (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 | « runtime/vm/stub_code_x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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_VERIFIER_H_ 5 #ifndef VM_VERIFIER_H_
6 #define VM_VERIFIER_H_ 6 #define VM_VERIFIER_H_
7 7
8 #include "vm/flags.h" 8 #include "vm/flags.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/handles.h" 10 #include "vm/handles.h"
11 #include "vm/visitor.h" 11 #include "vm/visitor.h"
12 12
13 namespace dart { 13 namespace dart {
14 14
15 DECLARE_FLAG(bool, verify_on_transition);
16
17 #define VERIFY_ON_TRANSITION \
18 if (FLAG_verify_on_transition) { \
19 VerifyPointersVisitor::VerifyPointers(); \
20 Isolate::Current()->heap()->Verify(); \
21 } \
22
23
24 // Forward declarations. 15 // Forward declarations.
25 class Isolate; 16 class Isolate;
26 class ObjectSet; 17 class ObjectSet;
27 class RawObject; 18 class RawObject;
28 19
29 class VerifyObjectVisitor : public ObjectVisitor { 20 class VerifyObjectVisitor : public ObjectVisitor {
30 public: 21 public:
31 VerifyObjectVisitor(Isolate* isolate, ObjectSet* allocated_set) 22 VerifyObjectVisitor(Isolate* isolate, ObjectSet* allocated_set)
32 : ObjectVisitor(isolate), 23 : ObjectVisitor(isolate),
33 allocated_set_(allocated_set) { 24 allocated_set_(allocated_set) {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 ObjectPointerVisitor* visitor_; 63 ObjectPointerVisitor* visitor_;
73 64
74 ObjectSet* allocated_set; 65 ObjectSet* allocated_set;
75 66
76 DISALLOW_COPY_AND_ASSIGN(VerifyWeakPointersVisitor); 67 DISALLOW_COPY_AND_ASSIGN(VerifyWeakPointersVisitor);
77 }; 68 };
78 69
79 } // namespace dart 70 } // namespace dart
80 71
81 #endif // VM_VERIFIER_H_ 72 #endif // VM_VERIFIER_H_
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698