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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 } | 301 } |
302 | 302 |
303 return Dart_FinalizeLoading(false); | 303 return Dart_FinalizeLoading(false); |
304 } | 304 } |
305 | 305 |
306 | 306 |
307 Dart_Handle TestCase::GetReloadErrorOrRootLibrary() { | 307 Dart_Handle TestCase::GetReloadErrorOrRootLibrary() { |
308 Isolate* isolate = Isolate::Current(); | 308 Isolate* isolate = Isolate::Current(); |
309 | 309 |
310 if (isolate->reload_context() != NULL && | 310 if (isolate->reload_context() != NULL && |
311 isolate->reload_context()->has_error()) { | 311 isolate->reload_context()->reload_aborted()) { |
312 // Return a handle to the error. | 312 // Return a handle to the error. |
313 return Api::NewHandle(Thread::Current(), | 313 return Api::NewHandle(Thread::Current(), |
314 isolate->reload_context()->error()); | 314 isolate->reload_context()->error()); |
315 } | 315 } |
316 return Dart_RootLibrary(); | 316 return Dart_RootLibrary(); |
317 } | 317 } |
318 | 318 |
319 | 319 |
320 Dart_Handle TestCase::ReloadTestScript(const char* script) { | 320 Dart_Handle TestCase::ReloadTestScript(const char* script) { |
321 SetReloadTestScript(script); | 321 SetReloadTestScript(script); |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 } | 487 } |
488 // Copy the remainder of in to out. | 488 // Copy the remainder of in to out. |
489 while (*in != '\0') { | 489 while (*in != '\0') { |
490 *out++ = *in++; | 490 *out++ = *in++; |
491 } | 491 } |
492 *out = '\0'; | 492 *out = '\0'; |
493 } | 493 } |
494 | 494 |
495 | 495 |
496 } // namespace dart | 496 } // namespace dart |
OLD | NEW |