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

Side by Side Diff: vm/dart_api_impl.cc

Issue 10907012: Use SetReturnUnsafe in dart_api_impl.cc. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 3 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 | vm/native_arguments.h » ('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) 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 "include/dart_api.h" 5 #include "include/dart_api.h"
6 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart.h" 10 #include "vm/dart.h"
(...skipping 3700 matching lines...) Expand 10 before | Expand all | Expand 10 after
3711 3711
3712 3712
3713 DART_EXPORT int Dart_GetNativeArgumentCount(Dart_NativeArguments args) { 3713 DART_EXPORT int Dart_GetNativeArgumentCount(Dart_NativeArguments args) {
3714 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args); 3714 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
3715 return arguments->Count(); 3715 return arguments->Count();
3716 } 3716 }
3717 3717
3718 3718
3719 DART_EXPORT void Dart_SetReturnValue(Dart_NativeArguments args, 3719 DART_EXPORT void Dart_SetReturnValue(Dart_NativeArguments args,
3720 Dart_Handle retval) { 3720 Dart_Handle retval) {
3721 NoGCScope no_gc_scope;
3721 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args); 3722 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
3722 Isolate* isolate = arguments->isolate(); 3723 arguments->SetReturnUnsafe(Api::UnwrapHandle(retval));
3723 DARTSCOPE(isolate);
3724 arguments->SetReturn(Object::Handle(isolate, Api::UnwrapHandle(retval)));
3725 } 3724 }
3726 3725
3727 3726
3728 // --- Scripts and Libraries --- 3727 // --- Scripts and Libraries ---
3729 3728
3730 3729
3731 DART_EXPORT Dart_Handle Dart_SetLibraryTagHandler( 3730 DART_EXPORT Dart_Handle Dart_SetLibraryTagHandler(
3732 Dart_LibraryTagHandler handler) { 3731 Dart_LibraryTagHandler handler) {
3733 Isolate* isolate = Isolate::Current(); 3732 Isolate* isolate = Isolate::Current();
3734 CHECK_ISOLATE(isolate); 3733 CHECK_ISOLATE(isolate);
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
4186 DART_EXPORT void Dart_InitPerfEventsSupport(Dart_FileWriterFunction function) { 4185 DART_EXPORT void Dart_InitPerfEventsSupport(Dart_FileWriterFunction function) {
4187 Dart::set_perf_events_writer(function); 4186 Dart::set_perf_events_writer(function);
4188 } 4187 }
4189 4188
4190 4189
4191 DART_EXPORT void Dart_InitFlowGraphPrinting(Dart_FileWriterFunction function) { 4190 DART_EXPORT void Dart_InitFlowGraphPrinting(Dart_FileWriterFunction function) {
4192 Dart::set_flow_graph_writer(function); 4191 Dart::set_flow_graph_writer(function);
4193 } 4192 }
4194 4193
4195 } // namespace dart 4194 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | vm/native_arguments.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698