| 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 "vm/isolate.h" | 5 #include "vm/isolate.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "include/dart_native_api.h" | 8 #include "include/dart_native_api.h" |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "platform/json.h" | 10 #include "platform/json.h" |
| (...skipping 2485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2496 &serialized_message_, | 2496 &serialized_message_, |
| 2497 &serialized_message_len_, | 2497 &serialized_message_len_, |
| 2498 can_send_any_object); | 2498 can_send_any_object); |
| 2499 // By default inherit flags from spawning isolate. These can be overridden | 2499 // By default inherit flags from spawning isolate. These can be overridden |
| 2500 // from the calling code. | 2500 // from the calling code. |
| 2501 isolate_flags()->CopyFrom(Isolate::Current()->flags()); | 2501 isolate_flags()->CopyFrom(Isolate::Current()->flags()); |
| 2502 } | 2502 } |
| 2503 | 2503 |
| 2504 | 2504 |
| 2505 IsolateSpawnState::~IsolateSpawnState() { | 2505 IsolateSpawnState::~IsolateSpawnState() { |
| 2506 delete script_url_; | 2506 delete[] script_url_; |
| 2507 delete package_root_; | 2507 delete[] package_root_; |
| 2508 for (int i = 0; package_map_ != NULL; i++) { | 2508 for (int i = 0; package_map_ != NULL; i++) { |
| 2509 if (package_map_[i] != NULL) { | 2509 if (package_map_[i] != NULL) { |
| 2510 delete package_map_[i]; | 2510 delete[] package_map_[i]; |
| 2511 } else { | 2511 } else { |
| 2512 delete package_map_; | 2512 delete[] package_map_; |
| 2513 package_map_ = NULL; | 2513 package_map_ = NULL; |
| 2514 } | 2514 } |
| 2515 } | 2515 } |
| 2516 delete library_url_; | 2516 delete[] library_url_; |
| 2517 delete class_name_; | 2517 delete[] class_name_; |
| 2518 delete function_name_; | 2518 delete[] function_name_; |
| 2519 free(serialized_args_); | 2519 free(serialized_args_); |
| 2520 free(serialized_message_); | 2520 free(serialized_message_); |
| 2521 } | 2521 } |
| 2522 | 2522 |
| 2523 | 2523 |
| 2524 RawObject* IsolateSpawnState::ResolveFunction() { | 2524 RawObject* IsolateSpawnState::ResolveFunction() { |
| 2525 const String& func_name = String::Handle(String::New(function_name())); | 2525 const String& func_name = String::Handle(String::New(function_name())); |
| 2526 | 2526 |
| 2527 if (library_url() == NULL) { | 2527 if (library_url() == NULL) { |
| 2528 // Handle spawnUri lookup rules. | 2528 // Handle spawnUri lookup rules. |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2599 serialized_message_, serialized_message_len_); | 2599 serialized_message_, serialized_message_len_); |
| 2600 } | 2600 } |
| 2601 | 2601 |
| 2602 | 2602 |
| 2603 void IsolateSpawnState::Cleanup() { | 2603 void IsolateSpawnState::Cleanup() { |
| 2604 SwitchIsolateScope switch_scope(I); | 2604 SwitchIsolateScope switch_scope(I); |
| 2605 Dart::ShutdownIsolate(); | 2605 Dart::ShutdownIsolate(); |
| 2606 } | 2606 } |
| 2607 | 2607 |
| 2608 } // namespace dart | 2608 } // namespace dart |
| OLD | NEW |