Skip to content

Commit 2c6b887

Browse files
authored
Update bim and refer to legacyNamespace (#1157)
Fixes #1155
1 parent 5da2f26 commit 2c6b887

File tree

3 files changed

+19
-29
lines changed

3 files changed

+19
-29
lines changed

package-lock.json

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/build/bcd/keep-alive.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@ export const forceKeepAlive: Record<string, string[]> = {
4848
Request: ["keepalive"],
4949
RTCDtlsTransport: ["onstatechange", "state"],
5050
RTCPeerConnection: ["canTrickleIceCandidates"],
51-
WebAssembly: [
52-
"compile",
53-
"compileStreaming",
54-
"instantiate",
55-
"instantiateStreaming",
56-
"validate",
57-
],
5851
WebGLRenderingContextBase: ["lineWidth"],
5952
WebGL2RenderingContextOverloads: [
6053
// These are implemented in WebGLRenderingContext and WebGL2RenderingContext separately
@@ -76,11 +69,4 @@ export const forceKeepAlive: Record<string, string[]> = {
7669
],
7770
WindowEventHandlers: ["onoffline", "ononline", "onpagehide", "onpageshow"],
7871
WorkerGlobalScope: ["onrejectionhandled", "onunhandledrejection"],
79-
// (WebAssembly namespace members)
80-
// TODO: Shouldn't these be inside "WebAssembly"?
81-
Instance: ["exports"],
82-
Global: ["value", "valueOf"],
83-
Memory: ["buffer", "grow"],
84-
Module: ["customSections", "exports", "imports"],
85-
Table: ["length", "get", "grow", "set"],
8672
};

src/build/bcd/mapper.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@ function mapInterfaceLike(
5757
i: Browser.Interface,
5858
mapper: (data: DataToMap) => any
5959
) {
60-
const data = i.mixin ? api.__mixins[name] : api[name];
60+
const data = i.mixin
61+
? api.__mixins[name]
62+
: i.legacyNamespace
63+
? api[i.legacyNamespace][name]
64+
: api[name];
6165
const intCompat = data?.__compat;
6266
const mapped = mapper({ key: name, compat: intCompat, mixin: !!i.mixin });
6367
if (!data) {

0 commit comments

Comments
 (0)