[Webkit-unassigned] [Bug 60622] getUserMedia() should not throw when successCallback is undefined or null

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 30 09:35:02 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=60622





--- Comment #3 from Darin Adler <darin at apple.com>  2011-05-30 09:35:02 PST ---
To be precise:

    1) For functions built in to language, JavaScript makes no distinction between undefined arguments and missing arguments. Any arguments omitted are simply set to undefined.

    2) For DOM functions, WebKit originally did the same, never checking numbers of arguments, and checking for the undefined value to handle missing arguments. But Mozilla has always checked numbers of arguments, and this different choice in the WebKit DOM has been controversial and is a possible source of incompatibilities between the browser engines. The JavaScript runtime does allow functions to tell the difference between actual undefined arguments and arguments that are missing.

    3) The value null is not involved in this. It is a separate value, not the same as undefined, and unrelated to missing arguments. The only connection to null is that it's common to handle both null and undefined in the same way in a function implementation.

Hope this explanation helps.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list