1. 26 Mar, 2018 8 commits
    • Matt Falkenhagen's avatar
      Revert "Refactor BrowserThreadImpl, BrowserProcessSubThread, and BrowserMainLoop" · fa239c8c
      Matt Falkenhagen authored
      This reverts commit d260e9cf.
      
      Reason for revert: In Windows Canary versions since 67.0.3377.0, where this commit landed, IO thread hang reports have spiked dramatically. It is now the #1 browser crash report on Windows Canary at 33% of reports. I'm speculatively reverting this to see if the crash rate heals.
      
      Original change's description:
      > Refactor BrowserThreadImpl, BrowserProcessSubThread, and BrowserMainLoop
      >
      > This brings back the invariant that BrowserThread::IO isn't available
      > before BrowserMainLoop::CreateThreads(). This was broken to fix issue
      > 729596 to bring up the thread earlier for ServiceManager but it is
      > important that code that posts to BrowserThread::IO statically have an
      > happens-after relationship to BrowserMainLoop::CreateThreads(). Exposing
      > it statically earlier put that invariant at risk.
      >
      > Thankfully fixing issue 815225 resulted in finally reaching the long
      > sought goal of only having BrowserThread::UI/IO. Now that the IO thread
      > is also kicked off before it's named statically, BrowserThreadImpl no
      > longer needs to be a base::Thread, hence this refactoring.
      >
      > Before this CL:
      >  * BrowserThreadImpl was a base::Thread
      >    (could be a fake thread if SetMessageLoop was used)
      >  * BrowserProcessSubThread was a BrowserThreadImpl
      >    (performed a bit more initialization)
      >  * BrowserProcessSubThread was only used in production (in
      >    BrowserMainLoop)
      >  * BrowserThreadImpl was used for fake threads (BrowserMainLoop for
      >    BrowserThread::UI) and for testing (TestBrowserThread(Impl)).
      >  * BrowserThreadImpl overrode Init/Run/CleanUp() from base::Thread to
      >    perform some sanity checks as well as drive IOThread's Delegate (ref.
      >    BrowserThread::SetIOThreadDelegate())
      >  * BrowserProcessSubThread re-overrode Init/Run/CleanUp() to perform
      >    per-thread //content initialization (tests missed out on that per
      >    TestBrowserThread bypassing BrowserProcessSubThread by directly
      >    subclassing BrowserThreadImpl).
      >
      > With this CL:
      >  * BrowserThreadImpl is merely a scoped object that binds a provided
      >    SingleThreadTaskRunner to a BrowserThread::ID.
      >  * BrowserProcessSubThread is a base::Thread and performs all of the
      >    initialization and cleanup specific to //content (this means it now
      >    also manages BrowserThread::SetIOThreadDelegate())
      >  * BrowserProcessSubThread can be brought up early before being bound to
      >    a BrowserThread::ID (BrowserMainLoop handles that through
      >    BrowserProcessSubThread ::RegisterAsBrowserThread())
      >
      > Unfortunate exceptions required for this CL:
      >  * IOThread::Init() (invoked through BrowserThreadDelegate) perfoms
      >    blocking operations this was previously performed before installed
      >    the ThreadRestrictions on BrowserThread::IO. But now that //content
      >    is initialized after bringing up the thread, a
      >    base::ScopedAllowBlocking is required in scope of IOThread::Init().
      >  * TestBrowserThread previously bypassing BrowserProcessSubThread by
      >    directly subclassing BrowserThreadImpl meant it wasn't subject to
      >    ThreadRestrictions (unfortunate becomes it denies allowance
      >    verification to product code running in unit tests). Adding it back
      >    causes DCHECKs, as such
      >    BrowserProcessSubThread::AllowBlockingForTesting was added to allow
      >    this CL to pass CQ.
      >
      > Of note:
      >  * BrowserProcessSubThread is still written as though it supports many
      >    BrowserThread::IDs but in practice it's mostly always
      >    BrowserThread::IO (except in ThreadWatcherTest I think). This change
      >    was big enough that I didn't bother also breaking that
      >    generalization.
      >  * BrowserThreadImpl's constructor was made private to ensure only
      >    BrowserProcessSubThread and a few select callers get to drive it (to
      >    avoid previous missed initialization issues)
      >  * Atomics to manage BrowserThread::SetIOThreadDelegate were removed.
      >    Restriction was instead added that this only be called before
      >    initialization and after shutdown (this was already the case).
      >
      > Follow-ups to this CL:
      >  * //ios duplicates this logic and will need to undergo the same change
      >    as a follow-up
      >  * Fixing ios will allow removal of base::Thread::SetMessageLoop hack :)
      >  * Removing BrowserThreadGlobals::lock_ to address crbug.com/821034 will
      >    be much easier
      >  * BrowserThread post APIs should DCHECK rather than no-op if using a
      >    BrowserThread::ID before it's registered.
      >
      > Bug: 815225, 821034, 729596
      > Change-Id: If1038f23079df72203b1e95c7d26647f8824a726
      > Reviewed-on: https://chromium-review.googlesource.com/969104
      > Reviewed-by: John Abd-El-Malek <jam@chromium.org>
      > Commit-Queue: Gabriel Charette <gab@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#544440}
      
      TBR=gab@chromium.org,jam@chromium.org
      NOPRESUBMIT=true
      
      # Not skipping CQ checks because original CL landed > 1 day ago.
      # falken: Skipping presubmit to use deprecated ThreadResrictions::DisallowWaiting().
      
      Bug: 815225, 821034, 729596
      Change-Id: I2be97c5d8183497c005ab397c871f625b034d850
      Reviewed-on: https://chromium-review.googlesource.com/979752
      Commit-Queue: Matt Falkenhagen <falken@chromium.org>
      Reviewed-by: default avatarMatt Falkenhagen <falken@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#545725}
      fa239c8c
    • Khushal's avatar
      cc: Add some diagnostic CHECKs for sw image cache crashes. · fb48059c
      Khushal authored
      Change a few DCHECKs to CHECKs to validate if some crashes are
      resulting from using unlocked images, or incorrectly unlocking them
      earlier.
      
      R=enne@chromium.org, ericrk@chromium.org
      
      Bug: 802976
      Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
      Change-Id: Ibe0b9ef6ac52e6fafc9fd2670e20a9eefac17234
      Reviewed-on: https://chromium-review.googlesource.com/979160
      Commit-Queue: Khushal <khushalsagar@chromium.org>
      Reviewed-by: default avatarenne <enne@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#545724}
      fb48059c
    • Chih-Yu Huang's avatar
      v4l2 vea: Correct the timing of sending "force key frame" signal. · b000535f
      Chih-Yu Huang authored
      Originally, the thread to update parameter
      "V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME" is different from QBUF the
      frame, so we cannot make sure the parameter is updated right before
      the key frame is QBUF. This CL queues the parameter |force_keyframe|
      with the frame, and update the parameter before QBUF the frame.
      
      BUG=b:74501913
      TEST=pass GTS RtcVideoCodecTest#testRequestSyncFrameH264
      
      Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
      Change-Id: I1733f8ee474a0adeb8a31e6d196fdf27596a9f57
      Reviewed-on: https://chromium-review.googlesource.com/958791
      Commit-Queue: Chih-Yu Huang <akahuang@chromium.org>
      Reviewed-by: default avatarPawel Osciak <posciak@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#545723}
      b000535f
    • Eugene But's avatar
      Add Download.IOSDownloadedFileNetError to New Download Manager. · f363f54c
      Eugene But authored
      This is an existing histogram logged for the Old Download Manager.
      The histogram is already a part of histograms.xml file.
      
      Bug: 791806
      Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
      Change-Id: I720221f6a5b395d947a96a99ce7e4d6fe7bee09e
      Reviewed-on: https://chromium-review.googlesource.com/979267Reviewed-by: default avatarSylvain Defresne <sdefresne@chromium.org>
      Commit-Queue: Eugene But <eugenebut@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#545722}
      f363f54c
    • Darren Shen's avatar
      [css-typed-om] Support font properties. · 077ec79c
      Darren Shen authored
      We try to support as many font properties as possible. However, several
      font properties have not been implemented in Blink yet. Also, the
      computed value for font-stretch is wrong (it should be as specified,
      and no rounding should occur).
      
      Spec: https://drafts.css-houdini.org/css-typed-om-1/#reify-stylevalue
      
      Bug: 820299
      Change-Id: I744d03a08856bd6d0df6bd07230ec80138e6e3b7
      Reviewed-on: https://chromium-review.googlesource.com/977247Reviewed-by: default avatarRune Lillesveen <futhark@chromium.org>
      Commit-Queue: Darren Shen <shend@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#545721}
      077ec79c
    • Daniel Bratell's avatar
      Gave two kBufferSize constants unique names. · aa60d106
      Daniel Bratell authored
      In some (extreme) jumbo configurations on Mac two kBufferSize
      constants ended up in the same translation unit and caused
      a compilation error. This patch gives them unique names to
      not cause any future problems.
      
      Change-Id: I96d5e51024ff99fcb838346726aa1635127841eb
      Reviewed-on: https://chromium-review.googlesource.com/978209
      Commit-Queue: Kent Tamura <tkent@chromium.org>
      Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#545720}
      aa60d106
    • Kent Tamura's avatar
      Remove wtf/DataLog.* · 95767e0e
      Kent Tamura authored
      Remove DeprecatedDataLogF() usage from platform/heap/.
      
      Bug: 720442
      Change-Id: Iac1a3ca91c932001ecb7f0e6beee3842108668c1
      Reviewed-on: https://chromium-review.googlesource.com/977843Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
      Commit-Queue: Kent Tamura <tkent@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#545719}
      95767e0e
    • Daniel Bratell's avatar
      Avoid clashes between the kLeftToRight in OSX SDK and WTF::Unicode. · 90eb1cda
      Daniel Bratell authored
      There is a kLeftToRight in OSX's SDK and in WTF::Unicode. If
      WTF::Unicode is imported into global scope those might clash and
      this happens in some non-standard (extreme) jumbo configurations.
      
      Since "using namespace" isn't allowed per the coding standard,
      this just adds the WTF::Unicode namespace to those symbols
      that need it.
      
      Change-Id: I97c59e5ffed7d2bd0f8340f5d14b69dc532175d6
      Reviewed-on: https://chromium-review.googlesource.com/978205
      Commit-Queue: Kent Tamura <tkent@chromium.org>
      Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#545718}
      90eb1cda
  2. 25 Mar, 2018 15 commits
  3. 24 Mar, 2018 17 commits