Index: src/runtime-profiler.cc |
diff --git a/src/runtime-profiler.cc b/src/runtime-profiler.cc |
index 520dd3989018b99903ad2cf8dca8206682e26bb3..eaa6e15603a7e94f5a021d46ae468c64efdbab78 100644 |
--- a/src/runtime-profiler.cc |
+++ b/src/runtime-profiler.cc |
@@ -136,14 +136,13 @@ void RuntimeProfiler::AttemptOnStackReplacement(JSFunction* function) { |
// Get the stack check stub code object to match against. We aren't |
// prepared to generate it, but we don't expect to have to. |
StackCheckStub check_stub; |
- Object* check_code; |
- MaybeObject* maybe_check_code = check_stub.TryGetCode(); |
- if (maybe_check_code->ToObject(&check_code)) { |
+ Code* stack_check_code = NULL; |
+ if (check_stub.FindCodeInCache(&stack_check_code)) { |
Code* replacement_code = |
isolate_->builtins()->builtin(Builtins::kOnStackReplacement); |
Code* unoptimized_code = shared->code(); |
Deoptimizer::PatchStackCheckCode(unoptimized_code, |
- Code::cast(check_code), |
+ stack_check_code, |
replacement_code); |
} |
} |