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

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

Issue 21252005: Fix incorrect usage of NoGCScope in previous change (dart objects are being (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/dart_api_impl.h ('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) 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 3583 matching lines...) Expand 10 before | Expand all | Expand 10 after
3594 DART_EXPORT void Dart_SetReturnValue(Dart_NativeArguments args, 3594 DART_EXPORT void Dart_SetReturnValue(Dart_NativeArguments args,
3595 Dart_Handle retval) { 3595 Dart_Handle retval) {
3596 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args); 3596 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
3597 Isolate* isolate = arguments->isolate(); 3597 Isolate* isolate = arguments->isolate();
3598 CHECK_ISOLATE(isolate); 3598 CHECK_ISOLATE(isolate);
3599 if ((retval != Api::Null()) && (!Api::IsInstance(retval))) { 3599 if ((retval != Api::Null()) && (!Api::IsInstance(retval))) {
3600 const Object& ret_obj = Object::Handle(Api::UnwrapHandle(retval)); 3600 const Object& ret_obj = Object::Handle(Api::UnwrapHandle(retval));
3601 FATAL1("Return value check failed: saw '%s' expected a dart Instance.", 3601 FATAL1("Return value check failed: saw '%s' expected a dart Instance.",
3602 ret_obj.ToCString()); 3602 ret_obj.ToCString());
3603 } 3603 }
3604 ASSERT(retval != 0);
3604 Api::SetReturnValue(arguments, retval); 3605 Api::SetReturnValue(arguments, retval);
3605 } 3606 }
3606 3607
3607 3608
3608 DART_EXPORT void Dart_SetBooleanReturnValue(Dart_NativeArguments args, 3609 DART_EXPORT void Dart_SetBooleanReturnValue(Dart_NativeArguments args,
3609 bool retval) { 3610 bool retval) {
3610 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args); 3611 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
3611 arguments->SetReturn(retval ? Bool::True() : Bool::False()); 3612 arguments->SetReturn(retval ? Bool::True() : Bool::False());
3612 } 3613 }
3613 3614
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
4108 } 4109 }
4109 { 4110 {
4110 NoGCScope no_gc; 4111 NoGCScope no_gc;
4111 RawObject* raw_obj = obj.raw(); 4112 RawObject* raw_obj = obj.raw();
4112 isolate->heap()->SetPeer(raw_obj, peer); 4113 isolate->heap()->SetPeer(raw_obj, peer);
4113 } 4114 }
4114 return Api::Success(); 4115 return Api::Success();
4115 } 4116 }
4116 4117
4117 } // namespace dart 4118 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698