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

Unified Diff: runtime/vm/parser.cc

Issue 17503002: Stop unwanted class finalization when using dart:io HttpClient from builtin.dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/isolate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index ac0a9721886b71039d1bcac0fa912debf81ae9d5..16dc59442ffa62d7004f62bac86d6bcc5cf99f98 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -4378,9 +4378,13 @@ RawObject* Parser::CallLibraryTagHandler(Dart_LibraryTag tag,
}
ErrorMsg(token_pos, "no library handler registered");
}
+ // Block class finalization attempts when calling into the library
+ // tag handler.
+ isolate()->BlockClassFinalization();
Dart_Handle result = handler(tag,
Api::NewHandle(isolate(), library_.raw()),
Api::NewHandle(isolate(), url.raw()));
+ isolate()->UnblockClassFinalization();
if (Dart_IsError(result)) {
// In case of an error we append an explanatory error message to the
// error obtained from the library tag handler.
« no previous file with comments | « runtime/vm/isolate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698