<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>16607</bug_id>
          
          <creation_ts>2012-04-03 09:33:38 +0000</creation_ts>
          <short_desc>Errors in type conversion to nullable types</short_desc>
          <delta_ts>2012-04-06 08:50:57 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>WebIDL</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ms2ger">Ms2ger</reporter>
          <assigned_to name="Cameron McCormack">cam</assigned_to>
          <cc>mike</cc>
    
    <cc>public-script-coord</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>66358</commentid>
    <comment_count>0</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2012-04-03 09:33:38 +0000</bug_when>
    <thetext>The first step is

1. If V is undefined and the IDL type being converted to is DOMString?,
   then:
   1. If the conversion to an IDL value is being performed due to any
      of the following:
      ([TreatUndefinedAs])
      then:
      (do stuff)
2. Otherwise...

Which means nothing happens if [TreatUndefinedAs] isn&apos;t present; to allow for fallback, it should say something more like

1. If V is undefined, the IDL type being converted to is DOMString?, and
   the conversion to an IDL value is being performed due to any of the
   following, then:
   (do stuff)
2. Otherwise...


Step 1.1, first bullet: &quot;V is being passed as an operation argument that is annotated with the [TreatUndefinedAs],&quot;: s/the//


Step 2: &quot;Otherwise, if the result of calling IsCallable(V) is true, then:&quot; s/true/false/. Also, the same error as in step 1. (Note that this special case reinforces my points about TreatNonCallableAsNull.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66462</commentid>
    <comment_count>1</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2012-04-06 01:32:09 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; Which means nothing happens if [TreatUndefinedAs] isn&apos;t present; to allow for
&gt; fallback, it should say something more like
&gt; 
&gt; 1. If V is undefined, the IDL type being converted to is DOMString?, and
&gt;    the conversion to an IDL value is being performed due to any of the
&gt;    following, then:
&gt;    (do stuff)
&gt; 2. Otherwise...

Ah yes, good catch.

&gt; Step 1.1, first bullet: &quot;V is being passed as an operation argument that is
&gt; annotated with the [TreatUndefinedAs],&quot;: s/the//

Fixed.

&gt; Step 2: &quot;Otherwise, if the result of calling IsCallable(V) is true, then:&quot;
&gt; s/true/false/.

Fixed.

&gt; Also, the same error as in step 1.

Fixed.

&gt; (Note that this special case reinforces my points about
&gt; TreatNonCallableAsNull.)

Don&apos;t understand this, sorry.  Just that this is a special case, and we should try to minimise the number of special cases?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66472</commentid>
    <comment_count>2</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2012-04-06 08:50:57 +0000</bug_when>
    <thetext>Thanks.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>