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

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

Issue 1672853002: Move sticky_error_ from isolate to thread (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: r Created 4 years, 10 months 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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/service_isolate.h" 5 #include "vm/service_isolate.h"
6 6
7 #include "vm/compiler.h" 7 #include "vm/compiler.h"
8 #include "vm/dart_api_impl.h" 8 #include "vm/dart_api_impl.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 { 360 {
361 // Print the error if there is one. This may execute dart code to 361 // Print the error if there is one. This may execute dart code to
362 // print the exception object, so we need to use a StartIsolateScope. 362 // print the exception object, so we need to use a StartIsolateScope.
363 ASSERT(Isolate::Current() == NULL); 363 ASSERT(Isolate::Current() == NULL);
364 StartIsolateScope start_scope(I); 364 StartIsolateScope start_scope(I);
365 Thread* T = Thread::Current(); 365 Thread* T = Thread::Current();
366 ASSERT(I == T->isolate()); 366 ASSERT(I == T->isolate());
367 StackZone zone(T); 367 StackZone zone(T);
368 HandleScope handle_scope(T); 368 HandleScope handle_scope(T);
369 Error& error = Error::Handle(Z); 369 Error& error = Error::Handle(Z);
370 error = I->object_store()->sticky_error(); 370 error = T->sticky_error();
371 if (!error.IsNull() && !error.IsUnwindError()) { 371 if (!error.IsNull() && !error.IsUnwindError()) {
372 OS::PrintErr("vm-service: Error: %s\n", error.ToErrorCString()); 372 OS::PrintErr("vm-service: Error: %s\n", error.ToErrorCString());
373 } 373 }
374 Dart::RunShutdownCallback(); 374 Dart::RunShutdownCallback();
375 } 375 }
376 // Shut the isolate down. 376 // Shut the isolate down.
377 Dart::ShutdownIsolate(I); 377 Dart::ShutdownIsolate(I);
378 if (FLAG_trace_service) { 378 if (FLAG_trace_service) {
379 OS::Print("vm-service: Shutdown.\n"); 379 OS::Print("vm-service: Shutdown.\n");
380 } 380 }
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 ASSERT(!result.IsNull()); 501 ASSERT(!result.IsNull());
502 Dart_Port port = ILLEGAL_PORT; 502 Dart_Port port = ILLEGAL_PORT;
503 if (result.IsReceivePort()) { 503 if (result.IsReceivePort()) {
504 port = ReceivePort::Cast(result).Id(); 504 port = ReceivePort::Cast(result).Id();
505 } 505 }
506 ASSERT(port != ILLEGAL_PORT); 506 ASSERT(port != ILLEGAL_PORT);
507 ServiceIsolate::SetServicePort(port); 507 ServiceIsolate::SetServicePort(port);
508 } 508 }
509 509
510 } // namespace dart 510 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/regexp_parser.cc ('k') | runtime/vm/snapshot.cc » ('j') | runtime/vm/thread.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698