Kripken wrote:

> Not a bug in V8, just an oddity of JavaScript. Run the same code in 
> SpiderMonkey, for example, and you'll get the same results.
> 
> Basically, you need to set constructors manually if you want to use them 
> the way your code does.

OK, but that's odd... somewhere internally there must be a reference 
from each object to its prototype.  We can see this in the way 
properties are looked up.  But, if we don't store it ourselves, there is 
really no way to find out what that prototype is?

(Basically I'm trying to construct an "is-a" test to see whether one 
object derives from another via the prototype chain.)

> See e.g. this random article a Google search turned up,
> 
> http://phrogz.net/JS/Classes/OOPinJS2.html
> 
> and notice how they set the constructors manually.

I've seen articles like that, but always assumed it was silliness on the 
part of the author, rather than silliness on the part of JavaScript.

Thanks,
- Joe


--~--~---------~--~----~------------~-------~--~----~
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to