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

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

Issue 1168933002: Fixes crashes in VM isolate shutdown. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Add asserts Created 5 years, 6 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) 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 "include/dart_api.h" 5 #include "include/dart_api.h"
6 #include "include/dart_mirrors_api.h" 6 #include "include/dart_mirrors_api.h"
7 #include "include/dart_native_api.h" 7 #include "include/dart_native_api.h"
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 5474 matching lines...) Expand 10 before | Expand all | Expand 10 after
5485 Dart_Handle state = Api::CheckAndFinalizePendingClasses(isolate); 5485 Dart_Handle state = Api::CheckAndFinalizePendingClasses(isolate);
5486 if (::Dart_IsError(state)) { 5486 if (::Dart_IsError(state)) {
5487 return state; 5487 return state;
5488 } 5488 }
5489 5489
5490 // Now that the newly loaded classes are finalized, notify the debugger 5490 // Now that the newly loaded classes are finalized, notify the debugger
5491 // that new code has been loaded. If there are latent breakpoints in 5491 // that new code has been loaded. If there are latent breakpoints in
5492 // the new code, the debugger convert them to unresolved source breakpoints. 5492 // the new code, the debugger convert them to unresolved source breakpoints.
5493 // The code that completes the futures (invoked below) may call into the 5493 // The code that completes the futures (invoked below) may call into the
5494 // newly loaded code and trigger one of these breakpoints. 5494 // newly loaded code and trigger one of these breakpoints.
5495 ASSERT(isolate->debugger() != NULL);
5495 isolate->debugger()->NotifyDoneLoading(); 5496 isolate->debugger()->NotifyDoneLoading();
5496 5497
5497 // Notify mirrors that MirrorSystem.libraries needs to be recomputed. 5498 // Notify mirrors that MirrorSystem.libraries needs to be recomputed.
5498 const Library& libmirrors = 5499 const Library& libmirrors =
5499 Library::Handle(isolate, Library::MirrorsLibrary()); 5500 Library::Handle(isolate, Library::MirrorsLibrary());
5500 const Field& dirty_bit = Field::Handle(isolate, 5501 const Field& dirty_bit = Field::Handle(isolate,
5501 libmirrors.LookupLocalField(String::Handle(String::New("dirty")))); 5502 libmirrors.LookupLocalField(String::Handle(String::New("dirty"))));
5502 ASSERT(!dirty_bit.IsNull() && dirty_bit.is_static()); 5503 ASSERT(!dirty_bit.IsNull() && dirty_bit.is_static());
5503 dirty_bit.set_value(Bool::True()); 5504 dirty_bit.set_value(Bool::True());
5504 5505
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
5606 5607
5607 5608
5608 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( 5609 DART_EXPORT void Dart_RegisterRootServiceRequestCallback(
5609 const char* name, 5610 const char* name,
5610 Dart_ServiceRequestCallback callback, 5611 Dart_ServiceRequestCallback callback,
5611 void* user_data) { 5612 void* user_data) {
5612 Service::RegisterRootEmbedderCallback(name, callback, user_data); 5613 Service::RegisterRootEmbedderCallback(name, callback, user_data);
5613 } 5614 }
5614 5615
5615 } // namespace dart 5616 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/dart_entry.cc » ('j') | runtime/vm/debugger_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698