mozilla/rhino — pull request #48 by tschaub (2012-06-04 05:23:24+00:00)
Title: Allow defineClass to be called more than once with mapInheritance true

If `defineClass` is called twice with two classes that share a common superclass, the prototype for the superclass will be created twice. This means that `instanceof` checks don't work (for the first class defined).

I'm not convinced that the fix in ScriptableObject is in the right pace (there's a whole lot more work going on than necessary in the case of multiple `defineClass` calls), but it works.