New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 653138 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Dec 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Network.requestWillBeSent property 'type' is incorrectly marked as optional

Reported by alex...@gmail.com, Oct 5 2016

Issue description

Chrome Version       : 53.0.2785.116
URLs (if applicable) :chrome-devtools://devtools/bundled/inspector.html
Other browsers tested:
  Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
     Safari:
    Firefox:
         IE:

I'm trying to implement the hosting side of the Chrome debugging protocol but ran into an issue with the Network.requestWillBeSent event. Namely the property 'type' is marked as optional here: https://chromedevtools.github.io/debugger-protocol-viewer/tot/Network/#event-requestWillBeSent. But if you generate the event with an undefined 'type' the inspector will crash here: https://github.com/ChromeDevTools/devtools-frontend/blob/0b61e170bd26e287e957ac2c623e69c37f292b24/front_end/network/NetworkLogView.js#L1184

Adding the 'type' property fixes the crash. We would either make the property actually optional or mark it as required in the protocol.

Attaching a screenshot of the crash in the inspector.

 
Screenshot 2016-10-05 17.06.53.png
51.8 KB View Download
Owner: allada@chromium.org
Status: Assigned (was: Unconfirmed)
Thanks, I'll create a mock and run tests on the change to make sure this holds true through our tests then I'll investigate to ensure our back-end is actually always sending type.

Thanks!
Status: Started (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, Dec 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5a62ae3579981406e5e03ef55e5aa61b1d45bf27

commit 5a62ae3579981406e5e03ef55e5aa61b1d45bf27
Author: allada <allada@chromium.org>
Date: Fri Dec 02 03:59:41 2016

[Devtools] Fixed frontend to properly support optional requestWillBeSent

requestWillBeSent protocol has an optional flag of "resourceType",
however our frontend will error if it does not have it set.

R=dgozman,lushnikov,caseq
BUG= 653138 

Review-Url: https://codereview.chromium.org/2543113002
Cr-Commit-Position: refs/heads/master@{#435849}

[modify] https://crrev.com/5a62ae3579981406e5e03ef55e5aa61b1d45bf27/third_party/WebKit/Source/devtools/front_end/sdk/NetworkManager.js

Status: Fixed (was: Started)

Sign in to add a comment