| 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);
|
|
|