Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 8c73e21

Browse files
committed
Merge remote-tracking branch 'upstream/main' into revert-48083-revert_ee590d48afa19b106775c6ee68e99f58760c2637
2 parents a3544ad + 5006398 commit 8c73e21

29 files changed

+700
-109
lines changed

.ci.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,24 @@ targets:
161161
config_name: linux_benchmarks
162162
timeout: 60
163163

164+
- name: Linux Fuchsia
165+
bringup: true
166+
recipe: engine/engine
167+
properties:
168+
build_fuchsia: "true"
169+
fuchsia_ctl_version: version:0.0.27
170+
# ensure files from pre-production Fuchsia SDK tests are purged from cache
171+
clobber: "true"
172+
timeout: 90
173+
runIfNot:
174+
- lib/web_ui/**
175+
- shell/platform/android/**
176+
- shell/platform/darwin/**
177+
- shell/platform/glfw/**
178+
- shell/platform/linux/**
179+
- shell/platform/windows/**
180+
- web_sdk/**
181+
164182
- name: Linux Fuchsia FEMU
165183
recipe: engine/femu_test
166184
properties:

ci/licenses_golden/excluded_files

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@
104104
../../../flutter/fml/platform/darwin/scoped_nsobject_arc_unittests.mm
105105
../../../flutter/fml/platform/darwin/scoped_nsobject_unittests.mm
106106
../../../flutter/fml/platform/darwin/string_range_sanitization_unittests.mm
107+
../../../flutter/fml/platform/darwin/weak_nsobject_arc_unittests.mm
108+
../../../flutter/fml/platform/darwin/weak_nsobject_unittests.mm
107109
../../../flutter/fml/platform/win/file_win_unittests.cc
108110
../../../flutter/fml/platform/win/wstring_conversion_unittests.cc
109111
../../../flutter/fml/raster_thread_merger_unittests.cc

ci/licenses_golden/licenses_flutter

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2799,6 +2799,8 @@ ORIGIN: ../../../flutter/fml/platform/darwin/scoped_policy.h + ../../../flutter/
27992799
ORIGIN: ../../../flutter/fml/platform/darwin/scoped_typeref.h + ../../../flutter/LICENSE
28002800
ORIGIN: ../../../flutter/fml/platform/darwin/string_range_sanitization.h + ../../../flutter/LICENSE
28012801
ORIGIN: ../../../flutter/fml/platform/darwin/string_range_sanitization.mm + ../../../flutter/LICENSE
2802+
ORIGIN: ../../../flutter/fml/platform/darwin/weak_nsobject.h + ../../../flutter/LICENSE
2803+
ORIGIN: ../../../flutter/fml/platform/darwin/weak_nsobject.mm + ../../../flutter/LICENSE
28022804
ORIGIN: ../../../flutter/fml/platform/fuchsia/message_loop_fuchsia.cc + ../../../flutter/LICENSE
28032805
ORIGIN: ../../../flutter/fml/platform/fuchsia/message_loop_fuchsia.h + ../../../flutter/LICENSE
28042806
ORIGIN: ../../../flutter/fml/platform/fuchsia/paths_fuchsia.cc + ../../../flutter/LICENSE
@@ -5562,6 +5564,8 @@ FILE: ../../../flutter/fml/platform/darwin/scoped_policy.h
55625564
FILE: ../../../flutter/fml/platform/darwin/scoped_typeref.h
55635565
FILE: ../../../flutter/fml/platform/darwin/string_range_sanitization.h
55645566
FILE: ../../../flutter/fml/platform/darwin/string_range_sanitization.mm
5567+
FILE: ../../../flutter/fml/platform/darwin/weak_nsobject.h
5568+
FILE: ../../../flutter/fml/platform/darwin/weak_nsobject.mm
55655569
FILE: ../../../flutter/fml/platform/fuchsia/message_loop_fuchsia.cc
55665570
FILE: ../../../flutter/fml/platform/fuchsia/message_loop_fuchsia.h
55675571
FILE: ../../../flutter/fml/platform/fuchsia/paths_fuchsia.cc

fml/BUILD.gn

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ source_set("fml") {
169169
"platform/darwin/scoped_typeref.h",
170170
"platform/darwin/string_range_sanitization.h",
171171
"platform/darwin/string_range_sanitization.mm",
172+
"platform/darwin/weak_nsobject.h",
173+
"platform/darwin/weak_nsobject.mm",
172174
]
173175

174176
frameworks = [ "Foundation.framework" ]
@@ -369,7 +371,10 @@ if (enable_unittests) {
369371
}
370372

371373
if (is_mac || is_ios) {
372-
sources += [ "platform/darwin/scoped_nsobject_unittests.mm" ]
374+
sources += [
375+
"platform/darwin/scoped_nsobject_unittests.mm",
376+
"platform/darwin/weak_nsobject_unittests.mm",
377+
]
373378
}
374379

375380
if (is_win) {
@@ -399,7 +404,10 @@ if (enable_unittests) {
399404
testonly = true
400405
if (is_mac || is_ios) {
401406
cflags_objcc = flutter_cflags_objc_arc
402-
sources = [ "platform/darwin/scoped_nsobject_arc_unittests.mm" ]
407+
sources = [
408+
"platform/darwin/scoped_nsobject_arc_unittests.mm",
409+
"platform/darwin/weak_nsobject_arc_unittests.mm",
410+
]
403411
}
404412

405413
deps = [

fml/memory/ref_counted_internal.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ inline RefCountedThreadSafeBase::RefCountedThreadSafeBase()
8787
: ref_count_(1u)
8888
#ifndef NDEBUG
8989
,
90-
adoption_required_(true),
91-
destruction_started_(false)
90+
adoption_required_(true)
9291
#endif
9392
{
9493
}

fml/memory/weak_ptr_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class WeakPtrFlag : public fml::RefCountedThreadSafe<WeakPtrFlag> {
3030
void Invalidate();
3131

3232
private:
33-
bool is_valid_;
33+
bool is_valid_ = false;
3434

3535
FML_DISALLOW_COPY_AND_ASSIGN(WeakPtrFlag);
3636
};

fml/message_loop_task_queues.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ TaskQueueId MessageLoopTaskQueues::CreateTaskQueue() {
5555
return loop_id;
5656
}
5757

58-
MessageLoopTaskQueues::MessageLoopTaskQueues()
59-
: task_queue_id_counter_(0), order_(0) {
58+
MessageLoopTaskQueues::MessageLoopTaskQueues() : order_(0) {
6059
tls_task_source_grade.reset(
6160
new TaskSourceGradeHolder{TaskSourceGrade::kUnspecified});
6261
}

fml/message_loop_task_queues.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class MessageLoopTaskQueues {
155155
mutable std::mutex queue_mutex_;
156156
std::map<TaskQueueId, std::unique_ptr<TaskQueueEntry>> queue_entries_;
157157

158-
size_t task_queue_id_counter_;
158+
size_t task_queue_id_counter_ = 0;
159159

160160
std::atomic_int order_;
161161

fml/platform/android/message_loop_android.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ static ALooper* AcquireLooperForThread() {
3030

3131
MessageLoopAndroid::MessageLoopAndroid()
3232
: looper_(AcquireLooperForThread()),
33-
timer_fd_(::timerfd_create(kClockType, TFD_NONBLOCK | TFD_CLOEXEC)),
34-
running_(false) {
33+
timer_fd_(::timerfd_create(kClockType, TFD_NONBLOCK | TFD_CLOEXEC)) {
3534
FML_CHECK(looper_.is_valid());
3635
FML_CHECK(timer_fd_.is_valid());
3736

fml/platform/android/message_loop_android.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class MessageLoopAndroid : public MessageLoopImpl {
2929
private:
3030
fml::UniqueObject<ALooper*, UniqueLooperTraits> looper_;
3131
fml::UniqueFD timer_fd_;
32-
bool running_;
32+
bool running_ = false;
3333

3434
MessageLoopAndroid();
3535

0 commit comments

Comments
 (0)