<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - GC bug when accessing iframe's from parent frame after removing first from tree"
   href="https://bugs.webkit.org/show_bug.cgi?id=151554">151554</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>GC bug when accessing iframe's from parent frame after removing first from tree
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>WebCore JavaScript
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>nekr.fabula&#64;gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I have an app. It runs player in iframe and I control player from to frame by accessing its JavaScript (for frames' document.domain is set to base domain, e.g. example.com). On navigation in app, page with iframe is removed from tree and then destroy function is called on iframe's JS object (parent frame has reference to that object). Work fine in all browsers except of Safari/WebKit. WebKit fails with error &quot;undefined is not Object&quot; and Debugger is paused on error line. Interesting thing is that here Debugger says that variable actually is Object. window.onerror reports &quot;Script Error&quot; with line &quot;0&quot;.

Steps to reproduce:

1. Go to html5.oumy.tv:8080
2. Navigate to a channel and then to a clip
3. Click play, seems few times so all JS is initialized
4. Click back button in top left corner
5. Enjoy debugging!

Tested on iOS 8.1 Simulator, iPhone device with iOS 9 and Macbook Pro 2015 (Desktop Safari)

I also capture video of the problem: <a href="https://youtu.be/NqQ-DCy2CgY">https://youtu.be/NqQ-DCy2CgY</a></pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>