| 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 "vm/unit_test.h" | 5 #include "vm/unit_test.h" |
| 6 | 6 |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 | 8 |
| 9 #include "bin/builtin.h" | 9 #include "bin/builtin.h" |
| 10 #include "bin/dartutils.h" | 10 #include "bin/dartutils.h" |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 Dart_Handle TestCase::ReloadTestScript(const char* script) { | 324 Dart_Handle TestCase::ReloadTestScript(const char* script) { |
| 325 SetReloadTestScript(script); | 325 SetReloadTestScript(script); |
| 326 | 326 |
| 327 Dart_Handle result = TriggerReload(); | 327 Dart_Handle result = TriggerReload(); |
| 328 if (Dart_IsError(result)) { | 328 if (Dart_IsError(result)) { |
| 329 return result; | 329 return result; |
| 330 } | 330 } |
| 331 | 331 |
| 332 result = GetReloadErrorOrRootLibrary(); | 332 result = GetReloadErrorOrRootLibrary(); |
| 333 | 333 |
| 334 Isolate* isolate = Isolate::Current(); | 334 { |
| 335 if (isolate->reload_context() != NULL) { | 335 Thread* thread = Thread::Current(); |
| 336 isolate->DeleteReloadContext(); | 336 TransitionNativeToVM transition(thread); |
| 337 Isolate* isolate = thread->isolate(); |
| 338 if (isolate->reload_context() != NULL) { |
| 339 isolate->DeleteReloadContext(); |
| 340 } |
| 337 } | 341 } |
| 338 | 342 |
| 339 return result; | 343 return result; |
| 340 } | 344 } |
| 341 | 345 |
| 342 | 346 |
| 343 #endif // !PRODUCT | 347 #endif // !PRODUCT |
| 344 | 348 |
| 345 | 349 |
| 346 Dart_Handle TestCase::LoadCoreTestScript(const char* script, | 350 Dart_Handle TestCase::LoadCoreTestScript(const char* script, |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 } | 495 } |
| 492 // Copy the remainder of in to out. | 496 // Copy the remainder of in to out. |
| 493 while (*in != '\0') { | 497 while (*in != '\0') { |
| 494 *out++ = *in++; | 498 *out++ = *in++; |
| 495 } | 499 } |
| 496 *out = '\0'; | 500 *out = '\0'; |
| 497 } | 501 } |
| 498 | 502 |
| 499 | 503 |
| 500 } // namespace dart | 504 } // namespace dart |
| OLD | NEW |