RESOLVED FIXED 55939
Web Inspector: resource errors are not reported before front-end is opened
https://bugs.webkit.org/show_bug.cgi?id=55939
Summary Web Inspector: resource errors are not reported before front-end is opened
Andrey Kosyakov
Reported Tuesday, March 8, 2011 3:11:03 PM UTC
1. run Tools/Scripts/run-webkit-tests 2. Navigate to http://localhost:8000/inspector/console-resource-errors.html 3. Open WebInspector 4. Observe console is empty 5. reload 6. Observe resource errors are logged to console
Attachments
patch (4.16 KB, patch)
2011-03-08 08:28 PST, Andrey Kosyakov
pfeldman: review-
pfeldman: commit-queue-
patch (3.87 KB, patch)
2011-03-09 02:10 PST, Andrey Kosyakov
no flags
patch (3.89 KB, patch)
2011-03-09 04:42 PST, Andrey Kosyakov
pfeldman: review+
pfeldman: commit-queue-
Andrey Kosyakov
Comment 1 Tuesday, March 8, 2011 4:28:30 PM UTC
Alexey Proskuryakov
Comment 2 Tuesday, March 8, 2011 6:33:52 PM UTC
Could this have been done for performance reasons?
Andrey Kosyakov
Comment 3 Tuesday, March 8, 2011 7:39:49 PM UTC
(In reply to comment #2) > Could this have been done for performance reasons? I don't think we have much to spare there, considering the overhead of resource load. As long as we're sotring other error messages with no inspector front-end, I don't see why we shouldn't save resource errors. I think this used to work up until recently, so it must be just a bug.
Pavel Feldman
Comment 4 Tuesday, March 8, 2011 8:34:20 PM UTC
Comment on attachment 85051 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=85051&action=review > Source/WebCore/inspector/InspectorInstrumentation.cpp:441 > + if (hasFrontends()) { Timeline agent does not exist outside front-end lifetime. > Source/WebCore/inspector/InspectorInstrumentation.cpp:454 > + if (!hasFrontends()) Same for resource agent. What you should do is look up appropriate InspectorAgent instance and make consoleAgent call on it. > Source/WebCore/inspector/InspectorInstrumentation.h:674 > + if (cookie.first) We want to make sure that instrumentation is a no-op while there is no front-end. There are exceptional cases such as resource error reporting that should be handled manually.
Andrey Kosyakov
Comment 5 Wednesday, March 9, 2011 10:10:22 AM UTC
Created attachment 85148 [details] patch - call didReceiveResourceResponseImpl() unconditionally, retrieve agent from loader's frame if missing in cookie - also fixed didFailLoding
Andrey Kosyakov
Comment 6 Wednesday, March 9, 2011 12:42:54 PM UTC
Andrey Kosyakov
Comment 7 Wednesday, March 9, 2011 2:51:38 PM UTC
Note You need to log in before you can comment on or make changes to this bug.