<?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>21138</bug_id>
          
          <creation_ts>2008-09-26 03:49:20 -0700</creation_ts>
          <short_desc>DOM Constructors are being cached/looked up with the wrong global object</short_desc>
          <delta_ts>2022-09-16 12:55:31 -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>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</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="Oliver Hunt">oliver</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>cdumez</cc>
    
    <cc>rniwa</cc>
    
    <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>92899</commentid>
    <comment_count>0</comment_count>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2008-09-26 03:49:20 -0700</bug_when>
    <thetext>Our caching of constructor objects is based on the lexical global object at the time of request rather than the object we&apos;re actually lifting these objects off.  This means that it is impossible for windowa to directly retrieve a dom constructor from windowb (see the attached testcase).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92900</commentid>
    <comment_count>1</comment_count>
      <attachid>23845</attachid>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2008-09-26 03:49:46 -0700</bug_when>
    <thetext>Created attachment 23845
test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1898046</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-09-12 15:31:17 -0700</bug_when>
    <thetext>*** Safari 16 on macOS 12.6 ***

In Console:

SecurityError: Blocked a frame with origin &quot;https://bug-21138-attachments.webkit.org&quot; from accessing a cross-origin frame. Protocols, domains, and ports must match.

*** STP 153 ***

In Console:

SecurityError: Blocked a frame with origin &quot;https://bug-21138-attachments.webkit.org&quot; from accessing a cross-origin frame. Protocols, domains, and ports must match.

*** Chrome Canary 107 ***
﻿
attachment.cgi?id=23845:5 Uncaught DOMException: Blocked a frame with origin &quot;https://bug-21138-attachments.webkit.org&quot; from accessing a cross-origin frame.
    at window.onload (https://bug-21138-attachments.webkit.org/attachment.cgi?id=23845:5:61)

*** Firefox Nightly 106 ***

Uncaught DOMException: Permission denied to access property &quot;HTMLAnchorElement&quot; on cross-origin object

__________

These are results from all browsers. Just wanted to share the results. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1899056</commentid>
    <comment_count>3</comment_count>
      <attachid>462402</attachid>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2022-09-16 12:55:22 -0700</bug_when>
    <thetext>Created attachment 462402
Updated test case

This test case works in Safari now.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="0"
              isprivate="0"
          >
            <attachid>23845</attachid>
            <date>2008-09-26 03:49:46 -0700</date>
            <delta_ts>2022-09-16 12:55:22 -0700</delta_ts>
            <desc>test case</desc>
            <filename>yaxsstest.html</filename>
            <type>text/html</type>
            <size>267</size>
            <attacher name="Oliver Hunt">oliver</attacher>
            
              <data encoding="base64">PGlmcmFtZSBpZD0idGVzdEZyYW1lIiBzcmM9ImRhdGE6dGV4dC9odG1sLDxzY3JpcHQ+IEhUTUxB
bmNob3JFbGVtZW50LmZvbz0naW5uZXInPC9zY3JpcHQ+Ij48L2lmcmFtZT4KPHNjcmlwdD4Kd2lu
ZG93Lm9ubG9hZD1mdW5jdGlvbigpewogICAgSFRNTEFuY2hvckVsZW1lbnQuZm9vPSJvdXRlciI7
CiAgICBhbGVydChkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgidGVzdEZyYW1lIikuY29udGVudFdp
bmRvdy5IVE1MQW5jaG9yRWxlbWVudC5mb28pCn0KPC9zY3JpcHQ+
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>462402</attachid>
            <date>2022-09-16 12:55:22 -0700</date>
            <delta_ts>2022-09-16 12:55:22 -0700</delta_ts>
            <desc>Updated test case</desc>
            <filename>bug21138.html</filename>
            <type>text/html</type>
            <size>359</size>
            <attacher name="Ryosuke Niwa">rniwa</attacher>
            
              <data encoding="base64">PGlmcmFtZSBpZD0idGVzdEZyYW1lIj48L2lmcmFtZT4KPHNjcmlwdD4KdGVzdEZyYW1lLmNvbnRl
bnREb2N1bWVudC5vcGVuKCk7CnRlc3RGcmFtZS5jb250ZW50RG9jdW1lbnQud3JpdGUoJzxzY3Jp
cHQ+IEhUTUxBbmNob3JFbGVtZW50LmZvbyA9ICJpbm5lciI7PC8nICsgJ3NjcmlwdD4nKTsKdGVz
dEZyYW1lLmNvbnRlbnREb2N1bWVudC5jbG9zZSgpOwp3aW5kb3cub25sb2FkPWZ1bmN0aW9uKCl7
CiAgICBIVE1MQW5jaG9yRWxlbWVudC5mb289Im91dGVyIjsKICAgIGFsZXJ0KGRvY3VtZW50Lmdl
dEVsZW1lbnRCeUlkKCJ0ZXN0RnJhbWUiKS5jb250ZW50V2luZG93LkhUTUxBbmNob3JFbGVtZW50
LmZvbykKfQo8L3NjcmlwdD4=
</data>

          </attachment>
      

    </bug>

</bugzilla>