Skip to content

Update bim and refer to legacyNamespace #1157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 0 additions & 14 deletions src/build/bcd/keep-alive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ export const forceKeepAlive: Record<string, string[]> = {
Request: ["keepalive"],
RTCDtlsTransport: ["onstatechange", "state"],
RTCPeerConnection: ["canTrickleIceCandidates"],
WebAssembly: [
"compile",
"compileStreaming",
"instantiate",
"instantiateStreaming",
"validate",
],
WebGLRenderingContextBase: ["lineWidth"],
WebGL2RenderingContextOverloads: [
// These are implemented in WebGLRenderingContext and WebGL2RenderingContext separately
Expand All @@ -76,11 +69,4 @@ export const forceKeepAlive: Record<string, string[]> = {
],
WindowEventHandlers: ["onoffline", "ononline", "onpagehide", "onpageshow"],
WorkerGlobalScope: ["onrejectionhandled", "onunhandledrejection"],
// (WebAssembly namespace members)
// TODO: Shouldn't these be inside "WebAssembly"?
Instance: ["exports"],
Global: ["value", "valueOf"],
Memory: ["buffer", "grow"],
Module: ["customSections", "exports", "imports"],
Table: ["length", "get", "grow", "set"],
};
6 changes: 5 additions & 1 deletion src/build/bcd/mapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ function mapInterfaceLike(
i: Browser.Interface,
mapper: (data: DataToMap) => any
) {
const data = i.mixin ? api.__mixins[name] : api[name];
const data = i.mixin
? api.__mixins[name]
: i.legacyNamespace
? api[i.legacyNamespace][name]
: api[name];
const intCompat = data?.__compat;
const mapped = mapper({ key: name, compat: intCompat, mixin: !!i.mixin });
if (!data) {
Expand Down