title: Call prototype's overridden method which then calls the next prototype's overridden method error
body: <p>I'm trying to override methods of an object but still call the prototype's original method using <code>Object.getPrototypeOf()</code>. This works great the first time, but if the method is overridden more than once there are problems. </p>
  
  <p>This code results in a stack overflow:</p>
  
  <pre><code>A =
  {
     blurg: function()
     {
        puts('hey there')
     }
  }
  
  B = (function buildB(){
     var obj = Object.create(A)
  
     obj.blurg = function()
     {
        Object.getPrototypeOf(this).blurg.apply(this, arguments)
  
        puts('hai!!!!')
     }
  
     return obj
  })()
  
  b = (function buildb(){
     var obj = Object.create(B)
  
     obj.blurg = function()
     {
        Object.getPrototypeOf(this).blurg.apply(this, arguments)
  
        puts('bye bye')
     }
  
     return obj
  })()
  
  
  b.blurg()
  </code></pre>
  
  <p><a href="http://jsfiddle.net/donut2d/QpAFy/" rel="nofollow">jsFiddle</a></p>
  
  <p>The problem is that I want to call the prototype's method with the current object as <code>this</code>. This causes problems when that method does the same thing.</p>
  
  <p>Am I going about this the wrong way? Is there a way I could create a helper function for making sure the correct prototype is pulled up? I'm a bit at a loss.</p>