Commit 747f7f51 authored by Ingvar Stepanyan's avatar Ingvar Stepanyan Committed by Commit Bot

Include source URL in source map cache key

It's not safe to cache source map object by just source map URL, because source map is always constructed with and associated with specific source URL, too, so reusing same source map object for various source URLs can end up resolving invalid locations, pointing to the first source URL it was constructed with.

This change creates an aggregate source map ID, similar to the one in SDK.DebuggerModel, by concatenating source URL, ":" and source map URL. Such ID can then be used for caching and tracking purposes.

There are more things that could be simplified here, but for now tried to make this change minimal and pretty much 1:1 replacement.

Also removed obsolete applySourceMapEdit which doesn't seem to be used anywhere.

Bug: 1012360
Change-Id: I131927a9f960526ba01412a39f22f036b1023caf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1848697
Commit-Queue: Ingvar Stepanyan <rreverser@google.com>
Auto-Submit: Ingvar Stepanyan <rreverser@google.com>
Reviewed-by: default avatarYang Guo <yangguo@chromium.org>
Reviewed-by: default avatarMathias Bynens <mathias@chromium.org>
Reviewed-by: default avatarTim van der Lippe <tvanderlippe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#705070}
parent 23fa6714
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment