Closed Bug 1115214 Opened 9 years ago Closed 9 years ago

[Fetch] GlobalFetch.fetch() and read body methods make crash for Maple

Categories

(Core :: DOM: Core & HTML, defect)

36 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38

People

(Reporter: crimsteam, Assigned: nsm)

References

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0
Build ID: 20141125180439

Steps to reproduce:

Continuation of https://bugzilla.mozilla.org/show_bug.cgi?id=1109574#c4

I noticed that using fetch() method in Maple version make some crash. This happen when I use some url (even in the same origin) and try read body. I don't get crash when using exactly the same page where run code (via passing empty string). You can check this through attached file. 

This problem is more painful for local file (file://) where passing empty string will always crash browser.
Attachment #8541020 - Attachment description: This file will crash Maple → This file will not crash Maple (empty string)
Attachment #8541023 - Attachment description: This file will crash Maple (empty string) → This file will crash Maple (different origins)
Mikhail, can you take a look?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(nsm.nikhil)
Thanks for pointing this out!
The problem was that on the main thread, a response with no body would go through the consume body steps synchronously, leading to mConsumePromise being null by the time it was returned from ConsumeBody().
Assignee: nobody → nsm.nikhil
Status: NEW → ASSIGNED
Flags: needinfo?(nsm.nikhil)
Comment on attachment 8541100 [details] [diff] [review]
Fetch API: Always consume body asynchronously

Andrea, this is based of the Basic HTTP fetch patch.
Attachment #8541100 - Flags: review?(amarchesini)
Attachment #8541100 - Flags: review?(amarchesini) → review+
https://hg.mozilla.org/mozilla-central/rev/43843a529109
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: