Closed Bug 1367894 Opened 5 years ago Closed 5 years ago

Refactor the JSON Viewer stream converter

Categories

(DevTools :: JSON Viewer, defect)

defect
Not set
normal

Tracking

(firefox55 fixed)

RESOLVED FIXED
Firefox 55
Tracking Status
firefox55 --- fixed

People

(Reporter: Oriol, Assigned: Oriol)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch json-stream.patch (obsolete) — Splinter Review
The stream converter is completely buggy. This patch fixes

 - Bug 1364794, bug 1224071, bug 1327752, bug 1327753, and probably bug 1365804
   (big files became corrupted)
 - Bug 1364953 (NUL truncated the source)
 - Bug 1367881 (UTF-8 was not enforced)

(tests should be added in the respective bugs)

The problems are
 - With the approach I used, I couldn't find a simple way to trigger standards mode instead of quirks one. I thought about document.write("<!DOCTYPE html>") but that breaks various other things and gets so messy.
 - Adding the stylesheets at the end causes relayout. And the font-size changes, which is ugly. Maybe inserting a Link header could fix this.

I think it's worth it anyways, the problems can be addressed in other bugs.
Attachment #8871441 - Flags: review?(odvarko)
Forgot to fix eslint complaints.
Assignee: nobody → oriol-bugzilla
Attachment #8871441 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #8871441 - Flags: review?(odvarko)
Attachment #8871449 - Flags: review?(odvarko)
Comment on attachment 8871449 [details] [diff] [review]
json-stream.patch

Review of attachment 8871449 [details] [diff] [review]:
-----------------------------------------------------------------

This is excellent!

R+

Thanks for working on this.

Honza
Attachment #8871449 - Flags: review?(odvarko) → review+
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3c3ddcb925d1
Refactor the JSON Viewer stream converter. r=Honza
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/3c3ddcb925d1
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Blocks: 1260189
Depends on: 1368899
Blocks: 1378234
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.