| OLD | NEW |
| 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_native_api.h" | 5 #include "include/dart_native_api.h" |
| 6 #include "platform/assert.h" | 6 #include "platform/assert.h" |
| 7 #include "vm/bootstrap_natives.h" | 7 #include "vm/bootstrap_natives.h" |
| 8 #include "vm/class_finalizer.h" | 8 #include "vm/class_finalizer.h" |
| 9 #include "vm/dart.h" | 9 #include "vm/dart.h" |
| 10 #include "vm/dart_api_impl.h" | 10 #include "vm/dart_api_impl.h" |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 GET_NATIVE_ARGUMENT(SendPort, onError, arguments->NativeArgAt(6)); | 344 GET_NATIVE_ARGUMENT(SendPort, onError, arguments->NativeArgAt(6)); |
| 345 | 345 |
| 346 GET_NATIVE_ARGUMENT(Bool, fatalErrors, arguments->NativeArgAt(7)); | 346 GET_NATIVE_ARGUMENT(Bool, fatalErrors, arguments->NativeArgAt(7)); |
| 347 GET_NATIVE_ARGUMENT(Bool, checked, arguments->NativeArgAt(8)); | 347 GET_NATIVE_ARGUMENT(Bool, checked, arguments->NativeArgAt(8)); |
| 348 | 348 |
| 349 GET_NATIVE_ARGUMENT(Array, environment, arguments->NativeArgAt(9)); | 349 GET_NATIVE_ARGUMENT(Array, environment, arguments->NativeArgAt(9)); |
| 350 | 350 |
| 351 GET_NATIVE_ARGUMENT(String, packageRoot, arguments->NativeArgAt(10)); | 351 GET_NATIVE_ARGUMENT(String, packageRoot, arguments->NativeArgAt(10)); |
| 352 GET_NATIVE_ARGUMENT(String, packageConfig, arguments->NativeArgAt(11)); | 352 GET_NATIVE_ARGUMENT(String, packageConfig, arguments->NativeArgAt(11)); |
| 353 | 353 |
| 354 if (Dart::vm_snapshot_kind() == Snapshot::kAppAOT) { | 354 if (Dart::vm_snapshot_kind() == Snapshot::kFullAOT) { |
| 355 const Array& args = Array::Handle(Array::New(1)); | 355 const Array& args = Array::Handle(Array::New(1)); |
| 356 args.SetAt( | 356 args.SetAt( |
| 357 0, | 357 0, |
| 358 String::Handle(String::New( | 358 String::Handle(String::New( |
| 359 "Isolate.spawnUri is not supported when using AOT compilation"))); | 359 "Isolate.spawnUri is not supported when using AOT compilation"))); |
| 360 Exceptions::ThrowByType(Exceptions::kUnsupported, args); | 360 Exceptions::ThrowByType(Exceptions::kUnsupported, args); |
| 361 UNREACHABLE(); | 361 UNREACHABLE(); |
| 362 } | 362 } |
| 363 | 363 |
| 364 bool fatal_errors = fatalErrors.IsNull() ? true : fatalErrors.value(); | 364 bool fatal_errors = fatalErrors.IsNull() ? true : fatalErrors.value(); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 uint8_t* data = NULL; | 463 uint8_t* data = NULL; |
| 464 MessageWriter writer(&data, &malloc_allocator, &malloc_deallocator, false); | 464 MessageWriter writer(&data, &malloc_allocator, &malloc_deallocator, false); |
| 465 writer.WriteMessage(msg); | 465 writer.WriteMessage(msg); |
| 466 | 466 |
| 467 PortMap::PostMessage(new Message(port.Id(), data, writer.BytesWritten(), | 467 PortMap::PostMessage(new Message(port.Id(), data, writer.BytesWritten(), |
| 468 Message::kOOBPriority)); | 468 Message::kOOBPriority)); |
| 469 return Object::null(); | 469 return Object::null(); |
| 470 } | 470 } |
| 471 | 471 |
| 472 } // namespace dart | 472 } // namespace dart |
| OLD | NEW |