Bug 58322 - Web Inspector: Web Page Performance auditing fails
Summary: Web Inspector: Web Page Performance auditing fails
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexander Pavlov (apavlov)
Depends on:
Reported: 2011-04-12 08:18 PDT by Alexander Pavlov (apavlov)
Modified: 2011-04-13 03:20 PDT (History)
10 users (show)

See Also:

[PATCH] Suggested fix (10.89 KB, patch)
2011-04-12 08:48 PDT, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff
[PATCH] DOMAgent.requestDocument() fixed (for pfeldman to have a look) (12.22 KB, patch)
2011-04-12 10:49 PDT, Alexander Pavlov (apavlov)
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pavlov (apavlov) 2011-04-12 08:18:37 PDT
1. Navigate to cnn.com and open inspector
2. Go to Audits tab and click on Run

What is the expected output? 
Auditing should finish and load the data

What do you see instead?
Auditing doesn't finish. If Web Page Performance is disabled, auditing is completed.
Auditing on google.com and yahoo.com works fine though.

Upstreaming Chromium issue http://code.google.com/p/chromium/issues/detail?id=78473
Comment 1 Alexander Pavlov (apavlov) 2011-04-12 08:48:46 PDT
Created attachment 89207 [details]
[PATCH] Suggested fix
Comment 2 Alexander Pavlov (apavlov) 2011-04-12 10:49:38 PDT
Created attachment 89227 [details]
[PATCH] DOMAgent.requestDocument() fixed (for pfeldman to have a look)
Comment 3 Pavel Feldman 2011-04-13 02:00:58 PDT
Comment on attachment 89227 [details]
[PATCH] DOMAgent.requestDocument() fixed (for pfeldman to have a look)

View in context: https://bugs.webkit.org/attachment.cgi?id=89227&action=review

> Source/WebCore/inspector/front-end/AuditRules.js:362
> +                    WebInspector.domAgent.querySelector(document.id, selectors[i], queryCallback.bind(null, i === selectors.length - 1 ? selectorsCallback.bind(null, callback, styleSheets, testedSelectors) : null, selectors[i], styleSheets, testedSelectors));

You should requestDocument within DOMAgent.js::querySelector instead. I thought Andrey has fixed it already - he had a patch pending.
Also I can't parse this string - you should extract variables for bound functions, etc.
Comment 4 Alexander Pavlov (apavlov) 2011-04-13 03:20:53 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
        M       LayoutTests/ChangeLog
        M       LayoutTests/inspector/audits/audits-panel-functional.html
        M       Source/WebCore/ChangeLog
        M       Source/WebCore/inspector/front-end/AuditRules.js
Committed r83716