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

Unified Diff: src/objects.cc

Issue 21593002: Propagate bailout reason to cpu profile node. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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 | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 2e9badbb2aa073a3eb684b201fab60cec913ec68..afa8bce451b8dd0d3b285b8afa4b144c25059549 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -9813,6 +9813,13 @@ void SharedFunctionInfo::DisableOptimization(const char* reason) {
// non-optimizable if optimization is disabled for the shared
// function info.
set_optimization_disabled(true);
+ MaybeObject* reason_object =
+ Isolate::Current()->heap()->AllocateStringFromOneByte(
+ CStrVector(reason));
+ String* reason_string;
+ if (reason_object->To<String>(&reason_string)) {
+ set_bailout_reason(reason_string);
+ }
// Code should be the lazy compilation stub or else unoptimized. If the
// latter, disable optimization for the code too.
ASSERT(code()->kind() == Code::FUNCTION || code()->kind() == Code::BUILTIN);
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698