Skip to content

Conversation

mxschmitt
Copy link
Member

Fixes #1220

@mxschmitt mxschmitt force-pushed the add-wrap-api-call branch from 2da0a0a to 2619980 Compare June 15, 2022 12:32
@mxschmitt mxschmitt force-pushed the add-wrap-api-call branch from 2619980 to 2008ece Compare June 15, 2022 12:41
@mxschmitt mxschmitt force-pushed the add-wrap-api-call branch from 2008ece to 0e136ae Compare June 15, 2022 12:49
@mxschmitt mxschmitt marked this pull request as ready for review June 15, 2022 13:50
)

def send_no_reply(self, method: str, params: Dict = None) -> None:
self._connection.wrap_api_call_sync(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need a separate method for this?

await cast(Coroutine, result) if asyncio.iscoroutine(result) else result
)
task = asyncio.current_task(self._loop)
st: List[inspect.FrameInfo] = getattr(task, "__pw_stack__", inspect.stack())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assumes there were no async hops on the way from API call to wrap_api_call. I believe this is the case, but I'm not sure we should rely upon in. Consider leaving _async wrapper in place as a safer option.

@mxschmitt mxschmitt merged commit 5d33195 into microsoft:main Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Hide Page.WaitForEventInfo from trace viewer
2 participants