豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Commit 79ab800

Browse files
authored
chore(build): remove obsolete protocol_client.js modifications (#739)
The `self.Protocol` assignment and register call have moved to the InspectorBackend constructor. The `self.Protocol` assignment now use `globalThis`. The register call is necessary to make DevTools foundation work.
1 parent 11d1f59 commit 79ab800

File tree

2 files changed

+0
-44
lines changed

2 files changed

+0
-44
lines changed

scripts/post-build.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
import * as fs from 'node:fs';
88
import * as path from 'node:path';
99

10-
import {sed} from './sed.ts';
11-
1210
const BUILD_DIR = path.join(process.cwd(), 'build');
1311

1412
/**
@@ -73,21 +71,6 @@ export const experiments = {
7371
`;
7472
writeFile(runtimeFile, runtimeContent);
7573

76-
// Update protocol_client to remove:
77-
// 1. self.Protocol assignment
78-
// 2. Call to register backend commands.
79-
const protocolClientDir = path.join(
80-
BUILD_DIR,
81-
devtoolsFrontEndCorePath,
82-
'protocol_client',
83-
);
84-
const clientFile = path.join(protocolClientDir, 'protocol_client.js');
85-
const globalAssignment = /self\.Protocol = self\.Protocol \|\| \{\};/;
86-
const registerCommands =
87-
/InspectorBackendCommands\.registerCommands\(InspectorBackend\.inspectorBackend\);/;
88-
sed(clientFile, globalAssignment, '');
89-
sed(clientFile, registerCommands, '');
90-
9174
copyDevToolsDescriptionFiles();
9275
}
9376

scripts/sed.ts

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)