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

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

Issue 16247002: - Adjust parameter types for Dart_NewWeakReferenceSet implementation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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_state.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) 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 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/bigint_operations.h" 8 #include "vm/bigint_operations.h"
9 #include "vm/class_finalizer.h" 9 #include "vm/class_finalizer.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 DART_EXPORT bool Dart_IsPrologueWeakPersistentHandle( 630 DART_EXPORT bool Dart_IsPrologueWeakPersistentHandle(
631 Dart_WeakPersistentHandle object) { 631 Dart_WeakPersistentHandle object) {
632 Isolate* isolate = Isolate::Current(); 632 Isolate* isolate = Isolate::Current();
633 CHECK_ISOLATE(isolate); 633 CHECK_ISOLATE(isolate);
634 ApiState* state = isolate->api_state(); 634 ApiState* state = isolate->api_state();
635 ASSERT(state != NULL); 635 ASSERT(state != NULL);
636 return state->IsValidPrologueWeakPersistentHandle(object); 636 return state->IsValidPrologueWeakPersistentHandle(object);
637 } 637 }
638 638
639 639
640 DART_EXPORT Dart_Handle Dart_NewWeakReferenceSet(Dart_Handle* keys, 640 DART_EXPORT Dart_Handle Dart_NewWeakReferenceSet(
641 intptr_t num_keys, 641 Dart_WeakPersistentHandle* keys,
642 Dart_Handle* values, 642 intptr_t num_keys,
643 intptr_t num_values) { 643 Dart_WeakPersistentHandle* values,
644 intptr_t num_values) {
644 Isolate* isolate = Isolate::Current(); 645 Isolate* isolate = Isolate::Current();
645 CHECK_ISOLATE(isolate); 646 CHECK_ISOLATE(isolate);
646 ApiState* state = isolate->api_state(); 647 ApiState* state = isolate->api_state();
647 ASSERT(state != NULL); 648 ASSERT(state != NULL);
648 if (keys == NULL) { 649 if (keys == NULL) {
649 RETURN_NULL_ERROR(keys); 650 RETURN_NULL_ERROR(keys);
650 } 651 }
651 if (num_keys <= 0) { 652 if (num_keys <= 0) {
652 return Api::NewError( 653 return Api::NewError(
653 "%s expects argument 'num_keys' to be greater than 0.", 654 "%s expects argument 'num_keys' to be greater than 0.",
(...skipping 4182 matching lines...) Expand 10 before | Expand all | Expand 10 after
4836 } 4837 }
4837 { 4838 {
4838 NoGCScope no_gc; 4839 NoGCScope no_gc;
4839 RawObject* raw_obj = obj.raw(); 4840 RawObject* raw_obj = obj.raw();
4840 isolate->heap()->SetPeer(raw_obj, peer); 4841 isolate->heap()->SetPeer(raw_obj, peer);
4841 } 4842 }
4842 return Api::Success(); 4843 return Api::Success();
4843 } 4844 }
4844 4845
4845 } // namespace dart 4846 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698