fix(benchpress): fix benchpress overreporting in chrome45

closes #4011

Closes #4101
This commit is contained in:
Michael Goderbauer 2015-09-09 13:40:31 -07:00 committed by Michael Goderbauer
parent 77e8304fc4
commit 0653b82048
2 changed files with 13 additions and 1 deletions

View File

@ -183,7 +183,8 @@ export class ChromeDriverExtension extends WebDriverExtension {
return normalizeEvent(event, {'name': 'gc', 'args': normArgs});
} else if (this._isEvent(categories, name, ['devtools.timeline', 'v8'], 'FunctionCall') &&
(isBlank(args) || isBlank(args['data']) ||
!StringWrapper.equals(args['data']['scriptName'], 'InjectedScript'))) {
(!StringWrapper.equals(args['data']['scriptName'], 'InjectedScript') &&
!StringWrapper.equals(args['data']['scriptName'], '')))) {
return normalizeEvent(event, {'name': 'script'});
} else if (this._isEvent(categories, name, ['devtools.timeline', 'blink'],
'UpdateLayoutTree')) {

View File

@ -342,6 +342,17 @@ export function main() {
});
}));
it('should ignore FunctionCalls with empty scriptName',
inject([AsyncTestCompleter], (async) => {
createExtension(
[chromeTimelineV8Events.start('FunctionCall', 0, {'data': {'scriptName': ''}})])
.readPerfLog()
.then((events) => {
expect(events).toEqual([]);
async.done();
});
}));
});