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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>15520</bug_id>
          
          <creation_ts>2007-10-15 11:21:04 -0700</creation_ts>
          <short_desc>alert(undefined) should say &quot;undefined&quot; in the alert</short_desc>
          <delta_ts>2007-10-17 10:14:59 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore JavaScript</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>Trivial</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Darin Adler">darin</reporter>
          <assigned_to name="Darin Adler">darin</assigned_to>
          <cc>mitz</cc>
    
    <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>58590</commentid>
    <comment_count>0</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2007-10-15 11:21:04 -0700</bug_when>
    <thetext>I tested other browsers, and alert(undefined) should not say &quot;&quot;, it should say &quot;undefined&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58703</commentid>
    <comment_count>1</comment_count>
    <who name="">mitz</who>
    <bug_when>2007-10-16 23:50:12 -0700</bug_when>
    <thetext>This was fixed in &lt;http://trac.webkit.org/projects/webkit/changeset/26616&gt;.

That patch also changed the behavior of &quot;alert()&quot; and &quot;prompt(&apos;string&apos;)&quot;, as evident by the changes to test results. I think that change was wrong; in Firefox, prompt(&apos;foo&apos;) doesn&apos;t use &quot;undefined&quot; as the default value (and alert() throws a not enough arguments exception).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58728</commentid>
    <comment_count>2</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2007-10-17 07:51:12 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; This was fixed in &lt;http://trac.webkit.org/projects/webkit/changeset/26616&gt;.
&gt; 
&gt; That patch also changed the behavior of &quot;alert()&quot; and &quot;prompt(&apos;string&apos;)&quot;, as
&gt; evident by the changes to test results. I think that change was wrong; in
&gt; Firefox, prompt(&apos;foo&apos;) doesn&apos;t use &quot;undefined&quot; as the default value (and
&gt; alert() throws a not enough arguments exception).

In the case of alert(), I think we&apos;re OK. IE shows an alert with the empty string and Firefox throws an exception. I think it&apos;s fine that we display the string &quot;undefined&quot;.

But prompt(&quot;string&quot;) I think is something else altogether! We don&apos;t want &quot;undefined&quot; as the default value in that case!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58731</commentid>
    <comment_count>3</comment_count>
    <who name="">mitz</who>
    <bug_when>2007-10-17 10:14:59 -0700</bug_when>
    <thetext>Bug 15541 filed on the prompt() issue.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>