Skip to content

Commit

Permalink
mac: Remove workarounds for the MessagePump timer invalidation hack.
Browse files Browse the repository at this point in the history
The CFRunLoopTimer invalidation hack has been removed from MessagePump,
so the workarounds for bugs caused by it can be removed.

Bug: 925998, 920795, 1031343
Change-Id: I0c560a5569d798b3b41f5c287b2dc36fd0fcb715
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2251746
Reviewed-by: ccameron <ccameron@chromium.org>
Reviewed-by: Lambros Lambrou <lambroslambrou@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#779929}
  • Loading branch information
rsesek authored and Commit Bot committed Jun 18, 2020
1 parent 81a14da commit 167f534
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
14 changes: 0 additions & 14 deletions chrome/app_shim/chrome_main_app_mode_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@ @implementation AppShimApplication

} // extern "C"

void PostRepeatingDelayedTask() {
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE, base::BindOnce(&PostRepeatingDelayedTask),
base::TimeDelta::FromDays(1));
}

int APP_SHIM_ENTRY_POINT_NAME(const app_mode::ChromeAppModeInfo* info) {
base::CommandLine::Init(info->argc, info->argv);

Expand Down Expand Up @@ -142,14 +136,6 @@ int APP_SHIM_ENTRY_POINT_NAME(const app_mode::ChromeAppModeInfo* info) {
ui::WindowResizeHelperMac::Get()->Init(main_task_executor.task_runner());
base::PlatformThread::SetName("CrAppShimMain");

// TODO(https://crbug.com/925998): This workaround ensures that there is
// always delayed work enqueued. If there is ever not enqueued delayed work,
// then NSMenus and NSAlerts can start misbehaving (see
// https://crbug.com/920795 for examples). This workaround is not an
// appropriate solution to the problem, and should be replaced by a fix in
// the relevant message pump code.
PostRepeatingDelayedTask();

AppShimController::Params controller_params;
// Note that |info->user_data_dir| for shims contains the app data path,
// <user_data_dir>/<profile_dir>/Web Applications/_crx_extensionid/.
Expand Down
11 changes: 0 additions & 11 deletions remoting/host/mac/permission_wizard.mm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/post_task.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "remoting/base/string_resources.h"
Expand Down Expand Up @@ -514,16 +513,6 @@ - (void)onPermissionCheckResult:(bool)result {

_hasPermission = result;

// Ugly workaround for crbug.com/1031343:
// Polling stops when permission is granted. Posting a task to execute in the
// future seems to keep the system's UI message-pump active, in order to
// render the button outlines.
// TODO(lambroslambrou): Remove this hack and fix the underlying problem.
if (_hasPermission) {
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE, base::DoNothing(), base::TimeDelta::Max());
}

if (_hasPermission && _autoAdvance) {
// Skip showing the "Next" button, and immediately kick off a permission
// check for the next page, if any.
Expand Down

0 comments on commit 167f534

Please sign in to comment.