| 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 | 281 |
| 282 | 282 |
| 283 Dart_Handle TestCase::TriggerReload() { | 283 Dart_Handle TestCase::TriggerReload() { |
| 284 Isolate* isolate = Isolate::Current(); | 284 Isolate* isolate = Isolate::Current(); |
| 285 JSONStream js; | 285 JSONStream js; |
| 286 bool success = false; | 286 bool success = false; |
| 287 { | 287 { |
| 288 TransitionNativeToVM transition(Thread::Current()); | 288 TransitionNativeToVM transition(Thread::Current()); |
| 289 success = isolate->ReloadSources(&js, | 289 success = isolate->ReloadSources(&js, |
| 290 false, // force_reload | 290 false, // force_reload |
| 291 NULL, NULL, |
| 291 true); // dont_delete_reload_context | 292 true); // dont_delete_reload_context |
| 292 fprintf(stderr, "RELOAD REPORT:\n%s\n", js.ToCString()); | 293 OS::PrintErr("RELOAD REPORT:\n%s\n", js.ToCString()); |
| 293 } | 294 } |
| 294 | 295 |
| 295 if (success) { | 296 if (success) { |
| 296 return Dart_FinalizeLoading(false); | 297 return Dart_FinalizeLoading(false); |
| 297 } else { | 298 } else { |
| 298 return Dart_Null(); | 299 return Dart_Null(); |
| 299 } | 300 } |
| 300 } | 301 } |
| 301 | 302 |
| 302 | 303 |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 } | 480 } |
| 480 // Copy the remainder of in to out. | 481 // Copy the remainder of in to out. |
| 481 while (*in != '\0') { | 482 while (*in != '\0') { |
| 482 *out++ = *in++; | 483 *out++ = *in++; |
| 483 } | 484 } |
| 484 *out = '\0'; | 485 *out = '\0'; |
| 485 } | 486 } |
| 486 | 487 |
| 487 | 488 |
| 488 } // namespace dart | 489 } // namespace dart |
| OLD | NEW |