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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 10871005: Make ClassFinalizer indifferent on whether we are generating a snapshot or not. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/dart_api_impl.cc
===================================================================
--- runtime/vm/dart_api_impl.cc (revision 11113)
+++ runtime/vm/dart_api_impl.cc (working copy)
@@ -88,9 +88,8 @@
const char* CheckIsolateState(Isolate* isolate, bool generating_snapshot) {
bool success = true;
if (!ClassFinalizer::AllClassesFinalized()) {
- success = (generating_snapshot) ?
- ClassFinalizer::FinalizePendingClassesForSnapshotCreation() :
- ClassFinalizer::FinalizePendingClasses();
+ ClassFinalizer class_finalizer(generating_snapshot);
+ success = class_finalizer.FinalizePendingClasses();
}
if (success) {
success = isolate->object_store()->PreallocateObjects();
@@ -3727,7 +3726,8 @@
const Script& script =
Script::Handle(isolate, Script::New(url, source, kind));
ASSERT(isolate != NULL);
- const Error& error = Error::Handle(isolate, Compiler::Compile(lib, script));
+ const Error& error = Error::Handle(isolate, Compiler::Compile(
+ lib, script, ClassFinalizer::kNotGeneratingSnapshot));
if (error.IsNull()) {
*result = Api::NewHandle(isolate, lib.raw());
if (update_lib_status) {

Powered by Google App Engine
This is Rietveld 408576698