Skip to content

Commit

Permalink
Bug 1865502 - Add inline atom sizes to getBuildConfiguration() r=jandem
Browse files Browse the repository at this point in the history
  • Loading branch information
hotsphink committed Dec 21, 2023
1 parent 3f12b55 commit ea24533
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions js/src/builtin/TestingFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,28 @@ static bool GetBuildConfiguration(JSContext* cx, unsigned argc, Value* vp) {
return false;
}

if (js::ThinInlineAtom::EverInstantiated) {
value = Int32Value(js::ThinInlineAtom::MAX_LENGTH_LATIN1);
if (!JS_SetProperty(cx, info, "thin-inline-atom-latin1-chars", value)) {
return false;
}

value = Int32Value(js::ThinInlineAtom::MAX_LENGTH_TWO_BYTE);
if (!JS_SetProperty(cx, info, "thin-inline-atom-two-byte-chars", value)) {
return false;
}
}

value = Int32Value(js::FatInlineAtom::MAX_LENGTH_LATIN1);
if (!JS_SetProperty(cx, info, "fat-inline-atom-latin1-chars", value)) {
return false;
}

value = Int32Value(js::FatInlineAtom::MAX_LENGTH_TWO_BYTE);
if (!JS_SetProperty(cx, info, "fat-inline-atom-two-byte-chars", value)) {
return false;
}

if (args.length() == 1) {
RootedString str(cx, ToString(cx, args[0]));
if (!str) {
Expand Down

0 comments on commit ea24533

Please sign in to comment.