title: Can't execute code from a freed script
body: <p>I have a function that in a different frame that I need to override. In addition, I need to call the original function from within my override. To do so, I'm using the following:</p>
  
  <pre><code>myFrame.SomeFunction = (function () {
      var originalSomeFunction = myFrame.SomeFunction;
  
      return function(arg1, arg2, arg3) {
          alert('In override!');
          originalSomeFunction(arg1, arg2, arg3);
      };
  })();
  </code></pre>
  
  <p>When I execute this code, I get "Can't execute code from a freed script".</p>
  
  <p>Thoughts? Is there a better way to do this? Testing in IE 6,7,8 and 9.</p>