refactor(client): replace remote-object switch with a factory registry#40672
Conversation
Convert the hand-written switch in Connection._createRemoteObject into a Map<string, ChannelOwnerFactory> populated by registerObjectFactories(). The Connection constructor seeds the registry with all built-in types, preserving exactly today's behavior; later changes can register additional factories from outside playwright-core/client. No behavior change. Sets up the extension point for plugin-style client modules (e.g. Android) to register their channel-owner classes.
Test results for "MCP"4 failed 6991 passed, 1052 skipped Merge workflow run. |
Test results for "tests 1"Warning The triggering workflow run ended with status 1 failed 4 flaky41587 passed, 851 skipped Merge workflow run. |
Summary
Connection._createRemoteObjectinto aMap<string, ChannelOwnerFactory>populated byregisterObjectFactories().Connectionconstructor seeds the registry with all built-in types, preserving today's behavior.playwright-core/client.No behavior change.