Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(475)

Side by Side Diff: runtime/vm/unit_test.cc

Issue 2512483002: Support reloading from source on top of a script snapshot. (Closed)
Patch Set: ... Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/service.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698