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

Side by Side Diff: runtime/vm/class_finalizer.cc

Issue 15353002: Add a call to CheckIsolateState in all paths of Dart_GetField and Dart_SetField. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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 | « no previous file | runtime/vm/dart_api_impl.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/class_finalizer.h" 5 #include "vm/class_finalizer.h"
6 6
7 #include "vm/flags.h" 7 #include "vm/flags.h"
8 #include "vm/heap.h" 8 #include "vm/heap.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 // Class finalization occurs: 109 // Class finalization occurs:
110 // a) when bootstrap process completes (VerifyBootstrapClasses). 110 // a) when bootstrap process completes (VerifyBootstrapClasses).
111 // b) after the user classes are loaded (dart_api). 111 // b) after the user classes are loaded (dart_api).
112 bool ClassFinalizer::FinalizePendingClasses() { 112 bool ClassFinalizer::FinalizePendingClasses() {
113 bool retval = true; 113 bool retval = true;
114 Isolate* isolate = Isolate::Current(); 114 Isolate* isolate = Isolate::Current();
115 ASSERT(isolate != NULL); 115 ASSERT(isolate != NULL);
116 HANDLESCOPE(isolate); 116 HANDLESCOPE(isolate);
117 ObjectStore* object_store = isolate->object_store(); 117 ObjectStore* object_store = isolate->object_store();
118 const Error& error = Error::Handle(object_store->sticky_error()); 118 const Error& error = Error::Handle(isolate, object_store->sticky_error());
119 if (!error.IsNull()) { 119 if (!error.IsNull()) {
120 return false; 120 return false;
121 } 121 }
122 if (AllClassesFinalized()) { 122 if (AllClassesFinalized()) {
123 return true; 123 return true;
124 } 124 }
125 125
126 GrowableArray<intptr_t> added_subclasses_to_cids; 126 GrowableArray<intptr_t> added_subclasses_to_cids;
127 LongJump* base = isolate->long_jump_base(); 127 LongJump* base = isolate->long_jump_base();
128 LongJump jump; 128 LongJump jump;
(...skipping 1862 matching lines...) Expand 10 before | Expand all | Expand 10 after
1991 expected_name ^= String::New("_offset"); 1991 expected_name ^= String::New("_offset");
1992 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); 1992 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name));
1993 field ^= fields_array.At(2); 1993 field ^= fields_array.At(2);
1994 ASSERT(field.Offset() == TypedDataView::length_offset()); 1994 ASSERT(field.Offset() == TypedDataView::length_offset());
1995 name ^= field.name(); 1995 name ^= field.name();
1996 ASSERT(name.Equals("length")); 1996 ASSERT(name.Equals("length"));
1997 #endif 1997 #endif
1998 } 1998 }
1999 1999
2000 } // namespace dart 2000 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698