Skip to content

Commit c2d56c3

Browse files
committed
fix: extended classes from snapshot blob should get the proper trimmed script name
1 parent ceb2145 commit c2d56c3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test-app/runtime/src/main/cpp/MetadataNode.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1446,7 +1446,11 @@ bool MetadataNode::GetExtendLocation(string& extendLocation, bool isTypeScriptEx
14461446
if (srcFileName == "<embedded>") {
14471447
// Corner case, extend call is coming from the heap snapshot script
14481448
// This is possible for lazily compiled code - e.g. from the body of a function
1449-
fullPathToFile = "_embedded_script_";
1449+
1450+
// Replace embedded_script with 'script' as the SBG will emit classes from the
1451+
// embedded_script file as 'Object_script_line_col', getting rid of fragments
1452+
// preceding the underscore (_)
1453+
fullPathToFile = "script";
14501454
} else {
14511455
string hardcodedPathToSkip = Constants::APP_ROOT_FOLDER_PATH;
14521456

0 commit comments

Comments
 (0)