Skip to content

Commit

Permalink
Update //build to m114.0.5735.331.
Browse files Browse the repository at this point in the history
b/313662336

Change-Id: Icd93ee5afedb60c66cb1ca9277b63c17380faee9
  • Loading branch information
aee-google committed Dec 19, 2023
1 parent 8be6017 commit 6394d51
Show file tree
Hide file tree
Showing 1,207 changed files with 51,247 additions and 29,609 deletions.
2 changes: 1 addition & 1 deletion base/debug/stack_trace.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ bool IsStackFrameValid(uintptr_t fp, uintptr_t prev_fp, uintptr_t stack_end) {
}

return true;
};
}

// ScanStackForNextFrame() scans the stack for a valid frame to allow unwinding
// past system libraries. Only supported on Linux where system libraries are
Expand Down
2 changes: 1 addition & 1 deletion base/debug/stack_trace_starboard.cc
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ StackTrace::StackTrace(size_t count) {

// We can remove this call from the stack trace, since we know it is always
// going to be in it.
for (int i = 1; i < count_; ++i) {
for (unsigned int i = 1; i < count_; ++i) {
trace_[i - 1] = trace_[i];
}
}
Expand Down
2 changes: 1 addition & 1 deletion base/feature_list.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ void FeatureList::InitializeFromSharedMemory(
if (!entry->GetFeatureAndTrialName(&feature_name, &trial_name))
continue;

FieldTrial* trial = FieldTrialList::Find(trial_name.as_string());
#if defined(STARBOARD)
RegisterOverride(feature_name, override_state);
#else
FieldTrial* trial = FieldTrialList::Find(trial_name.as_string());
RegisterOverride(feature_name, override_state, trial);
#endif
}
Expand Down
1 change: 0 additions & 1 deletion base/files/file_starboard.cc
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ File::Error File::OSErrorToFileError(SbSystemError sb_error) {
case kSbFileErrorIO:
// Starboard error codes are designed to match Chromium's exactly.
return static_cast<File::Error>(sb_error);
break;
default:
NOTREACHED() << "Unrecognized SbFileError: " << sb_error;
break;
Expand Down
4 changes: 4 additions & 0 deletions base/files/important_file_writer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ void UmaHistogramTimesWithSuffix(const char* histogram_name,
UmaHistogramTimes(histogram_full_name, sample);
}

#if !defined(STARBOARD)
void LogFailure(const FilePath& path,
StringPiece histogram_suffix,
TempFileFailure failure_code,
Expand All @@ -96,6 +97,7 @@ void LogFailure(const FilePath& path,
TEMP_FILE_FAILURE_MAX);
DPLOG(WARNING) << "temp file failure: " << path.value() << " : " << message;
}
#endif

// Helper function to call WriteFileAtomically() with a
// std::unique_ptr<std::string>.
Expand All @@ -120,6 +122,7 @@ void WriteScopedStringToFileAtomically(
after_write_callback.Run(result);
}

#if !defined(STARBOARD)
void DeleteTmpFile(const FilePath& tmp_file_path,
StringPiece histogram_suffix) {
if (!DeleteFile(tmp_file_path, false)) {
Expand All @@ -128,6 +131,7 @@ void DeleteTmpFile(const FilePath& tmp_file_path,
-base::File::GetLastFileError(), -base::File::FILE_ERROR_MAX);
}
}
#endif

} // namespace

Expand Down
14 changes: 5 additions & 9 deletions base/logging.cc
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,8 @@ LogMessageHandlerFunction log_message_handler = nullptr;

// Helper functions to wrap platform differences.

#if !defined(STARBOARD)
int32_t CurrentProcessId() {
#if defined(STARBOARD)
return 0;
#else
#if defined(OS_WIN)
return GetCurrentProcessId();
#elif defined(OS_FUCHSIA)
Expand All @@ -205,13 +203,11 @@ int32_t CurrentProcessId() {
#elif defined(OS_POSIX)
return getpid();
#endif
#endif
}
#endif

#if !defined(STARBOARD)
uint64_t TickCount() {
#if defined(STARBOARD)
return starboard::CurrentMonotonicTime();
#else
#if defined(OS_WIN)
return GetTickCount();
#elif defined(OS_FUCHSIA)
Expand All @@ -232,8 +228,8 @@ uint64_t TickCount() {

return absolute_micro;
#endif
#endif
}
#endif // !defined(STARBOARD)

void DeleteFilePath(const PathString& log_name) {
#if defined(STARBOARD)
Expand Down Expand Up @@ -945,7 +941,7 @@ LogMessage::~LogMessage() {
if (InitializeLogFileHandle()) {
#if defined(STARBOARD)
SbFileSeek(g_log_file, kSbFileFromEnd, 0);
int written = 0;
unsigned int written = 0;
while (written < str_newline.length()) {
int result = SbFileWrite(g_log_file, &(str_newline.c_str()[written]),
str_newline.length() - written);
Expand Down
3 changes: 1 addition & 2 deletions base/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ bool LogOnceHelper<FILE_HASH, LINE>::logged_ = false;
#define PLOG_STREAM(severity) \
COMPACT_GOOGLE_LOG_EX_ ## severity(StarboardErrorLogMessage, \
::logging::GetLastSystemErrorCode()).stream()
#if defined(OS_WIN)
#elif defined(OS_WIN)
#define PLOG_STREAM(severity) \
COMPACT_GOOGLE_LOG_EX_ ## severity(Win32ErrorLogMessage, \
::logging::GetLastSystemErrorCode()).stream()
Expand All @@ -536,7 +536,6 @@ bool LogOnceHelper<FILE_HASH, LINE>::logged_ = false;
COMPACT_GOOGLE_LOG_EX_ ## severity(ErrnoLogMessage, \
::logging::GetLastSystemErrorCode()).stream()
#endif
#endif

#define PLOG(severity) \
LAZY_STREAM(PLOG_STREAM(severity), LOG_IS_ON(severity))
Expand Down
4 changes: 4 additions & 0 deletions base/metrics/field_trial.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const bool kUseSharedMemoryForFieldTrials = false;
const bool kUseSharedMemoryForFieldTrials = true;
#endif

#if !defined(STARBOARD)
// Constants for the field trial allocator.
const char kAllocatorName[] = "FieldTrialAllocator";

Expand All @@ -70,6 +71,7 @@ const char kAllocatorName[] = "FieldTrialAllocator";
// child processes, leading to an inconsistent view between browser and child
// processes and possibly causing crashes (see crbug.com/661617).
const size_t kFieldTrialAllocationSize = 128 << 10; // 128 KiB
#endif

// Writes out string1 and then string2 to pickle.
void WriteStringPair(Pickle* pickle,
Expand Down Expand Up @@ -209,13 +211,15 @@ void AddFeatureAndFieldTrialFlags(const char* enable_features_switch,
}
}

#if !defined(STARBOARD)
void OnOutOfMemory(size_t size) {
#if defined(OS_NACL)
NOTREACHED();
#else
TerminateBecauseOutOfMemory(size);
#endif
}
#endif

#if !defined(OS_NACL) && !defined(STARBOARD)
// Returns whether the operation succeeded.
Expand Down
2 changes: 1 addition & 1 deletion base/metrics/persistent_histogram_allocator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ GlobalHistogramAllocator::ReleaseForTesting() {

subtle::Release_Store(&g_histogram_allocator, 0);
return WrapUnique(histogram_allocator);
};
}

void GlobalHistogramAllocator::SetPersistentLocation(const FilePath& location) {
persistent_location_ = location;
Expand Down
2 changes: 1 addition & 1 deletion base/metrics/persistent_histogram_storage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ PersistentHistogramStorage::~PersistentHistogramStorage() {
allocator->used());
#if defined(STARBOARD)
int bytes_written = base::WriteFile(file_path, contents.data(), contents.size());
if (bytes_written == contents.size()) {
if (bytes_written == static_cast<int>(contents.size())) {
#else
if (!ImportantFileWriter::WriteFileAtomically(file_path, contents)) {
#endif
Expand Down
12 changes: 6 additions & 6 deletions base/numerics/clamped_math.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,12 @@ BASE_NUMERIC_ARITHMETIC_OPERATORS(Clamped, Clamp, Or, |, |=)
BASE_NUMERIC_ARITHMETIC_OPERATORS(Clamped, Clamp, Xor, ^, ^=)
BASE_NUMERIC_ARITHMETIC_VARIADIC(Clamped, Clamp, Max)
BASE_NUMERIC_ARITHMETIC_VARIADIC(Clamped, Clamp, Min)
BASE_NUMERIC_COMPARISON_OPERATORS(Clamped, IsLess, <);
BASE_NUMERIC_COMPARISON_OPERATORS(Clamped, IsLessOrEqual, <=);
BASE_NUMERIC_COMPARISON_OPERATORS(Clamped, IsGreater, >);
BASE_NUMERIC_COMPARISON_OPERATORS(Clamped, IsGreaterOrEqual, >=);
BASE_NUMERIC_COMPARISON_OPERATORS(Clamped, IsEqual, ==);
BASE_NUMERIC_COMPARISON_OPERATORS(Clamped, IsNotEqual, !=);
BASE_NUMERIC_COMPARISON_OPERATORS(Clamped, IsLess, <)
BASE_NUMERIC_COMPARISON_OPERATORS(Clamped, IsLessOrEqual, <=)
BASE_NUMERIC_COMPARISON_OPERATORS(Clamped, IsGreater, >)
BASE_NUMERIC_COMPARISON_OPERATORS(Clamped, IsGreaterOrEqual, >=)
BASE_NUMERIC_COMPARISON_OPERATORS(Clamped, IsEqual, ==)
BASE_NUMERIC_COMPARISON_OPERATORS(Clamped, IsNotEqual, !=)

} // namespace internal

Expand Down
16 changes: 8 additions & 8 deletions base/numerics/safe_conversions.h
Original file line number Diff line number Diff line change
Expand Up @@ -315,14 +315,14 @@ std::ostream& operator<<(std::ostream& os, const StrictNumeric<T>& value) {
typename UnderlyingType<R>::type>(lhs, rhs); \
}

BASE_NUMERIC_COMPARISON_OPERATORS(Strict, IsLess, <);
BASE_NUMERIC_COMPARISON_OPERATORS(Strict, IsLessOrEqual, <=);
BASE_NUMERIC_COMPARISON_OPERATORS(Strict, IsGreater, >);
BASE_NUMERIC_COMPARISON_OPERATORS(Strict, IsGreaterOrEqual, >=);
BASE_NUMERIC_COMPARISON_OPERATORS(Strict, IsEqual, ==);
BASE_NUMERIC_COMPARISON_OPERATORS(Strict, IsNotEqual, !=);

}; // namespace internal
BASE_NUMERIC_COMPARISON_OPERATORS(Strict, IsLess, <)
BASE_NUMERIC_COMPARISON_OPERATORS(Strict, IsLessOrEqual, <=)
BASE_NUMERIC_COMPARISON_OPERATORS(Strict, IsGreater, >)
BASE_NUMERIC_COMPARISON_OPERATORS(Strict, IsGreaterOrEqual, >=)
BASE_NUMERIC_COMPARISON_OPERATORS(Strict, IsEqual, ==)
BASE_NUMERIC_COMPARISON_OPERATORS(Strict, IsNotEqual, !=)

} // namespace internal

using internal::as_signed;
using internal::as_unsigned;
Expand Down
2 changes: 1 addition & 1 deletion base/power_monitor/power_observer.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class BASE_EXPORT PowerObserver {
public:
// Notification of a change in power status of the computer, such
// as from switching between battery and A/C power.
virtual void OnPowerStateChange(bool on_battery_power){};
virtual void OnPowerStateChange(bool on_battery_power){}

// Notification that the system is suspending.
virtual void OnSuspend() {}
Expand Down
4 changes: 4 additions & 0 deletions base/process/process_handle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,23 @@
namespace base {

namespace {
#if !defined(STARBOARD)
bool g_have_unique_id = false;
uint32_t g_unique_id;

// The process which set |g_unique_id|.
ProcessId g_procid;
#endif

#if !defined(STARBOARD)
// Mangle IDs so that they are not accidentally used as PIDs, e.g. as an
// argument to kill or waitpid.
uint32_t MangleProcessId(ProcessId process_id) {
// Add a large power of 10 so that the pid is still the pid is still readable
// inside the mangled id.
return static_cast<uint32_t>(process_id) + 1000000000U;
}
#endif // !defined(STARBOARD)

} // namespace

Expand Down
1 change: 0 additions & 1 deletion base/strings/safe_sprintf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,6 @@ ssize_t SafeSNPrintf(char* buf, size_t sz, const char* fmt, const Arg* args,
goto format_character_found;
}
}
break;
case 'c': { // Output an ASCII character.
// Check that there are arguments left to be inserted.
if (cur_arg >= max_args) {
Expand Down
2 changes: 2 additions & 0 deletions base/task/task_scheduler/scheduler_worker_pool_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,14 @@ constexpr TimeDelta SchedulerWorkerPoolImpl::kBlockedWorkersPollPeriod;
namespace {

constexpr char kPoolNameSuffix[] = "Pool";
#if !defined(STARBOARD)
constexpr char kDetachDurationHistogramPrefix[] =
"TaskScheduler.DetachDuration.";
constexpr char kNumTasksBeforeDetachHistogramPrefix[] =
"TaskScheduler.NumTasksBeforeDetach.";
constexpr char kNumTasksBetweenWaitsHistogramPrefix[] =
"TaskScheduler.NumTasksBetweenWaits.";
#endif
constexpr char kNumThreadsHistogramPrefix[] = "TaskScheduler.NumWorkers.";
#ifdef STARBOARD
const size_t kMaxNumberOfWorkers = kSbMaxThreads;
Expand Down
2 changes: 1 addition & 1 deletion base/task/task_scheduler/sequence_sort_key.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class BASE_EXPORT SequenceSortKey final {
}
bool operator!=(const SequenceSortKey& other) const {
return !(other == *this);
};
}

private:
// The private section allows this class to keep its immutable property while
Expand Down
2 changes: 1 addition & 1 deletion base/trace_event/memory_allocator_dump.cc
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ uint64_t MemoryAllocatorDump::GetSizeInternal() const {
}
}
return 0;
};
}

MemoryAllocatorDump::Entry::Entry() : entry_type(kString), value_uint64() {}
MemoryAllocatorDump::Entry::Entry(MemoryAllocatorDump::Entry&&) noexcept =
Expand Down
8 changes: 7 additions & 1 deletion base/trace_event/process_memory_dump.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ size_t ProcessMemoryDump::CountResidentBytes(void* start_address,
const size_t kMaxChunkSize = 8 * 1024 * 1024;
size_t max_vec_size =
GetSystemPageCount(std::min(mapped_size, kMaxChunkSize), page_size);
#if defined(OS_WIN)
#if defined(STARBOARD)
ALLOW_UNUSED_LOCAL(max_vec_size);
#elif defined(OS_WIN)
std::unique_ptr<PSAPI_WORKING_SET_EX_INFORMATION[]> vec(
new PSAPI_WORKING_SET_EX_INFORMATION[max_vec_size]);
#elif defined(OS_MACOSX)
Expand All @@ -112,6 +114,10 @@ size_t ProcessMemoryDump::CountResidentBytes(void* start_address,
const size_t chunk_size = std::min(mapped_size - offset, kMaxChunkSize);
const size_t page_count = GetSystemPageCount(chunk_size, page_size);
size_t resident_page_count = 0;
#if defined(STARBOARD)
ALLOW_UNUSED_LOCAL(chunk_start);
ALLOW_UNUSED_LOCAL(page_count);
#endif
#if defined(OS_WIN)
for (size_t i = 0; i < page_count; i++) {
vec[i].VirtualAddress =
Expand Down
2 changes: 1 addition & 1 deletion base/trace_event/process_memory_dump.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ class BASE_EXPORT ProcessMemoryDump {
const UnguessableToken& process_token() const { return process_token_; }
void set_process_token_for_testing(UnguessableToken token) {
process_token_ = token;
};
}

// Returns the Guid of the dump for the given |absolute_name| for
// for the given process' token. |process_token| is used to disambiguate GUIDs
Expand Down
4 changes: 4 additions & 0 deletions base/trace_event/trace_config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const char kTraceBufferSizeInEvents[] = "trace_buffer_size_in_events";
const char kEnableSystraceParam[] = "enable_systrace";
const char kEnableArgumentFilterParam[] = "enable_argument_filter";

#if !defined(STARBOARD)
// String parameters that is used to parse memory dump config in trace config
// string.
const char kMemoryDumpConfigParam[] = "memory_dump_config";
Expand All @@ -45,6 +46,7 @@ const char kTriggerTypeParam[] = "type";
const char kPeriodicIntervalLegacyParam[] = "periodic_interval_ms";
const char kHeapProfilerOptions[] = "heap_profiler_options";
const char kBreakdownThresholdBytes[] = "breakdown_threshold_bytes";
#endif

// String parameters used to parse category event filters.
const char kEventFiltersParam[] = "event_filters";
Expand All @@ -70,6 +72,7 @@ class ConvertableTraceConfigToTraceFormat
const TraceConfig trace_config_;
};

#if !defined(STARBOARD)
std::set<MemoryDumpLevelOfDetail> GetDefaultAllowedMemoryDumpModes() {
std::set<MemoryDumpLevelOfDetail> all_modes;
for (uint32_t mode = static_cast<uint32_t>(MemoryDumpLevelOfDetail::FIRST);
Expand All @@ -78,6 +81,7 @@ std::set<MemoryDumpLevelOfDetail> GetDefaultAllowedMemoryDumpModes() {
}
return all_modes;
}
#endif

} // namespace

Expand Down
2 changes: 1 addition & 1 deletion base/trace_event/trace_event_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class BASE_EXPORT ConvertableToTraceFormat {
virtual void AppendAsTraceFormat(std::string* out) const = 0;

virtual void EstimateTraceMemoryOverhead(
TraceEventMemoryOverhead* overhead){};
TraceEventMemoryOverhead* overhead){}

std::string ToString() const {
std::string result;
Expand Down
2 changes: 2 additions & 0 deletions base/trace_event/trace_event_memory_overhead.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ namespace trace_event {

namespace {

#if !defined(STARBOARD)
const char* ObjectTypeToString(TraceEventMemoryOverhead::ObjectType type) {
switch (type) {
case TraceEventMemoryOverhead::kOther:
Expand Down Expand Up @@ -55,6 +56,7 @@ const char* ObjectTypeToString(TraceEventMemoryOverhead::ObjectType type) {
NOTREACHED();
return "BUG";
}
#endif

} // namespace

Expand Down
1 change: 1 addition & 0 deletions build/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ciopfs
/android/bin
/android/binary_size/apks/**/*.apk
/args/chromeos/*.gni
/args/chromeos/rewrapper*
/config/gclient_args.gni
/cros_cache/
/Debug
Expand Down
Loading

0 comments on commit 6394d51

Please sign in to comment.