This PR is the first of a couple of changes to allow us to parse, and carry over JSON content 64bit integer representation. This is currently not possible, as Chromium's `base::Value` only support a range of integer values that is valid to be represented JS. This work aims to store integer values outside the allowed boundaries as binary data into `base::Value`. This will be done through customisations to `base::JSONReader`, and `base::JSONWriter`. Additionally, most of the complexity will hopefully be hidden away by code generators in the json-schema-compiler. This first PR adds hooks into the visitor for `serde_json_lenient` that will allow us to provide the special conversions to binary blob data for large 64bit values that fall outside of what can be represented as double without loss. This PR is also introducing a build flag, namely, `enable_json_64bit_int_support`, to allow us to have some compile time control over to switch this feature off. This is necessary, as `redirect_cc` cannot build `//brave/chromium_src` files the same way a normal Brave build does, and therefore it is necessary to be able to switch of these customisations in that mode. Resolves https://github.com/brave/brave-browser/issues/47119
11 lines
378 B
Plaintext
11 lines
378 B
Plaintext
# Copyright (c) 2025 The Brave Authors. All rights reserved.
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
# You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
|
|
import("//brave/build/redirect_cc.gni")
|
|
|
|
declare_args() {
|
|
enable_json_64bit_int_support = !is_redirect_cc_build
|
|
}
|