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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 GET_NATIVE_ARGUMENT(SendPort, onError, arguments->NativeArgAt(6)); | 338 GET_NATIVE_ARGUMENT(SendPort, onError, arguments->NativeArgAt(6)); |
339 | 339 |
340 GET_NATIVE_ARGUMENT(Bool, fatalErrors, arguments->NativeArgAt(7)); | 340 GET_NATIVE_ARGUMENT(Bool, fatalErrors, arguments->NativeArgAt(7)); |
341 GET_NATIVE_ARGUMENT(Bool, checked, arguments->NativeArgAt(8)); | 341 GET_NATIVE_ARGUMENT(Bool, checked, arguments->NativeArgAt(8)); |
342 | 342 |
343 GET_NATIVE_ARGUMENT(Array, environment, arguments->NativeArgAt(9)); | 343 GET_NATIVE_ARGUMENT(Array, environment, arguments->NativeArgAt(9)); |
344 | 344 |
345 GET_NATIVE_ARGUMENT(String, packageRoot, arguments->NativeArgAt(10)); | 345 GET_NATIVE_ARGUMENT(String, packageRoot, arguments->NativeArgAt(10)); |
346 GET_NATIVE_ARGUMENT(String, packageConfig, arguments->NativeArgAt(11)); | 346 GET_NATIVE_ARGUMENT(String, packageConfig, arguments->NativeArgAt(11)); |
347 | 347 |
348 if (Dart::IsRunningPrecompiledCode()) { | 348 if (Snapshot::IncludesCode(Dart::snapshot_kind())) { |
349 const Array& args = Array::Handle(Array::New(1)); | 349 const Array& args = Array::Handle(Array::New(1)); |
350 args.SetAt(0, String::Handle(String::New( | 350 args.SetAt(0, String::Handle(String::New( |
351 "Isolate.spawnUri not supported under precompilation"))); | 351 "Isolate.spawnUri not supported under precompilation"))); |
352 Exceptions::ThrowByType(Exceptions::kUnsupported, args); | 352 Exceptions::ThrowByType(Exceptions::kUnsupported, args); |
353 UNREACHABLE(); | 353 UNREACHABLE(); |
354 } | 354 } |
355 | 355 |
356 // Canonicalize the uri with respect to the current isolate. | 356 // Canonicalize the uri with respect to the current isolate. |
357 const Library& root_lib = | 357 const Library& root_lib = |
358 Library::Handle(isolate->object_store()->root_library()); | 358 Library::Handle(isolate->object_store()->root_library()); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 MessageWriter writer(&data, &allocator, false); | 449 MessageWriter writer(&data, &allocator, false); |
450 writer.WriteMessage(msg); | 450 writer.WriteMessage(msg); |
451 | 451 |
452 PortMap::PostMessage(new Message(port.Id(), | 452 PortMap::PostMessage(new Message(port.Id(), |
453 data, writer.BytesWritten(), | 453 data, writer.BytesWritten(), |
454 Message::kOOBPriority)); | 454 Message::kOOBPriority)); |
455 return Object::null(); | 455 return Object::null(); |
456 } | 456 } |
457 | 457 |
458 } // namespace dart | 458 } // namespace dart |
OLD | NEW |