Commit 5833e777 authored by yangguo's avatar yangguo Committed by Commit bot

[debug] fix coverage for non-default test variants.

R=jgruber@chromium.org
BUG=v8:6165

Review-Url: https://codereview.chromium.org/2794443002
Cr-Commit-Position: refs/heads/master@{#44329}
parent 2474b734
...@@ -159,15 +159,16 @@ Coverage* Coverage::Collect(Isolate* isolate, ...@@ -159,15 +159,16 @@ Coverage* Coverage::Collect(Isolate* isolate,
count = 1; count = 1;
break; break;
} }
} else if (nesting.empty() || functions->at(nesting.back()).count == 0) { }
// Only include a function range if it has a non-0 count, or // Only include a function range if it has a non-0 count, or
// if it is directly nested inside a function with non-0 count. // if it is directly nested inside a function with non-0 count.
continue; if (count != 0 ||
} (!nesting.empty() && functions->at(nesting.back()).count != 0)) {
Handle<String> name(info->DebugName(), isolate); Handle<String> name(info->DebugName(), isolate);
nesting.push_back(functions->size()); nesting.push_back(functions->size());
functions->emplace_back(start, end, count, name); functions->emplace_back(start, end, count, name);
} }
}
// Remove entries for scripts that have no coverage. // Remove entries for scripts that have no coverage.
if (functions->empty()) result->pop_back(); if (functions->empty()) result->pop_back();
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --allow-natives-syntax // Flags: --allow-natives-syntax --no-always-opt --crankshaft
var source = var source =
` `
......
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
############################################################################## ##############################################################################
['variant != default', { ['variant != default', {
# Issue 6165.
'cpu-profiler/coverage': [PASS, FAIL],
# Issue 6166. # Issue 6166.
'debugger/asm-js-breakpoint-during-exec': [PASS, FAIL], 'debugger/asm-js-breakpoint-during-exec': [PASS, FAIL],
'debugger/asm-js-stack': [PASS, FAIL], 'debugger/asm-js-stack': [PASS, FAIL],
......
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