mirror of
https://github.com/servo/servo
synced 2026-04-25 17:15:48 +02:00
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:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user