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

Issue 626248 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Jul 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Network preview parses JavaScript incorrectly as JSON and messes it up

Project Member Reported by phistuck@gmail.com, Jul 7 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36

Steps to reproduce the problem:
1. Enter in the console -
fetch(`data:text/javascript,define({
    a : [0]
});`)
2. Go to the Network panel.
3. Click on the Preview tab.

What is the expected behavior?
define({    a : [0]});

What went wrong?
define({undefined: [0]});
 undefined: [0]
   0: 0

Did this work before? N/A 

Chrome version: 51.0.2704.84  Channel: n/a
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 21.0 r0
 
Components: -Platform>DevTools Platform>DevTools>Network
Status: Untriaged (was: Unconfirmed)
Owner: allada@chromium.org
Status: WontFix (was: Untriaged)
The JSON parser used in network panel was changed a couple months ago and has not hit stable yet. Although it does not do exactly what you may expect it does display what it thinks the JSON is properly.

We purposely try to extract JSON looking text out of cases like this because that is what we think the user would likely want to see. If the text length before the json-looking part is to large it will default back to a text view, otherwise it will try to display it as JSON (assuming the parser does not fail).

Please see the behavior on Canary or Dev channel. I am going to close this issue, if you feel strongly about this behavior please feel free to respond back.

Thanks!

Comment 3 by phistuck@gmail.com, Jul 7 2016

Oops. I tried one of the cases in  issue 598390  and it showed a proper preview, I think, so I mistakenly assumed it reached stable for some reason.

Sorry for the noise. I see it works fine (I did not have access to the canary earlier today).

Sign in to add a comment