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

Unified Diff: runtime/lib/mirrors.cc

Issue 1036393002: Mark the functions of closures generated to speed up getField/setField as invisible, just like othe… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/mirrors.cc
diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc
index 7fb8fd01a7a5afcdf9bf57686e15dd3e3d66185c..c4605cf2e031c2a80bbda8d1c550c8849210cb50 100644
--- a/runtime/lib/mirrors.cc
+++ b/runtime/lib/mirrors.cc
@@ -1238,6 +1238,17 @@ DEFINE_NATIVE_ENTRY(Mirrors_evalInLibraryWithPrivateKey, 2) {
Exceptions::PropagateError(Error::Cast(result));
UNREACHABLE();
}
+
+ // Because we currently only use this native for building field extractors and
+ // setters, assume the result is a closure and mark its function as invisible,
+ // so it will not appear in stack traces. Whenever we support
+ // ObjectMirror.evaluate this will need to be separated.
+ ASSERT(Instance::Cast(result).IsClosure());
+ const Function& func =
+ Function::Handle(Closure::function(Instance::Cast(result)));
+ func.set_is_visible(false);
+ func.set_is_debuggable(false);
+
return result.raw();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698