Skip to content

Commit

Permalink
Early init FuseboxClientMetadataModel (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
motiz88 authored Mar 20, 2024
1 parent 622246a commit 0beb10c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion front_end/entrypoints/rn_inspector/rn_inspector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,17 @@ class FuseboxClientMetadataModel extends SDK.SDKModel.SDKModel<void> {

SDK.SDKModel.SDKModel.register(
FuseboxClientMetadataModel,
{capabilities: SDK.Target.Capability.None, autostart: true},
{
capabilities: SDK.Target.Capability.None,
autostart: true,
// Ensure FuseboxClient.setClientMetadata is sent before most other CDP domains
// are initialised. This allows the backend to confidently detect non-Fusebox
// clients by the fact that they send e.g. Runtime.enable without sending any
// Fusebox-specific messages first.
// TODO: Explicitly depend on this model in RuntimeModel and LogModel, and
// remove the `early` and `autostart` flags.
early: true,
},
);

// @ts-ignore Exposed for legacy layout tests
Expand Down

0 comments on commit 0beb10c

Please sign in to comment.