Closed Bug 1745914 Opened 4 years ago Closed 4 years ago

Delayed creation of message handler instances until first received command

Categories

(Remote Protocol :: WebDriver BiDi, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: whimboo, Unassigned)

Details

I just noticed that any trace log that our message handler code does not reach the terminal but is hold back until the log.entryAdded events are enabled. Not sure yet which patch caused this regression but I'll have a look. We should not prevent these logging entries to reach the console.

Actually this doesn't seem to be a regression but a behavior that we currently expect. The whole message handler framework isn't initialized until a command gets sent. Only then the appropriate window global message handlers are created. Right now I'm not 100% sure if that is a behavior that we actually want, or if message handlers should immediately be registered / initialized for all known browsing contexts.

We have similar behavior for CDP and as such miss some early events. So I wonder if once a session is created we should initialize them all.

Summary: Trace logs are only send to the console when log.entryAdded events have been enabled → Delayed creation of message handler instances until first received command
Whiteboard: [webdriver:triage]

As discussed with Julian this is actually the wanted behavior. And I'm ok with that behavior now that it's known why it is happening.

I'm going to close this bug as WFM for now but we will consider reopening the bug in the case when some implementation is being blocked on it.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
Whiteboard: [webdriver:triage]
You need to log in before you can comment on or make changes to this bug.