createMeta no longer copying to new_class.prototype
I do not wholly recall why this was done initially (nor do I care to research it, since it's not necessary now), but from the looks of it, it was likely a kluge to handle a poor implementation of some feature. This will help clean up a little, since it's rude to pollute a prototype unnecessarily.protolib
parent
17d11c1832
commit
072fef2dc0
|
@ -1255,27 +1255,13 @@ function createMeta( func, cparent )
|
||||||
// copy the parent prototype's metadata if it exists (inherit metadata)
|
// copy the parent prototype's metadata if it exists (inherit metadata)
|
||||||
if ( parent_meta )
|
if ( parent_meta )
|
||||||
{
|
{
|
||||||
func[ _priv ].meta = util.clone( parent_meta, true );
|
return func[ _priv ].meta = util.clone( parent_meta, true );
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// create empty
|
// create empty
|
||||||
func[ _priv ].meta = {
|
return func[ _priv ].meta = {
|
||||||
implemented: [],
|
implemented: [],
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: this should be done elsewhere
|
|
||||||
if ( !func.prototype[ _priv ] )
|
|
||||||
{
|
|
||||||
func.prototype[ _priv ] = {};
|
|
||||||
}
|
|
||||||
|
|
||||||
// store the metadata in the prototype as well (inconsiderable overhead;
|
|
||||||
// it's just a reference)
|
|
||||||
func.prototype[ _priv ].meta = func[ _priv ].meta;
|
|
||||||
|
|
||||||
return func[ _priv ].meta;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue