Skip to content

Commit 1bc04a9

Browse files
committed
fix: 删除callback太快导致多次发jsonp请求会报错
1 parent 1b96bb0 commit 1bc04a9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/hook/object-function-hook.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,13 @@ class ObjectFunctionHook {
7676
let parameterNames = getParameterNames(functionHolder);
7777
// TODO 2025-01-07 23:41:26 调用 hookCallbackFunction
7878
// TODO 2025-01-06 03:19:19 提示语也国际化,根据设置的语言选择
79+
// TODO 2025-01-09 02:58:29 暂不删除函数,否则第二次运行就可能报错了,暂不考虑函数溢出的问题
7980
const newFunctionCode = `
8081
8182
// 这里就是jsonp的回调函数的方法体,这是插入的hook代码
8283
// 判断是否命中断点
8384
const isHitDebugger = ${hookCallbackFunctionGlobalName}.apply(this, arguments);
84-
delete window["${hookCallbackFunctionGlobalName}"];
85+
// delete window["${hookCallbackFunctionGlobalName}"];
8586
if (isHitDebugger) {
8687
debugger;
8788
}

0 commit comments

Comments
 (0)