mirror of
https://gitee.com/openharmony/ability_ability_runtime
synced 2024-11-27 09:21:28 +00:00
Fixed the issue that the sourcemap file was not caught after intercepting the read
issues:https://gitee.com/openharmony/ability_ability_runtime/issues/I77XPP Signed-off-by: Rtangyu <rentangyu@huawei.com>
This commit is contained in:
parent
97b14e77d3
commit
5b5b75ebd9
@ -191,14 +191,12 @@ void SourceMap::SplitSourceMap(const std::string& sourceMapData)
|
||||
std::string value;
|
||||
while ((leftBracket = sourceMapData.find(": {", rightBracket)) != std::string::npos) {
|
||||
rightBracket = sourceMapData.find("},", leftBracket);
|
||||
uint32_t subLeftBracket = leftBracket;
|
||||
uint32_t subRightBracket = rightBracket;
|
||||
value = sourceMapData.substr(subLeftBracket + INDEX_ONE, subRightBracket - subLeftBracket + INDEX_TWO);
|
||||
std::size_t sources = value.find("\"sources\": [");
|
||||
value = sourceMapData.substr(leftBracket, rightBracket);
|
||||
std::size_t sources = value.find("\"sources\": [");
|
||||
if (sources == std::string::npos) {
|
||||
continue;
|
||||
}
|
||||
std::size_t names = value.find("],");
|
||||
std::size_t names = value.find("],", sources);
|
||||
if (names == std::string::npos) {
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user