Commit 1705b7de authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[compiler] Remove obsolete guard in MarkForOptimization.

The guard in JSFunction::MarkForOptimization checking whether a function
is being debugged is overly protective. The compilation pipeline will
bailout itself in that circumstance. Having the runtime behave similar
makes sure the debugger observes a situation closer to reality.

R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/1900743003

Cr-Commit-Position: refs/heads/master@{#35625}
parent 5c1d2877
......@@ -11974,12 +11974,9 @@ bool JSFunction::Inlines(SharedFunctionInfo* candidate) {
void JSFunction::MarkForOptimization() {
Isolate* isolate = GetIsolate();
// Do not optimize if function contains break points.
if (shared()->HasDebugInfo()) return;
DCHECK(!IsOptimized());
DCHECK(shared()->allows_lazy_compilation() ||
!shared()->optimization_disabled());
DCHECK(!shared()->HasDebugInfo());
set_code_no_write_barrier(
isolate->builtins()->builtin(Builtins::kCompileOptimized));
// No write barrier required, since the builtin is part of the root set.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment