Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StackTraceDeobfuscator should never provide null methodName #9997

Merged

Conversation

niloc132
Copy link
Member

Improves accuracy of deobfuscated stack traces by using the best answer between original JS names, symbol maps, and source maps, by both avoiding taking an identifier from the sourcemap if none is provided, and normalizing away chromium specific prefixes in stack trace elements.

Fixes #9996
Follow-up #9936

Improves accuracy of deobfuscated stack traces by using the best answer
between original JS names, symbol maps, and source maps, by both
avoiding taking an identifier from the sourcemap if none is provided,
and normalizing away chromium specific prefixes in stack trace elements.

Fixes gwtproject#9996
Follow-up gwtproject#9936
@niloc132 niloc132 added this to the 2.12 milestone Aug 28, 2024
*/
private static String normalizeSymbol(String symbol) {
// Chrome prefixes "new " for constructor calls, eliminate the prefix
if (symbol.startsWith("new ")) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This could also be done in the client StackTraceCreator.ModernCollector, but it seemed lower impact to include it here instead.

@niloc132
Copy link
Member Author

@niloc132 niloc132 merged commit 15d11a2 into gwtproject:main Sep 5, 2024
4 checks passed
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.

NPE in StackTraceDeobfuscator for missing identifiers, plus incorrect methodNames from chromium
2 participants