Network preview parses JavaScript incorrectly as JSON and messes it up |
||
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
,
Jul 7 2016
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!
,
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 |
||
Comment 1 by phistuck@chromium.org
, Jul 7 2016Status: Untriaged (was: Unconfirmed)