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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 } | 291 } |
292 | 292 |
293 return Dart_FinalizeLoading(false); | 293 return Dart_FinalizeLoading(false); |
294 } | 294 } |
295 | 295 |
296 | 296 |
297 Dart_Handle TestCase::GetReloadErrorOrRootLibrary() { | 297 Dart_Handle TestCase::GetReloadErrorOrRootLibrary() { |
298 Isolate* isolate = Isolate::Current(); | 298 Isolate* isolate = Isolate::Current(); |
299 | 299 |
300 if (isolate->reload_context() != NULL && | 300 if (isolate->reload_context() != NULL && |
301 isolate->reload_context()->has_error()) { | 301 isolate->reload_context()->reload_aborted()) { |
302 // Return a handle to the error. | 302 // Return a handle to the error. |
303 return Api::NewHandle(Thread::Current(), | 303 return Api::NewHandle(Thread::Current(), |
304 isolate->reload_context()->error()); | 304 isolate->reload_context()->error()); |
305 } | 305 } |
306 return Dart_RootLibrary(); | 306 return Dart_RootLibrary(); |
307 } | 307 } |
308 | 308 |
309 | 309 |
310 Dart_Handle TestCase::ReloadTestScript(const char* script) { | 310 Dart_Handle TestCase::ReloadTestScript(const char* script) { |
311 SetReloadTestScript(script); | 311 SetReloadTestScript(script); |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 } | 477 } |
478 // Copy the remainder of in to out. | 478 // Copy the remainder of in to out. |
479 while (*in != '\0') { | 479 while (*in != '\0') { |
480 *out++ = *in++; | 480 *out++ = *in++; |
481 } | 481 } |
482 *out = '\0'; | 482 *out = '\0'; |
483 } | 483 } |
484 | 484 |
485 | 485 |
486 } // namespace dart | 486 } // namespace dart |
OLD | NEW |