devtools: Move debugger_value_to_json to lib.rs (#44160)

Testing: Existing tests pass
Part of: #36027

Signed-off-by: eri <eri@igalia.com>
Co-authored-by: atbrakhi <atbrakhi@igalia.com>
This commit is contained in:
eri
2026-04-13 13:19:19 +02:00
committed by GitHub
parent d58f2d4dd5
commit 38f77f4bfb
4 changed files with 53 additions and 53 deletions

View File

@@ -99,10 +99,9 @@ function createValueGrip(value, depth = 0) {
return { valueType: "-Infinity" };
} else if (Number.isNaN(value)) {
return { valueType: "NaN" };
} else if (!value && 1 / value === -Infinity) {
} else if (Object.is(value, -0)) {
return { valueType: "-0" };
}
return { valueType: "number", numberValue: value };
case "string":
return { valueType: "string", stringValue: value };