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

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

Issue 1401413002: Move no_callback_scope_depth_ and cha_ from isolate -> thread (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Spelling fix Created 5 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
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/native_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 "include/dart_mirrors_api.h" 5 #include "include/dart_mirrors_api.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/dart.h" 9 #include "vm/dart.h"
10 #include "vm/dart_api_impl.h" 10 #include "vm/dart_api_impl.h"
(...skipping 29 matching lines...) Expand all
40 DART_EXPORT Dart_Handle Dart_QualifiedTypeName(Dart_Handle object) { 40 DART_EXPORT Dart_Handle Dart_QualifiedTypeName(Dart_Handle object) {
41 DARTSCOPE(Thread::Current()); 41 DARTSCOPE(Thread::Current());
42 const Object& obj = Object::Handle(Z, Api::UnwrapHandle(object)); 42 const Object& obj = Object::Handle(Z, Api::UnwrapHandle(object));
43 if (obj.IsType() || obj.IsClass()) { 43 if (obj.IsType() || obj.IsClass()) {
44 const Class& cls = (obj.IsType()) ? 44 const Class& cls = (obj.IsType()) ?
45 Class::Handle(Z, Type::Cast(obj).type_class()) : Class::Cast(obj); 45 Class::Handle(Z, Type::Cast(obj).type_class()) : Class::Cast(obj);
46 const char* str = cls.ToCString(); 46 const char* str = cls.ToCString();
47 if (str == NULL) { 47 if (str == NULL) {
48 RETURN_NULL_ERROR(str); 48 RETURN_NULL_ERROR(str);
49 } 49 }
50 CHECK_CALLBACK_STATE(I); 50 CHECK_CALLBACK_STATE(T);
51 return Api::NewHandle(I, String::New(str)); 51 return Api::NewHandle(I, String::New(str));
52 } else { 52 } else {
53 RETURN_TYPE_ERROR(Z, object, Class/Type); 53 RETURN_TYPE_ERROR(Z, object, Class/Type);
54 } 54 }
55 } 55 }
56 56
57 57
58 // --- Function and Variable Reflection --- 58 // --- Function and Variable Reflection ---
59 59
60 // Outside of the vm, we expose setter names with a trailing '='. 60 // Outside of the vm, we expose setter names with a trailing '='.
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 RETURN_TYPE_ERROR(Z, closure, Instance); 360 RETURN_TYPE_ERROR(Z, closure, Instance);
361 } 361 }
362 362
363 ASSERT(ClassFinalizer::AllClassesFinalized()); 363 ASSERT(ClassFinalizer::AllClassesFinalized());
364 364
365 RawFunction* rf = Closure::function(closure_obj); 365 RawFunction* rf = Closure::function(closure_obj);
366 return Api::NewHandle(I, rf); 366 return Api::NewHandle(I, rf);
367 } 367 }
368 368
369 } // namespace dart 369 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/native_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698