<?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>29605</bug_id>
          
          <creation_ts>2009-09-21 12:57:49 -0700</creation_ts>
          <short_desc>[Chromium] Fix the V8 bindings&apos; handling of window.top</short_desc>
          <delta_ts>2009-09-21 14:03:20 -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 Misc.</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="Nate Chapin">japhet</reporter>
          <assigned_to name="Nate Chapin">japhet</assigned_to>
          <cc>abarth</cc>
    
    <cc>commit-queue</cc>
    
    <cc>dglazkov</cc>
    
    <cc>levin</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>148763</commentid>
    <comment_count>0</comment_count>
    <who name="Nate Chapin">japhet</who>
    <bug_when>2009-09-21 12:57:49 -0700</bug_when>
    <thetext>I introduced a regression in the V8 bindings in http://trac.webkit.org/changeset/47130/trunk/WebCore/bindings/scripts/CodeGeneratorV8.pm.  We were special casing window.top, since we have disallowing shadowing on it, but it&apos;s also marked as replaceable.  
I believe the solution is:
1. Add back in the special case handling to ensure window.top is not v8::ReadOnly, as this causes a TypeError rather than silently failing.
2. Add in a FIXME to see if we can stop disallowing shadowing at some point in the future.
3. Remove V8ReadOnly from window.top, since in any case other than this that uses Replaceable, V8ReadOnly is redundant.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>148773</commentid>
    <comment_count>1</comment_count>
      <attachid>39865</attachid>
    <who name="Nate Chapin">japhet</who>
    <bug_when>2009-09-21 13:11:02 -0700</bug_when>
    <thetext>Created attachment 39865
patch

After rereading CodeGeneratorV8.pm, I found a usage of V8ReadOnly that I hadn&apos;t noticed before, so I won&apos;t be doing #3 as I had originally thought.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>148774</commentid>
    <comment_count>2</comment_count>
    <who name="Dimitri Glazkov (Google)">dglazkov</who>
    <bug_when>2009-09-21 13:12:08 -0700</bug_when>
    <thetext>Adam is your man here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>148800</commentid>
    <comment_count>3</comment_count>
      <attachid>39865</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2009-09-21 13:46:35 -0700</bug_when>
    <thetext>Comment on attachment 39865
patch

We can&apos;t allow shadowing of window.top without confusing Flash and other plug-ins.  The correct solution here is to convince the JSC port not to mark |top| are replaceable, but that&apos;s a longer conversation.  In the meantime, we should fix the LayoutTest.  If this regression is in stable, we should backport this fix.

Thanks for the patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>148812</commentid>
    <comment_count>4</comment_count>
      <attachid>39865</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2009-09-21 14:03:15 -0700</bug_when>
    <thetext>Comment on attachment 39865
patch

Clearing flags on attachment: 39865

Committed r48598: &lt;http://trac.webkit.org/changeset/48598&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>148813</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2009-09-21 14:03:20 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>39865</attachid>
            <date>2009-09-21 13:11:02 -0700</date>
            <delta_ts>2009-09-21 14:03:15 -0700</delta_ts>
            <desc>patch</desc>
            <filename>patch.txt</filename>
            <type>text/plain</type>
            <size>1610</size>
            <attacher name="Nate Chapin">japhet</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nDQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQotLS0gV2ViQ29yZS9DaGFuZ2VM
b2cJKHJldmlzaW9uIDQ4NTkyKQorKysgV2ViQ29yZS9DaGFuZ2VMb2cJKHdvcmtpbmcgY29weSkK
QEAgLTEsMyArMSwxNSBAQAorMjAwOS0wOS0yMSAgTmF0ZSBDaGFwaW4gIDxqYXBoZXRAY2hyb21p
dW0ub3JnPgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAg
IEFkZCBiYWNrIGluIGEgc3BlY2lhbCBjYXNlIGZvciB3aW5kb3cudG9wIGluIHRoZSBWOCBiaW5k
aW5ncy4KKworICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9
Mjk2MDUKKworICAgICAgICBGaXhlcyBMYXlvdXRUZXN0cy9mYXN0L2RvbS9XaW5kb3cvd2luZG93
LXByb3BlcnR5LXNoYWRvd2luZy5odG1sIGluIHRoZSBDaHJvbWl1bSBwb3J0LgorCisgICAgICAg
ICogYmluZGluZ3Mvc2NyaXB0cy9Db2RlR2VuZXJhdG9yVjgucG06IEVuc3VyZSB3aW5kb3cudG9w
IGlzIG5vdCBtYXJrZWQgYXMgcmVhZCBvbmx5LCBhcyB0aGlzIGJyZWFrcyB0aGUgc2hhZG93aW5n
IGRpc2FibGluZy4KKwogMjAwOS0wOS0yMSAgRGFyaW4gRmlzaGVyICA8ZGFyaW5AY2hyb21pdW0u
b3JnPgogCiAgICAgICA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AgICAgICAkcHJvcEF0dHIgLj0gInx2ODo6
UmVhZE9ubHkiOworICAgICAgICAgICAgfQogICAgICAgICB9CiAKICAgICAgICAgIyBSZWFkIG9u
bHkgYXR0cmlidXRlcwo=
</data>

          </attachment>
      

    </bug>

</bugzilla>