Last Comment Bug 769119 - new Blob([], null/undefined); shouldn't throw
: new Blob([], null/undefined); shouldn't throw
Status: RESOLVED FIXED
: dev-doc-complete
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla16
Assigned To: Masatoshi Kimura [:emk]
:
Mentors:
http://lists.w3.org/Archives/Public/p...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-27 18:23 PDT by Masatoshi Kimura [:emk]
Modified: 2014-12-28 07:27 PST (History)
5 users (show)
Ms2ger: in‑testsuite+
Ms2ger: in‑litmus-
Ms2ger: in‑moztrap-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Bug 769119 - Treat null or undefined as an empty dictionary (2.52 KB, patch)
2012-06-28 11:17 PDT, Masatoshi Kimura [:emk]
no flags Details | Diff | Splinter Review
Bug 769119 - Treat null or undefined as an empty dictionary (4.54 KB, patch)
2012-06-28 12:58 PDT, Masatoshi Kimura [:emk]
jonas: review+
Details | Diff | Splinter Review

Description Masatoshi Kimura [:emk] 2012-06-27 18:23:32 PDT
The Web IDL spec has been updated so that null or empty is treated as an empty dictionary.
Comment 1 Masatoshi Kimura [:emk] 2012-06-27 18:43:40 PDT
> null or empty is treated
Correction: null or undefined is treated
Comment 2 Boris Zbarsky [:bz] 2012-06-27 19:47:13 PDT
We just need to switch Blob to WebIDL bindings.  Then it would automatically pick up fixes like this...
Comment 3 Boris Zbarsky [:bz] 2012-06-27 19:47:50 PDT
But I guess in the meantime we can update the old dictionary code to work with undefined and null?
Comment 4 Masatoshi Kimura [:emk] 2012-06-28 11:17:23 PDT
Created attachment 637601 [details] [diff] [review]
Bug 769119 - Treat null or undefined as an empty dictionary

Yeah, I believe this patch will suffice for a temporary solution until moving to New bindings.
Comment 5 Olli Pettay [:smaug] 2012-06-28 11:54:55 PDT
Could you add some tests for event ctors too.
Put them to content/events/test/test_eventctors.html
Comment 6 Masatoshi Kimura [:emk] 2012-06-28 12:58:28 PDT
Created attachment 637644 [details] [diff] [review]
Bug 769119 - Treat null or undefined as an empty dictionary

Added tests for event ctors.
Comment 8 Ryan VanderMeulen [:RyanVM] 2012-06-30 12:40:49 PDT
https://hg.mozilla.org/mozilla-central/rev/82de1c252339

Note You need to log in before you can comment on or make changes to this bug.