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

Unified Diff: runtime/vm/object.cc

Issue 1107663002: Fix http://dartbug.com/23290 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 8 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/flow_graph_inliner.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 45386)
+++ runtime/vm/object.cc (working copy)
@@ -5096,8 +5096,10 @@
void Function::SwitchToUnoptimizedCode() const {
ASSERT(HasOptimizedCode());
- Isolate* isolate = Isolate::Current();
- const Code& current_code = Code::Handle(isolate, CurrentCode());
+ Thread* thread = Thread::Current();
+ Isolate* isolate = thread->isolate();
+ Zone* zone = thread->zone();
+ const Code& current_code = Code::Handle(zone, CurrentCode());
if (FLAG_trace_deoptimization_verbose) {
OS::Print("Disabling optimized code: '%s' entry: %#" Px "\n",
@@ -5106,9 +5108,13 @@
}
// Patch entry of the optimized code.
CodePatcher::PatchEntry(current_code);
- Compiler::EnsureUnoptimizedCode(Thread::Current(), *this);
- AttachCode(Code::Handle(isolate, unoptimized_code()));
- CodePatcher::RestoreEntry(Code::Handle(isolate, unoptimized_code()));
+ const Error& error = Error::Handle(zone,
+ Compiler::EnsureUnoptimizedCode(thread, *this));
+ if (!error.IsNull()) {
+ Exceptions::PropagateError(error);
+ }
+ AttachCode(Code::Handle(zone, unoptimized_code()));
+ CodePatcher::RestoreEntry(Code::Handle(zone, unoptimized_code()));
isolate->TrackDeoptimizedCode(current_code);
}
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698