@@ -43,6 +43,7 @@ Copyright (c) 2017, Tetsuya Mori <
[email protected] >. All rights reserved.
43
43
'method' : Function ,
44
44
'cachedMethod' : Function ,
45
45
'cachedMethodDebug' : Function ,
46
+ 'oldMethod' : Function ,
46
47
} ,
47
48
__hook__ : Function ,
48
49
__hook_except_properties__ : Function ,
@@ -93,7 +94,7 @@ Copyright (c) 2017, Tetsuya Mori <
[email protected] >. All rights reserved.
93
94
return [
94
95
'__hook__' , // [0] hookName
95
96
[ [ this . context , { } ] ] , // [1] initialContext
96
- 'cachedMethod ' , // [2] contextGeneratorName
97
+ 'method ' , // [2] contextGeneratorName
97
98
true , // [3] metaHooking
98
99
true , // [4] _hookProperty
99
100
null , // [5] _sourceMap
@@ -1456,14 +1457,14 @@ Copyright (c) 2017, Tetsuya Mori <
[email protected] >. All rights reserved.
1456
1457
} ,
1457
1458
{
1458
1459
code : `{ let a = 1; eval('1'); }` ,
1459
- hooked : `{let a=1;$hook$.eval('__hook__',[['HookApiTest',{}]],'cachedMethod ',{a:true})('1',(script,eval)=>eval(script));}` ,
1460
+ hooked : `{let a=1;$hook$.eval('__hook__',[['HookApiTest',{}]],'method ',{a:true})('1',(script,eval)=>eval(script));}` ,
1460
1461
eval : ( ) => true ,
1461
1462
} ,
1462
1463
{
1463
1464
code : `var a; new Promise(resolve => { a = resolve; setTimeout('let resolve = a; a = null; resolve(1);', 100); });` ,
1464
1465
hooked : `$hook$.global(__hook__,'HookApiTest','a','var')._pp_a;` +
1465
1466
`__hook__(Promise,null,[(...args)=>(__hook__(resolve=>{$hook$.global(__hook__,'HookApiTest','a','set')._pp_a=resolve;` +
1466
- `$hook$.setTimeout('__hook__',[['HookApiTest',{}]],'cachedMethod ')('let resolve = a; a = null; resolve(1);',100);},null,args,'HookApiTest'))],'HookApiTest',true);` ,
1467
+ `$hook$.setTimeout('__hook__',[['HookApiTest',{}]],'method ')('let resolve = a; a = null; resolve(1);',100);},null,args,'HookApiTest'))],'HookApiTest',true);` ,
1467
1468
asynchronous : true ,
1468
1469
} ,
1469
1470
{
0 commit comments