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

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

Issue 196243002: Use CHECK_ISOLATE instead of DARTSCOPE for Dart_GetNativeInstanceField after (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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/object.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_api.h" 5 #include "include/dart_api.h"
6 #include "include/dart_mirrors_api.h" 6 #include "include/dart_mirrors_api.h"
7 #include "include/dart_native_api.h" 7 #include "include/dart_native_api.h"
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "vm/bigint_operations.h" 10 #include "vm/bigint_operations.h"
(...skipping 3827 matching lines...) Expand 10 before | Expand all | Expand 10 after
3838 } 3838 }
3839 *count = instance.NumNativeFields(); 3839 *count = instance.NumNativeFields();
3840 return Api::Success(); 3840 return Api::Success();
3841 } 3841 }
3842 3842
3843 3843
3844 DART_EXPORT Dart_Handle Dart_GetNativeInstanceField(Dart_Handle obj, 3844 DART_EXPORT Dart_Handle Dart_GetNativeInstanceField(Dart_Handle obj,
3845 int index, 3845 int index,
3846 intptr_t* value) { 3846 intptr_t* value) {
3847 Isolate* isolate = Isolate::Current(); 3847 Isolate* isolate = Isolate::Current();
3848 DARTSCOPE(isolate); 3848 CHECK_ISOLATE(isolate);
3849 ReusableObjectHandleScope reused_obj_handle(isolate); 3849 ReusableObjectHandleScope reused_obj_handle(isolate);
3850 const Instance& instance = Api::UnwrapInstanceHandle(reused_obj_handle, obj); 3850 const Instance& instance = Api::UnwrapInstanceHandle(reused_obj_handle, obj);
3851 if (instance.IsNull()) { 3851 if (instance.IsNull()) {
3852 RETURN_TYPE_ERROR(isolate, obj, Instance); 3852 RETURN_TYPE_ERROR(isolate, obj, Instance);
3853 } 3853 }
3854 if (!instance.IsValidNativeIndex(index)) { 3854 if (!instance.IsValidNativeIndex(index)) {
3855 return Api::NewError( 3855 return Api::NewError(
3856 "%s: invalid index %d passed in to access native instance field", 3856 "%s: invalid index %d passed in to access native instance field",
3857 CURRENT_FUNC, index); 3857 CURRENT_FUNC, index);
3858 } 3858 }
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
4655 4655
4656 4656
4657 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( 4657 DART_EXPORT void Dart_RegisterRootServiceRequestCallback(
4658 const char* name, 4658 const char* name,
4659 Dart_ServiceRequestCallback callback, 4659 Dart_ServiceRequestCallback callback,
4660 void* user_data) { 4660 void* user_data) {
4661 Service::RegisterRootEmbedderCallback(name, callback, user_data); 4661 Service::RegisterRootEmbedderCallback(name, callback, user_data);
4662 } 4662 }
4663 4663
4664 } // namespace dart 4664 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698