| OLD | NEW |
| 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 3157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3168 | 3168 |
| 3169 | 3169 |
| 3170 static Dart_Handle NewExternalByteData( | 3170 static Dart_Handle NewExternalByteData( |
| 3171 Isolate* isolate, void* data, intptr_t length) { | 3171 Isolate* isolate, void* data, intptr_t length) { |
| 3172 Dart_Handle ext_data = NewExternalTypedData( | 3172 Dart_Handle ext_data = NewExternalTypedData( |
| 3173 isolate, kExternalTypedDataUint8ArrayCid, data, length); | 3173 isolate, kExternalTypedDataUint8ArrayCid, data, length); |
| 3174 if (::Dart_IsError(ext_data)) { | 3174 if (::Dart_IsError(ext_data)) { |
| 3175 return ext_data; | 3175 return ext_data; |
| 3176 } | 3176 } |
| 3177 Object& result = Object::Handle(isolate); | 3177 Object& result = Object::Handle(isolate); |
| 3178 result = GetByteDataConstructor(isolate, Symbols::ByteDataDotview(), 3); | 3178 result = GetByteDataConstructor(isolate, Symbols::ByteDataDot_view(), 3); |
| 3179 ASSERT(!result.IsNull()); | 3179 ASSERT(!result.IsNull()); |
| 3180 ASSERT(result.IsFunction()); | 3180 ASSERT(result.IsFunction()); |
| 3181 const Function& factory = Function::Cast(result); | 3181 const Function& factory = Function::Cast(result); |
| 3182 ASSERT(!factory.IsConstructor()); | 3182 ASSERT(!factory.IsConstructor()); |
| 3183 | 3183 |
| 3184 // Create the argument list. | 3184 // Create the argument list. |
| 3185 const intptr_t num_args = 3; | 3185 const intptr_t num_args = 3; |
| 3186 const Array& args = Array::Handle(isolate, Array::New(num_args + 1)); | 3186 const Array& args = Array::Handle(isolate, Array::New(num_args + 1)); |
| 3187 // Factories get type arguments. | 3187 // Factories get type arguments. |
| 3188 args.SetAt(0, TypeArguments::Handle(isolate)); | 3188 args.SetAt(0, TypeArguments::Handle(isolate)); |
| (...skipping 1999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5188 | 5188 |
| 5189 | 5189 |
| 5190 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( | 5190 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( |
| 5191 const char* name, | 5191 const char* name, |
| 5192 Dart_ServiceRequestCallback callback, | 5192 Dart_ServiceRequestCallback callback, |
| 5193 void* user_data) { | 5193 void* user_data) { |
| 5194 Service::RegisterRootEmbedderCallback(name, callback, user_data); | 5194 Service::RegisterRootEmbedderCallback(name, callback, user_data); |
| 5195 } | 5195 } |
| 5196 | 5196 |
| 5197 } // namespace dart | 5197 } // namespace dart |
| OLD | NEW |