1. 26 Jan, 2018 5 commits
    • edchin's avatar
      [ios] Remove use of rootViewController from autofill · 01c8891f
      edchin authored
      [UIApplication sharedApplication].keyWindow.rootViewController was
      used to present UI. Now, the appropriate view controller is
      plumbed into autofill to present UI.
      
      Bug: 791793, 692525
      Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
      Change-Id: If82b5a5ee37d2ea9778d0332dd6686949d6bbfab
      Reviewed-on: https://chromium-review.googlesource.com/882400Reviewed-by: default avatarMark Cogan <marq@chromium.org>
      Reviewed-by: default avatarMoe Ahmadi <mahmadi@chromium.org>
      Reviewed-by: default avataredchin <edchin@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#531991}
      01c8891f
    • Nico Weber's avatar
      mac: Demo of most "modern" (anno 2012) Obj-C features now that we use the 10.12 SDK. · ba12dcb8
      Nico Weber authored
      NSNumber literals, expression literals, container literals: e.g. in
      base/mac/foundation_util.mm (expression literal),
      base/mac/foundation_util_unittests.mm (NSNumber literal, container literal).
      This is a compiler feature and we have used it for years.
      https://clang.llvm.org/docs/ObjectiveCLiterals.html
      
      @implementation instance variables, in translate_bubble_controller.h
      (note that ivars referred to in the _unittest.mm need to stay in the .h).
      This requires the "modern runtime". We could use this once we we shipped
      64-bit chrome (m39, late 2014).
      
      NSDictionary and NSArray subscripting, e.g. in service_process_util_mac.mm.
      Note that for scoped_nsobject<NSArray>, you need to do ptr.get()[index].
      (We could probably return a proxy object from scoped_nsobject::operator[]
      to make that unnecessary, but that feels like it might be too clever.)
      Custom @interfaces can add their own support for subscripting.
      This has worked since the 10.8 SDK.
      
      Generics, e.g. in translate_bubble_controller.h: NSDictionary<NSNumber*, NSView*>
      instead of just NSDictionary.  This works only since the 10.11 SDK, and the
      bots had an older SDK until erikchen's 10.12 SDK work completed late last year.
      
      https://developer.apple.com/videos/play/wwdc2012/405/, click "slides", auth
      See also https://developer.apple.com/library/content/releasenotes/ObjectiveC/ObjCAvailabilityIndex/index.html
      
      We don't use property auto-synthesis because it's very magical. We build
      with -Wobjc-missing-property-synthesis to make sure the compiler informs
      us if we forget to synthesize a property in some way.
      
      We don't use arc.
      
      Bug: 324079
      Change-Id: I78659ed47829fe73c2b87cce43a83ec36deb87e8
      Reviewed-on: https://chromium-review.googlesource.com/884011
      Commit-Queue: Nico Weber <thakis@chromium.org>
      Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
      Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#531990}
      ba12dcb8
    • Hugo Holgersson's avatar
      Reland: Fix OOM crash when the in-process GPU thread starts slowly · f5f8cf9f
      Hugo Holgersson authored
      This CL got reverted because Linux debug builds crashed
      when running browser tests. I reproduced the crashes locally
      and fixed them with:
      
       -    "//content/public/gpu:gpu_sources",
       +    "//content/public/gpu",
      
      > Background:
      > Sometimes (depending on the execution order of browser's
      > GPU vs IO thread), the IO thread is shutting down while
      > the GPU thread starts up.
      >
      > Problem:
      > BrowserIO can end up in an endless loop where it tries to
      > create GPU channels => Linux OOM:
      >
      > SendOutstandingReplies()'s first while-loop never exits.
      >
      > ~GpuProcessHost
      >  GpuProcessHost::SendOutstandingReplies
      >   BrowserGpuChannelHostFactory::EstablishRequest::OnEstablishedOnIO
      >    BrowserGpuChannelHostFactory::EstablishRequest::EstablishOnIO
      >     GpuProcessHost::EstablishGpuChannel // Queues a channel_request.
      >      => SendOutstandingReplies sees another request => endless loop.
      >
      > This happens because of OnEstablishedOnIO's retry-logic.
      >
      > Solution:
      > (1) Run EstablishOnIO async. That gives
      >     SendOutstandingReplies a chance to exit its loop.
      > (2) Synchronously Stop() the GPU thread before we destruct
      >     its dependencies (here: tell it to stop starting).
      >
      > Q: What happens if we don't stop the GPU thread
      >    before we destruct BrowserChildProcessHostImpl?
      > A: We get another race (and even a crash if we use
      >    the bug description's timing):
      >
      > [15658:15698:FATAL:outgoing_broker_client_invitation.cc(52)]
      > 0 0x7fe6a522e12d base::debug::StackTrace::StackTrace()
      > 1 0x7fe6a522c02c base::debug::StackTrace::StackTrace()
      > 2 0x7fe6a52c51ea logging::LogMessage::~LogMessage()
      > 3 0x7fe69ef8262b mojo::edk::OutgoingBrokerClientInvitation
      >                  ::ExtractInProcessMessagePipe()
      > 4 0x7fe6a60592d8 content::ChildThreadImpl::Init()
      > 5 0x7fe6a605c032 content::ChildThreadImpl::ChildThreadImpl()
      > 6 0x7fe6a5eb94cf content::GpuChildThread::GpuChildThread()
      > 7 0x7fe6a5eb9e47 content::GpuChildThread::GpuChildThread()
      > 8 0x7fe6a5ee0b23 content::InProcessGpuThread::Init()
      > 9 0x7fe6a54c5b47 base::Thread::ThreadMain()
      > 10 0x7fe6a54a4161 base::(anonymous namespace)::ThreadFunc()
      > 11 0x7fe6ac4d56ba start_thread
      > 12 0x7fe691ab63dd clone
      >
      > Manual test: Follow the bug description's steps.
      > Automated test: Run content_browsertests.
      
      Bug: 799002
      Change-Id: I1d61475b35abf11c98c6a6a21be6987f6eebdb0f
      Reviewed-on: https://chromium-review.googlesource.com/886483Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
      Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
      Commit-Queue: Hugo Holgersson <hugoh@vewd.com>
      Cr-Commit-Position: refs/heads/master@{#531989}
      f5f8cf9f
    • chrome-release-bot's avatar
      Updating trunk VERSION from 3332.0 to 3333.0 · c67646fb
      chrome-release-bot authored
      # This is an automated release commit.
      # Do not revert without consulting chrome-pmo@google.com.
      NOAUTOREVERT=true
      TBR=govind@chromium.org
      
      Change-Id: Ia221f9c5086b54b9829c03ccbfdab345e9bbdb70
      Reviewed-on: https://chromium-review.googlesource.com/887906Reviewed-by: default avatarchrome-release-bot@chromium.org <chrome-release-bot@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#531988}
      c67646fb
    • Xiaohui Chen's avatar
      Add assistant internal dir to git ignore · c0b4ad77
      Xiaohui Chen authored
      Bug: None
      Change-Id: I5524c2aed18531713bfca5c047cef2f18c5c5203
      Reviewed-on: https://chromium-review.googlesource.com/887752Reviewed-by: default avatarXiaohui Chen <xiaohuic@chromium.org>
      Commit-Queue: Xiaohui Chen <xiaohuic@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#531987}
      c0b4ad77
  2. 25 Jan, 2018 35 commits