Remove @ native from global toString in debug builds, no bug, not part of the build

This commit is contained in:
bob%bclary.com 2005-11-24 04:43:16 +00:00
parent 002d82bd70
commit 562ff36e70
2 changed files with 14 additions and 6 deletions

View File

@ -62,8 +62,9 @@ writeHeaderToLog( SECTION + " "+ TITLE);
new TestCase( SECTION, "(new Object()).toString()", "[object Object]", (new Object()).toString() );
new TestCase( SECTION, "myvar = this; myvar.toString = Object.prototype.toString; myvar.toString()",
GLOBAL,
eval("myvar = this; myvar.toString = Object.prototype.toString; myvar.toString()") );
GLOBAL.replace(/ @ 0x[0-9a-fA-F]+ \(native @ 0x[0-9a-fA-F]+\)/, ''),
eval("myvar = this; myvar.toString = Object.prototype.toString; myvar.toString()")
);
new TestCase( SECTION, "myvar = MyObject; myvar.toString = Object.prototype.toString; myvar.toString()",
"[object Function]",
@ -102,8 +103,9 @@ new TestCase( SECTION, "myvar = new Date(); myvar.toString = Object.prototype.t
eval("myvar = new Date(); myvar.toString = Object.prototype.toString; myvar.toString()") );
new TestCase( SECTION, "var MYVAR = new Object( this ); MYVAR.toString()",
GLOBAL,
eval("var MYVAR = new Object( this ); MYVAR.toString()") );
GLOBAL.replace(/ @ 0x[0-9a-fA-F]+ \(native @ 0x[0-9a-fA-F]+\)/, ''),
eval("var MYVAR = new Object( this ); MYVAR.toString()")
);
new TestCase( SECTION, "var MYVAR = new Object(); MYVAR.toString()",
"[object Object]",
@ -122,3 +124,5 @@ function MyObject( value ) {
this.value = new Function( "return this.value" );
this.toString = new Function ( "return this.value+''");
}
test();

View File

@ -94,7 +94,11 @@ writeHeaderToLog( SECTION + " "+ TITLE);
// regress http://scopus/bugsplat/show_bug.cgi?id=105721
new TestCase( SECTION, "function f() { return this; }; function g() { var h = f; return h(); }; g().toString()", GLOBAL, g().toString() );
new TestCase( SECTION,
"function f() { return this; }; function g() { var h = f; return h(); }; g().toString()",
GLOBAL,
g().toString()
);
new TestCase( SECTION, "String.prototype.indexOf.length", 1, String.prototype.indexOf.length );
@ -183,7 +187,7 @@ new TestCase( SECTION,
new TestCase( SECTION,
"var f = new Object( String.prototype.indexOf ); f('"+GLOBAL+"')",
0,
eval("var f = new Object( String.prototype.indexOf ); f('"+GLOBAL+"')") );
eval("var f = new Object( String.prototype.indexOf ); f('"+GLOBAL.replace(/ @ 0x[0-9a-fA-F]+ \(native @ 0x[0-9a-fA-F]+\)/, '')+"')") );
new TestCase( SECTION,
"var f = new Function(); f.toString = Object.prototype.toString; f.indexOf = String.prototype.indexOf; f.indexOf('[object Function]')",