WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
55764
Web Inspector: resource load cancellation is reported to console as an error
https://bugs.webkit.org/show_bug.cgi?id=55764
Summary
Web Inspector: resource load cancellation is reported to console as an error
Andrey Kosyakov
Reported
2011-03-04 04:19:02 PST
1. go to
https://chrome.google.com/extensions
2. open js console 3. click "install" See the "failure to load resource" message Original bug report:
http://code.google.com/p/chromium/issues/detail?id=62888
Attachments
patch
(3.36 KB, patch)
2011-03-04 06:10 PST
,
Andrey Kosyakov
ap
: review-
Details
Formatted Diff
Diff
patch
(10.42 KB, patch)
2011-03-09 12:20 PST
,
Andrey Kosyakov
no flags
Details
Formatted Diff
Diff
patch (fixed binary diff)
(10.38 KB, patch)
2011-03-10 06:53 PST
,
Andrey Kosyakov
pfeldman
: review+
pfeldman
: commit-queue-
Details
Formatted Diff
Diff
landed patch
(11.49 KB, patch)
2011-03-11 01:35 PST
,
Andrey Kosyakov
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Andrey Kosyakov
Comment 1
2011-03-04 06:10:57 PST
Created
attachment 84735
[details]
patch
Pavel Feldman
Comment 2
2011-03-06 11:11:20 PST
Comment on
attachment 84735
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=84735&action=review
> Source/WebCore/loader/MainResourceLoader.cpp:122 > + error.setIsCancellation(true);
I am not sure what this would result in. You should call for more reviewers. Adding ap for now.
Alexey Proskuryakov
Comment 3
2011-03-06 17:35:09 PST
Good question. I spent a couple of minutes looking into this, and couldn't easily answer if this this is OK - Safari uses PolicyIgnore in many cases. Will look again later. How does this affect
bug 43614
and
bug 38346
? Can this be tested? See fast/loader/onload-policy-ignore-for-frame.html for an example of policy delegate test.
Alexey Proskuryakov
Comment 4
2011-03-07 14:39:23 PST
Comment on
attachment 84735
[details]
patch I think that this change is acceptable. It's a mess how WebCore decides what a cancellation is, but this is not making it worse. However, I have one more question in addition to ones in
comment 3
. Why does ResourceLoader::didCancel() even call didFailToLoad()? Besides logging an error to Inspector, that also calls FrameLoaderClient::dispatchDidFailLoading(), and that also looks wrong at a first glance. If there is some historic reason, there should probably be a comment. Since this needs more work (at least a test), I'm marking r- for now.
Alexey Proskuryakov
Comment 5
2011-03-07 14:43:10 PST
+ - fixed error formatting in case resource error code not present I've noticed that error is completely broken in Safari nightlies when installing a Safari extension from a local file: GET file:///Users/ap/Downloads/AdBlockForSafari.safariextz undefined (undefined) In Safari 5.0.3, it's: Failed to load resource: Загрузка фрейма прервана Should I file a separate bug about that? Clearly, we shouldn't report any error, but could this be a general problem with console logging?
Andrey Kosyakov
Comment 6
2011-03-09 12:18:54 PST
(In reply to
comment #5
)
> + - fixed error formatting in case resource error code not present > > I've noticed that error is completely broken in Safari nightlies when installing a Safari extension from a local file: > > GET file:///Users/ap/Downloads/AdBlockForSafari.safariextz undefined (undefined) > > In Safari 5.0.3, it's: > > Failed to load resource: Загрузка фрейма прервана > > Should I file a separate bug about that? Clearly, we shouldn't report any error, but could this be a general problem with console logging?
I don't think this is worth an additional bug -- this change fixes both the error message format in case there's no error code (see the diff for ConsoleView.js) and reporting cancellation as an error. Thanks for mentioning
bug 43614
and
bug 38346
-- unfortunately I missed them. The latter is fixed by this change, and as for the former -- well, the poor "canceled" message is gone with this change, and someone else apparently added (brought back?) proper diagnostics -- so this does not reproduce anymore (I added a test for that).
> However, I have one more question in addition to ones in
comment 3
. > Why does ResourceLoader::didCancel() even call didFailToLoad()? > Besides logging an error to Inspector, that also calls FrameLoaderClient::dispatchDidFailLoading(), and that also looks wrong at a first glance. > If there is some historic reason, there should probably be a comment.
Well, my guess would be that this is indeed historical, probably done for the lack of separate notification method for cancel in FrameLoaderClient. While this looks like a misnomer to me, having one method for both cancel and fail is probably appropriate, since for most of the clients handling of an aborted request is perhaps similar no matter whether the reason is cancellation or early failure.
Andrey Kosyakov
Comment 7
2011-03-09 12:20:28 PST
Created
attachment 85214
[details]
patch - added a test for lack of console errors in case of policy change - added a test for cross-origin XHR error - rebaselined
Alexey Proskuryakov
Comment 8
2011-03-09 13:14:21 PST
OK, thanks for the investigation! Please do resolve the other bugs as appropriate.
Andrey Kosyakov
Comment 9
2011-03-10 06:53:22 PST
Created
attachment 85318
[details]
patch (fixed binary diff) Well, if everyone is happy, does anyone mind r+'ing this? ;-)
Andrey Kosyakov
Comment 10
2011-03-10 06:55:47 PST
***
Bug 43614
has been marked as a duplicate of this bug. ***
Pavel Feldman
Comment 11
2011-03-10 12:34:42 PST
Comment on
attachment 85318
[details]
patch (fixed binary diff) View in context:
https://bugs.webkit.org/attachment.cgi?id=85318&action=review
Please address my comment prior to landing.
> Source/WebCore/inspector/front-end/ConsoleView.js:726 > + else if (resource.statusCode)
You should make sure InspectorInstrumentation marks resources as failed prior to reporting error to the console. Then you can revert this change.
Andrey Kosyakov
Comment 12
2011-03-11 01:35:41 PST
Created
attachment 85447
[details]
landed patch
Andrey Kosyakov
Comment 13
2011-03-11 01:36:39 PST
Manually committed
r80832
:
http://trac.webkit.org/changeset/80832
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug