Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Issue 1981233003: Finish migration from sameThreadBindForMojo to createBaseCallback. (Closed)

Created:
4 years, 7 months ago by Reilly Grant (use Gerrit)
Modified:
4 years, 7 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, blink-reviews, chromium-reviews, darin (slow to review), haraken, kinuko+watch, mlamouri+watch-blink_chromium.org, mvanouwerkerk+watch_chromium.org, qsr+mojo_chromium.org, timvolodine, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Finish migration from sameThreadBindForMojo to createBaseCallback. The sameThreadBindForMojo function is dangerous because it binds a raw pointer into a base::Callback. If this pointer is to a heap object then it may result in a use-after-free due to lazy sweeping. The createBaseCallback function instead relies on WTF::bind to correctly handle object lifetimes before converting between a WTF::Function and base::Callback. This patch removes sameThreadBindForMojo and converts the last few remaining uses. BUG=None Committed: https://crrev.com/c9722493dd5ef4b802028fdf429a36c29ebc2ed5 Cr-Commit-Position: refs/heads/master@{#394288}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -22 lines) Patch
M third_party/WebKit/Source/modules/battery/BatteryDispatcher.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/geolocation/Geolocation.cpp View 3 chunks +4 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/modules/payments/PaymentRequest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/vibration/VibrationController.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/vr/VRController.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/mojo/MojoHelper.h View 1 chunk +0 lines, -11 lines 0 comments Download

Messages

Total messages: 11 (5 generated)
Reilly Grant (use Gerrit)
Please take a look.
4 years, 7 months ago (2016-05-17 21:00:09 UTC) #2
haraken
LGTM
4 years, 7 months ago (2016-05-17 23:49:52 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1981233003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1981233003/1
4 years, 7 months ago (2016-05-18 00:29:42 UTC) #6
kinuko
Aha nice.
4 years, 7 months ago (2016-05-18 00:32:43 UTC) #8
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 7 months ago (2016-05-18 00:35:22 UTC) #9
commit-bot: I haz the power
4 years, 7 months ago (2016-05-18 00:36:37 UTC) #11
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/c9722493dd5ef4b802028fdf429a36c29ebc2ed5
Cr-Commit-Position: refs/heads/master@{#394288}

Powered by Google App Engine
This is Rietveld 408576698