mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
Trace only string method names (#141)
This commit is contained in:
parent
9363a15cce
commit
2e6751d6f5
@ -106,7 +106,7 @@ class Helper {
|
||||
return;
|
||||
for (let methodName of Reflect.ownKeys(classType.prototype)) {
|
||||
const method = Reflect.get(classType.prototype, methodName);
|
||||
if (methodName === 'constructor' || methodName.startsWith('_') || typeof method !== 'function')
|
||||
if (methodName === 'constructor' || typeof methodName !== 'string' || methodName.startsWith('_') || typeof method !== 'function')
|
||||
continue;
|
||||
Reflect.set(classType.prototype, methodName, function(...args) {
|
||||
let argsText = args.map(stringifyArgument).join(', ');
|
||||
|
Loading…
Reference in New Issue
Block a user