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

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

Issue 1473403003: Move ApiLocalScope out of class ApiState into class Thread so that the API local handles and zone e… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code-review-patch Created 5 years 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/debugger_api_impl.cc ('k') | runtime/vm/mirrors_api_impl.cc » ('j') | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/isolate.h" 5 #include "vm/isolate.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "include/dart_native_api.h" 8 #include "include/dart_native_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/json.h" 10 #include "platform/json.h"
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 if ((exception == I->object_store()->out_of_memory()) || 627 if ((exception == I->object_store()->out_of_memory()) ||
628 (exception == I->object_store()->stack_overflow())) { 628 (exception == I->object_store()->stack_overflow())) {
629 // We didn't notify the debugger when the stack was full. Do it now. 629 // We didn't notify the debugger when the stack was full. Do it now.
630 I->debugger()->SignalExceptionThrown(Instance::Handle(exception)); 630 I->debugger()->SignalExceptionThrown(Instance::Handle(exception));
631 } 631 }
632 } 632 }
633 633
634 // Invoke the isolate's unhandled exception callback if there is one. 634 // Invoke the isolate's unhandled exception callback if there is one.
635 if (Isolate::UnhandledExceptionCallback() != NULL) { 635 if (Isolate::UnhandledExceptionCallback() != NULL) {
636 Dart_EnterScope(); 636 Dart_EnterScope();
637 Dart_Handle error = Api::NewHandle(I, result.raw()); 637 Dart_Handle error = Api::NewHandle(T, result.raw());
638 (Isolate::UnhandledExceptionCallback())(error); 638 (Isolate::UnhandledExceptionCallback())(error);
639 Dart_ExitScope(); 639 Dart_ExitScope();
640 } 640 }
641 641
642 // Generate the error and stacktrace strings for the error message. 642 // Generate the error and stacktrace strings for the error message.
643 String& exc_str = String::Handle(T->zone()); 643 String& exc_str = String::Handle(T->zone());
644 String& stacktrace_str = String::Handle(T->zone()); 644 String& stacktrace_str = String::Handle(T->zone());
645 if (result.IsUnhandledException()) { 645 if (result.IsUnhandledException()) {
646 Zone* zone = T->zone(); 646 Zone* zone = T->zone();
647 const UnhandledException& uhe = UnhandledException::Cast(result); 647 const UnhandledException& uhe = UnhandledException::Cast(result);
(...skipping 1910 matching lines...) Expand 10 before | Expand all | Expand 10 after
2558 } 2558 }
2559 2559
2560 2560
2561 RawInstance* IsolateSpawnState::BuildMessage(Thread* thread) { 2561 RawInstance* IsolateSpawnState::BuildMessage(Thread* thread) {
2562 return DeserializeObject(thread, 2562 return DeserializeObject(thread,
2563 serialized_message_, serialized_message_len_); 2563 serialized_message_, serialized_message_len_);
2564 } 2564 }
2565 2565
2566 2566
2567 } // namespace dart 2567 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/debugger_api_impl.cc ('k') | runtime/vm/mirrors_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698