mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-11-01 03:57:30 +09:00
1333143 - Self-host Object.prototype.valueOf.
This commit is contained in:
parent
5d929d8c47
commit
337cdbd0ce
7 changed files with 26 additions and 19 deletions
|
|
@ -8,7 +8,7 @@ function addDebug(g, id) {\
|
|||
var debuggerGlobal = newGlobal();\
|
||||
debuggerGlobal.debuggee = g;\
|
||||
debuggerGlobal.id = id;\
|
||||
debuggerGlobal.print = function (s) { (g) += s; };\
|
||||
debuggerGlobal.print = function (s) { print(s); };\
|
||||
debuggerGlobal.eval('var dbg = new Debugger(debuggee);dbg.onDebuggerStatement = function () { print(id); debugger; };');\
|
||||
return debuggerGlobal;\
|
||||
}\
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ cold_and_warm(Object.prototype.toString, { ToString: {} }, []);
|
|||
var toS = { toString: function myToString() { return "string"; } };
|
||||
cold_and_warm(toS.toString, { ToString: toS }, [ "myToString" ]);
|
||||
|
||||
cold_and_warm(undefined, { ToNumber: {} }, []);
|
||||
cold_and_warm(undefined, { ToNumber: 5 }, []);
|
||||
|
||||
var vOf = { valueOf: function myValueOf() { return 42; } };
|
||||
cold_and_warm(vOf.valueOf, { ToNumber: vOf }, [ "myValueOf" ]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue