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

Be more general in stripping off stack frames to fix Firefox tests #2425

Merged
merged 2 commits into from Jan 25, 2022

Commits on Jan 23, 2022

  1. Revert breaking change to stack-stripping regex

    This regex was made more specific in an attempt to avoid incorrectly
    stripping off parts of messages - we strip off anything after " at",
    which means "to have been called at least once" becomes "to have been
    called".
    
    However, the new regex was too specific and made faulty assumptions
    about stack traces - namely, that they'll always have parentheses after
    the at. Firefox's stack traces, however, look like so:
    
    func() at callFn@about:blank line 2 > injectedScript:47353:21
    
    So, we could try to come up with a better regex that matches all
    browsers that we test with, or perhaps add some sort of indicator when
    we're appending the stack traces, but since this change is breaking the
    tests for everyone right now, for expedience we'll just revert to how we
    were stripping things before.
    
    This means changing one of the asserts back to how it was before, where
    it was asserting against a partial message due to the over-eager
    stripping, so add a comment about that as well.
    cincodenada committed Jan 23, 2022
    Configuration menu
    Copy the full SHA
    86bc6ec View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2022

  1. Update with a more general regex

    This should match any stack frame format that has at least one non-word,
    non-space character in it, which should be a pretty safe assumption, and
    holds for the three browsers we test in anyway.
    
    This gets us back to not trimming messages improperly, while also not
    breaking firefox, and I think is reasonable as far as regexes go.
    
    This seems like a reasonable enough regex - the original fixed one was
    overly complicated because it tried to remove an arbitrary number of
    stack frames, which was unnecessary because we only append one.
    cincodenada committed Jan 24, 2022
    Configuration menu
    Copy the full SHA
    b810b3f View commit details
    Browse the repository at this point in the history