RESOLVED FIXED Bug 33982
Add BlobConstructor to DOMWindow
https://bugs.webkit.org/show_bug.cgi?id=33982
Summary Add BlobConstructor to DOMWindow
Jian Li
Reported 2010-01-21 17:56:01 PST
We need to add BlobConstructor to DOMWindow.
Attachments
Proposed Patch (4.97 KB, patch)
2010-01-22 09:56 PST, Jian Li
darin: review+
jianli: commit-queue-
Jian Li
Comment 1 2010-01-22 09:56:02 PST
Created attachment 47209 [details] Proposed Patch
Darin Adler
Comment 2 2010-01-22 10:16:32 PST
Comment on attachment 47209 [details] Proposed Patch It doesn't seem right that File and Blog have the same prototype.
Jian Li
Comment 3 2010-01-22 10:42:34 PST
(In reply to comment #2) > (From update of attachment 47209 [details]) > It doesn't seem right that File and Blog have the same prototype. Thank you for pointing out this. Do you know what causes this problem? Should I make custom constructor?
Dmitry Titov
Comment 4 2010-01-22 12:21:40 PST
The reason the test has the output that appears to mean File and Blob have the same prototype is because it marks already-enumerated prototype objects by adding a property to them. Since File is derived from Blob, there is a chain of prototypes. If the Blob prototype is enumerated by the test earlier, the query on the File prototype will yield the same property value, even though the actual prototype object is different. To illustrate: window.Blob.prototype.foo = 153; alert(window.File.prototype.foo) <-- outputs '153' however: window.File.prototype.foo = 153; alert(window.Blob.prototype.foo) <-- outputs 'undefined' This test already does the same for all Element-derived types, like this: window.HTMLAnchorElement.prototype [printed above as window.Element.prototype]
Jian Li
Comment 5 2010-01-22 13:41:00 PST
The infinite recursion detection logic in this layout test is broken. I have filed a new bug (https://bugs.webkit.org/show_bug.cgi?id=34018) for this issue. For this patch, I would rather keep the current behavior. So I reactivate this patch.
Jian Li
Comment 6 2010-01-22 15:04:31 PST
Note You need to log in before you can comment on or make changes to this bug.