⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 245836 in webkit


Ignore:
Timestamp:
May 28, 2019, 6:05:45 PM (7 years ago)
Author:
ysuzuki@apple.com
Message:

GCHeapInspector should accept weird filename
https://bugs.webkit.org/show_bug.cgi?id=198314

Reviewed by Simon Fraser.

GCHeapInspector filenameForPath should have a fallback path if regexp does not match against the given path.

  • GCHeapInspector/script/interface.js:

(filenameForPath):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r245828 r245836  
     12019-05-28  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        GCHeapInspector should accept weird filename
     4        https://bugs.webkit.org/show_bug.cgi?id=198314
     5
     6        Reviewed by Simon Fraser.
     7
     8        GCHeapInspector filenameForPath should have a fallback path if regexp does not match against the given path.
     9
     10        * GCHeapInspector/script/interface.js:
     11        (filenameForPath):
     12
    1132019-05-28  Eric Carlson  <eric.carlson@apple.com>
    214
  • trunk/Tools/GCHeapInspector/script/interface.js

    r241274 r245836  
    447447function filenameForPath(filepath)
    448448{
    449     return filepath.match(/([^\/]+)(?=\.\w+$)/)[0];
     449    var matched = filepath.match(/([^\/]+)(?=\.\w+$)/);
     450    if (matched)
     451        return matched[0];
     452    return filepath;
    450453}
    451454
Note: See TracChangeset for help on using the changeset viewer.