• Mathias Bynens's avatar
    [inspector] Improve regular expression printing · 50be01b2
    Mathias Bynens authored
    Prior to this patch, `new RegExp('a/b')` logs the following in
    the DevTools Console:
    
        /a/b/
    
    This is syntactically invalid.
    
    This patch fixes this while simplifying regular expression printing
    in general by leveraging `RegExp#toString`, instead of duplicating
    the logic on the inspector side. This is possible thanks to the recent
    work on making `RegExp#toString` more robust (v8:1982).
    
    Bug: chromium:1202013, v8:1982
    Change-Id: I14ccc1892f4a99361ad170fea608ace630740991
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2848463
    Commit-Queue: Mathias Bynens <mathias@chromium.org>
    Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#74169}
    50be01b2
value-mirror.cc 64.2 KB