Bug 282979
Summary: | [WebDriver][BiDi] Support getting the stack trace for assert, error, trace and warn messages log.entryEvents | ||
---|---|---|---|
Product: | WebKit | Reporter: | Lauro Moura <lmoura> |
Component: | WebDriver | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | bburg, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | 271956 | ||
Bug Blocks: | 281932 |
Lauro Moura
https://w3c.github.io/webdriver-bidi/#event-log-entryAdded
> 11. If method is "assert", "error", "trace", or "warn", let stack be the current stack trace. Otherwise let stack be null.
https://w3c.github.io/webdriver-bidi/#current-stack-trace
The current stack trace is the result of construct a stack trace given a list of stack frames representing the callstack of the running execution context.
https://w3c.github.io/webdriver-bidi/#construct-a-stack-trace
To construct a stack trace, with a list of stack frames stack:
1. Let call frames be a new list.
2. For each stack frame frame in stack, starting from the most recently executed frame, run the following steps:
1. Let url be the result of running the URL serializer, given the URL of frame’s script url.
2. Let frame info be a new map matching the script.StackFrame production, with the url field set to url, the functionName field set to frame’s function, the lineNumber field set to frame’s line number and the columnNumber field set to frame’s column number.
3. Append frame info to call frames.
4. Let stack trace be a new map matching the script.StackTrace production, with the callFrames property set to call frames.
5. Return stack trace.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/140187454>