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

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

Issue 339763002: Make TypedList not implement ByteBuffer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
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 3161 matching lines...) Expand 10 before | Expand all | Expand 10 after
3172 3172
3173 3173
3174 static Dart_Handle NewExternalByteData( 3174 static Dart_Handle NewExternalByteData(
3175 Isolate* isolate, void* data, intptr_t length) { 3175 Isolate* isolate, void* data, intptr_t length) {
3176 Dart_Handle ext_data = NewExternalTypedData( 3176 Dart_Handle ext_data = NewExternalTypedData(
3177 isolate, kExternalTypedDataUint8ArrayCid, data, length); 3177 isolate, kExternalTypedDataUint8ArrayCid, data, length);
3178 if (::Dart_IsError(ext_data)) { 3178 if (::Dart_IsError(ext_data)) {
3179 return ext_data; 3179 return ext_data;
3180 } 3180 }
3181 Object& result = Object::Handle(isolate); 3181 Object& result = Object::Handle(isolate);
3182 result = GetByteDataConstructor(isolate, Symbols::ByteDataDotview(), 3); 3182 result = GetByteDataConstructor(isolate, Symbols::ByteDataDot_view(), 3);
3183 ASSERT(!result.IsNull()); 3183 ASSERT(!result.IsNull());
3184 ASSERT(result.IsFunction()); 3184 ASSERT(result.IsFunction());
3185 const Function& factory = Function::Cast(result); 3185 const Function& factory = Function::Cast(result);
3186 ASSERT(!factory.IsConstructor()); 3186 ASSERT(!factory.IsConstructor());
3187 3187
3188 // Create the argument list. 3188 // Create the argument list.
3189 const intptr_t num_args = 3; 3189 const intptr_t num_args = 3;
3190 const Array& args = Array::Handle(isolate, Array::New(num_args + 1)); 3190 const Array& args = Array::Handle(isolate, Array::New(num_args + 1));
3191 // Factories get type arguments. 3191 // Factories get type arguments.
3192 args.SetAt(0, TypeArguments::Handle(isolate)); 3192 args.SetAt(0, TypeArguments::Handle(isolate));
(...skipping 1999 matching lines...) Expand 10 before | Expand all | Expand 10 after
5192 5192
5193 5193
5194 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( 5194 DART_EXPORT void Dart_RegisterRootServiceRequestCallback(
5195 const char* name, 5195 const char* name,
5196 Dart_ServiceRequestCallback callback, 5196 Dart_ServiceRequestCallback callback,
5197 void* user_data) { 5197 void* user_data) {
5198 Service::RegisterRootEmbedderCallback(name, callback, user_data); 5198 Service::RegisterRootEmbedderCallback(name, callback, user_data);
5199 } 5199 }
5200 5200
5201 } // namespace dart 5201 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698