<?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>18716</bug_id>
          
          <creation_ts>2008-04-24 09:59:55 -0700</creation_ts>
          <short_desc>SQUIRRELFISH: typeof should return undefined for an undefined variable reference</short_desc>
          <delta_ts>2008-04-24 10:17:22 -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>JavaScriptCore</component>
          <version>528+ (Nightly build)</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="Cameron Zwarich (cpst)">zwarich</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>78783</commentid>
    <comment_count>0</comment_count>
    <who name="Cameron Zwarich (cpst)">zwarich</who>
    <bug_when>2008-04-24 09:59:55 -0700</bug_when>
    <thetext>The expression &quot;typeof x&quot; throws an exception when x is undefined, but it should return undefined instead. This affects the JavaScriptCore regression tests ecma/Expressions/11.4.1.js and js1_5/Array/regress-157652.js.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78784</commentid>
    <comment_count>1</comment_count>
      <attachid>20795</attachid>
    <who name="Cameron Zwarich (cpst)">zwarich</who>
    <bug_when>2008-04-24 10:01:55 -0700</bug_when>
    <thetext>Created attachment 20795
Proposed patch

This fixes the two tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78785</commentid>
    <comment_count>2</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2008-04-24 10:08:28 -0700</bug_when>
    <thetext>r=me if you use resolveBaseAndProperty instead.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78786</commentid>
    <comment_count>3</comment_count>
      <attachid>20795</attachid>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2008-04-24 10:11:25 -0700</bug_when>
    <thetext>Comment on attachment 20795
Proposed patch

Cameron pointed out that resolveBaseAndProperty throws an exception for undefined variables. Doh!

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78787</commentid>
    <comment_count>4</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2008-04-24 10:15:11 -0700</bug_when>
    <thetext>r32494</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>20795</attachid>
            <date>2008-04-24 10:01:55 -0700</date>
            <delta_ts>2008-04-24 10:11:25 -0700</delta_ts>
            <desc>Proposed patch</desc>
            <filename>typeof.diff</filename>
            <type>text/plain</type>
            <size>1462</size>
            <attacher name="Cameron Zwarich (cpst)">zwarich</attacher>
            
              <data encoding="base64">SW5kZXg6IENoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBDaGFuZ2VMb2cJKHJldmlzaW9uIDMyNDky
KQorKysgQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTUgQEAKKzIwMDgtMDQt
MjQgIENhbWVyb24gWndhcmljaCAgPGN3endhcmljaEB1d2F0ZXJsb28uY2E+CisKKyAgICAgICAg
UmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAgQnVnIDE4NzE2OiBTUVVJUlJF
TEZJU0g6IHR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F0b3IuZmluYWxEZXN0aW5hdGlvbihkc3QsIHIwKSwg
cjApOworICAgIFJlZlB0cjxSZWdpc3RlcklEPiByMCA9IGdlbmVyYXRvci5lbWl0UmVzb2x2ZUJh
c2UoZ2VuZXJhdG9yLnRlbXBEZXN0aW5hdGlvbihkc3QpLCBtX2lkZW50KTsKKyAgICBnZW5lcmF0
b3IuZW1pdEdldFByb3BJZChyMC5nZXQoKSwgcjAuZ2V0KCksIG1faWRlbnQpOworICAgIHJldHVy
biBnZW5lcmF0b3IuZW1pdFR5cGVPZihnZW5lcmF0b3IuZmluYWxEZXN0aW5hdGlvbihkc3QsIHIw
LmdldCgpKSwgcjAuZ2V0KCkpOwogfQogCiBKU1ZhbHVlKiBUeXBlT2ZSZXNvbHZlTm9kZTo6ZXZh
bHVhdGUoT2xkSW50ZXJwcmV0ZXJFeGVjU3RhdGUqIGV4ZWMpCg==
</data>
<flag name="review"
          id="9091"
          type_id="1"
          status="+"
          setter="ggaren"
    />
          </attachment>
      

    </bug>

</bugzilla>