parent
9acedf6e91
commit
d05652f880
|
@ -46,12 +46,17 @@ var util = require( './util' ),
|
||||||
*/
|
*/
|
||||||
exports.setup = function( dest, properties, methods )
|
exports.setup = function( dest, properties, methods )
|
||||||
{
|
{
|
||||||
|
var obj = dest;
|
||||||
|
|
||||||
// this constructor is an extra layer atop of the destination object, which
|
// this constructor is an extra layer atop of the destination object, which
|
||||||
// will contain the private methods
|
// will contain the private methods
|
||||||
|
if ( defprop )
|
||||||
|
{
|
||||||
var obj_ctor = function() {};
|
var obj_ctor = function() {};
|
||||||
obj_ctor.prototype = dest;
|
obj_ctor.prototype = dest;
|
||||||
|
|
||||||
var obj = new obj_ctor();
|
obj = new obj_ctor();
|
||||||
|
}
|
||||||
|
|
||||||
// initialize each of the properties for this instance to
|
// initialize each of the properties for this instance to
|
||||||
// ensure we're not sharing references to prototype values
|
// ensure we're not sharing references to prototype values
|
||||||
|
|
|
@ -479,6 +479,13 @@ var common = require( './common' ),
|
||||||
*/
|
*/
|
||||||
( function testParentsShouldNotHaveAccessToPrivateMembersOfSubtypes()
|
( function testParentsShouldNotHaveAccessToPrivateMembersOfSubtypes()
|
||||||
{
|
{
|
||||||
|
// browsers that do not support the property proxy will not support
|
||||||
|
// encapsulating properties
|
||||||
|
if ( !( propobj.supportsPropProxy() ) )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// property
|
// property
|
||||||
assert.equal(
|
assert.equal(
|
||||||
sub_foo.nonOverrideGetProp( '_pfoo' ),
|
sub_foo.nonOverrideGetProp( '_pfoo' ),
|
||||||
|
|
Loading…
Reference in New Issue