diff --git a/content/browser/child_process_launcher_helper_ios.mm b/content/browser/child_process_launcher_helper_ios.mm --- a/content/browser/child_process_launcher_helper_ios.mm +++ b/content/browser/child_process_launcher_helper_ios.mm @@ -158,9 +158,18 @@ class ProcessStorage : public ProcessStorageBase { ~ProcessStorage() override { [grant_ invalidate]; } void ReleaseProcess() override { process_ = nullptr; } - NSObject* Process() { return process_; } + NSObject* Process() { + // Race-widening only: load the ARC strong pointer into a raw slot, sleep so + // a concurrent ReleaseProcess() can drop the last ref, then let ARC retain + // the (now possibly freed) value on return. No synchronization is added or + // removed; this only enlarges the existing unsynchronized window. + __unsafe_unretained NSObject* p = process_; + usleep(50 * 1000); + return p; + } private: NSObject* process_;