Debugger can't pretty-print script used several times on the page

NEW
Unassigned

Status

()

Firefox
Developer Tools: Debugger
P2
normal
2 years ago
2 years ago

People

(Reporter: arni2033, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(firefox48 affected)

Details

User Story

>>>   My Info:   Win7_64, Nightly 49, 32bit, ID 20160526082509

STR_1:
1. Open url [1] or https://russian.rt.com/article/141671 in a new tab
2. Open debugger, select script "showad.js", click button to prettify script.

STR_2:
1. Open url [2] in a new tab (script from my dropbox)
2. Open debugger, click button to prettify script.

> [1] data:text/html,<script src="https://ads.pubmatic.com/AdServer/js/showad.js"></script><iframe src="https://ads.pubmatic.com/AdServer/js/showad.js"></iframe>
> [2] data:text/html,<script src="https://dl.dropboxusercontent.com/s/vfyqkyxwtbvo5c3/script 2 - showad.js"></script><iframe src="https://dl.dropboxusercontent.com/s/vfyqkyxwtbvo5c3/script 2 - showad.js"></iframe>


AR:  The script isn't prettified
ER:  Pretty-print should not be broken.

Note: The same script can be pretty-printed in Scratchpad and even in debugger, if I remove <iframe>
____

Attachments

(1 attachment, 1 obsolete attachment)

37.62 KB, text/html
Details
Comment hidden (obsolete)
Comment hidden (spam)
(Reporter)

Comment 2

2 years ago
I attached the JS-file (just in case)
Oh great, another pretty printing corner case :-(

This should be fixed soon, but we have a lot on our plate right now, and pretty printing is not our top priority. Assigning P2 to this.
Priority: -- → P2
(Reporter)

Updated

2 years ago
Attachment #8733541 - Attachment mime type: application/x-javascript → text/html
Comment hidden (spam)
(Reporter)

Updated

2 years ago
Attachment #8767284 - Attachment mime type: text/html → text/javascript
(Reporter)

Updated

2 years ago
Attachment #8733541 - Attachment is obsolete: true
(Reporter)

Comment 5

2 years ago
Comment on attachment 8767284 [details]
script 2 - showad.js

Okay. Sorry for bug spam, but it appeared that I made a mistake while saving+attaching JS-file.

I attached the actual file "script 2", but it's not possible reproduce this bug using "data:" url with attached script (in the same manner as "data:" url in comment 0). That's because to reproduce this, you need a script which has Content-Type:"text/html" and url that ends with ".js", otherwise you'll run into bug 1224654. I'll try to create testcase once again, and update this bug if I succeed
Attachment #8767284 - Attachment mime type: text/javascript → text/html
(Reporter)

Updated

2 years ago
User Story: (updated)
(Reporter)

Updated

2 years ago
User Story: (updated)
You need to log in before you can comment on or make changes to this bug.