New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 306348 link

Starred by 13 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug

Blocked on:
issue 325938

Blocking:
issue 311899
issue 316709
issue 336642



Sign in to add a comment

renderer_main.cc should not allocate a MessageLoopForUI or use [NSApplication sharedApplication]

Project Member Reported by darin@chromium.org, Oct 11 2013

Issue description

renderer_main.cc should not allocate a MessageLoopForUI

Current reasons for doing so:
1) #if defined(OS_MACOSX)
2) in process NPAPI

For case #1, this has to do with supporting some usage of Cocoa in the renderer.  Issue 13890  was filed to track removing Cocoa from the renderer, but we probably don't need to complete that task to drop the MessageLoopForUI. We just need to ensure that none of our Cocoa usage requires a CFRunLoop.

Nice wrote:
'...the render theme stuff listens for "render theme changed" notifications: https://code.google.com/p/chromium/codesearch#search/&q=nsnotification%20file:(renderer%7Cwebkit)&sq=package:chromium&type=cs

That's easy to plumb though if necessary.'

I think he is referring to sending IPCs from the browser process.
 
Cc: ccameron@chromium.org

Comment 2 by dxie@google.com, Oct 17 2013

Status: Available

Comment 3 by a...@chromium.org, Oct 25 2013

Cc: ianbeer@chromium.org rsesek@chromium.org
Owner: a...@chromium.org
Status: Assigned

Comment 4 by a...@chromium.org, Oct 28 2013

Status: Started
Summary: renderer_main.cc should not allocate a MessageLoopForUI or use [NSApplication sharedApplication] (was: renderer_main.cc should not allocate a MessageLoopForUI)
The main points that we need to hit are:

- In renderer_main.cc, RendererMain allocates a MessageLoop of TYPE_UI, and we want to drop the #ifdef on line 161
- In renderer_main_platform_delegate_mac.mm, RendererMainPlatformDelegate::PlatformInitialize calls [NSApplication sharedApplication] which we need to not do

Comment 5 Deleted

Comment 6 by a...@chromium.org, Oct 28 2013

Two immediate problems:
- Switching scrollbar visibility doesn't take effect on existing tabs (this was expected)
- Overlay scrollbars are not visible
- Hovering effects don't work on inset scrollbars

Comment 7 by a...@chromium.org, Nov 3 2013

Overlay scrollbars live in Blink's core/platform/ScrollbarThemeMacOverlayAPI.mm . That uses NSScrollerImp. Joy.
We should change the ScrollbarThemeMacOverlayAPI to fake the scrollbars using Skia drawing commands, instead of relying on the native interface ... that will also allow us to draw the scrollbar animations without constantly going back to the main thread (until then, we won't be able to scroll on the impl thread in most situations).

Comment 9 by a...@chromium.org, Nov 4 2013

Do I hear you volunteering? :)
Yes... though it may take some time to get to it (once the legacy renderer is killed off, things might be easier).

Comment 12 Deleted

Comment 13 by jam@chromium.org, Nov 6 2013

Darin: you didn't mention what you want for case 2. From my side, I'm very fine with removing in-process and single-process support for NPAPI anytime.
Project Member

Comment 15 by bugdroid1@chromium.org, Nov 8 2013

The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=161654

------------------------------------------------------------------------
r161654 | avi@chromium.org | 2013-11-08T22:53:10.205552Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/ScrollbarThemeMacCommon.h?r1=161654&r2=161653&pathrev=161654
   M http://src.chromium.org/viewvc/blink/trunk/Source/web/mac/WebScrollbarTheme.cpp?r1=161654&r2=161653&pathrev=161654
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/ScrollbarThemeMacCommon.mm?r1=161654&r2=161653&pathrev=161654

Have Blink be told of scrollbar changes rather than paying attention itself (Blink side part 2).

BUG=306348
TEST=no visible change; scrollbar changes still work

Review URL: https://codereview.chromium.org/63213002
------------------------------------------------------------------------

Comment 16 by jam@chromium.org, Nov 20 2013

 Issue 13890  has been merged into this issue.

Comment 17 by jam@chromium.org, Nov 20 2013

Blocking: chromium:316709
Project Member

Comment 18 by bugdroid1@chromium.org, Jan 22 2014

The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=165560

------------------------------------------------------------------------
r165560 | rsesek@chromium.org | 2014-01-22T22:45:24.402833Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/web/mac/WebScrollbarTheme.cpp?r1=165560&r2=165559&pathrev=165560
   M http://src.chromium.org/viewvc/blink/trunk/public/web/mac/WebScrollbarTheme.h?r1=165560&r2=165559&pathrev=165560

Move preferred scrollbar style preference change listening from renderer to browser, 1 of 3.

This first part just addds a new parameter (via method overloading to keep
compatibility) that will be sent in an IPC from the browser.

BUG=306348

Review URL: https://codereview.chromium.org/142033003
------------------------------------------------------------------------
Blocking: chromium:336642
Blockedon: chromium:325938
Project Member

Comment 21 by bugdroid1@chromium.org, Jan 23 2014

Project Member

Comment 22 by bugdroid1@chromium.org, Jan 23 2014

The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=165650

------------------------------------------------------------------------
r165650 | thakis@chromium.org | 2014-01-23T18:06:30.723777Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/web/mac/WebScrollbarTheme.cpp?r1=165650&r2=165649&pathrev=165650

mac: Fix build with 10.7+ sdk.

BUG=306348
TBR=rsesek@chromium.org

Review URL: https://codereview.chromium.org/145893002
------------------------------------------------------------------------
Project Member

Comment 23 by bugdroid1@chromium.org, Jan 24 2014

The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=165714

------------------------------------------------------------------------
r165714 | rsesek@chromium.org | 2014-01-24T07:37:24.815222Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/scroll/ScrollbarThemeMacCommon.h?r1=165714&r2=165713&pathrev=165714
   A http://src.chromium.org/viewvc/blink/trunk/Source/web/mac/WebScrollbarTheme.mm?r1=165714&r2=165713&pathrev=165714
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/scroll/ScrollbarThemeMacCommon.mm?r1=165714&r2=165713&pathrev=165714
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/mac/NSScrollerImpDetails.h?r1=165714&r2=165713&pathrev=165714
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/scroll/ScrollbarThemeMacOverlayAPI.mm?r1=165714&r2=165713&pathrev=165714
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/blink_platform.gypi?r1=165714&r2=165713&pathrev=165714
   D http://src.chromium.org/viewvc/blink/trunk/Source/platform/mac/NSScrollerImpDetails.mm?r1=165714&r2=165713&pathrev=165714
   M http://src.chromium.org/viewvc/blink/trunk/Source/web/web.gypi?r1=165714&r2=165713&pathrev=165714
   D http://src.chromium.org/viewvc/blink/trunk/Source/web/mac/WebScrollbarTheme.cpp?r1=165714&r2=165713&pathrev=165714
   M http://src.chromium.org/viewvc/blink/trunk/public/web/mac/WebScrollbarTheme.h?r1=165714&r2=165713&pathrev=165714
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/mac/ScrollAnimatorMac.mm?r1=165714&r2=165713&pathrev=165714

Move preferred scrollbar style preference change listening from renderer to browser, 3 of 3.

This removes the preferred style listener from Blink, now that the browser
sends the value when it changes over IPC.

BUG=306348

Review URL: https://codereview.chromium.org/136333009
------------------------------------------------------------------------
I think it's now safe to remove +[NSApplication sharedApplication] warmups from the renderer. The MessagePump still needs to be NSRunLoop based because NSScrollerImp uses |-performSelector:withObject:afterDelay:|, which enqueues work on a message queue that can only be serviced by the Foundation loop. Removing +sharedApplication warmups are still a win, though.

I'll bang on this some more, but it looks very promising.
Project Member

Comment 25 by bugdroid1@chromium.org, Jan 24 2014

The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=165774

------------------------------------------------------------------------
r165774 | hclam@chromium.org | 2014-01-24T20:22:49.961046Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/public/web/mac/WebScrollbarTheme.h?r1=165774&r2=165773&pathrev=165774
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/mac/ScrollAnimatorMac.mm?r1=165774&r2=165773&pathrev=165774
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/scroll/ScrollbarThemeMacCommon.h?r1=165774&r2=165773&pathrev=165774
   D http://src.chromium.org/viewvc/blink/trunk/Source/web/mac/WebScrollbarTheme.mm?r1=165774&r2=165773&pathrev=165774
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/scroll/ScrollbarThemeMacCommon.mm?r1=165774&r2=165773&pathrev=165774
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/mac/NSScrollerImpDetails.h?r1=165774&r2=165773&pathrev=165774
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/scroll/ScrollbarThemeMacOverlayAPI.mm?r1=165774&r2=165773&pathrev=165774
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/blink_platform.gypi?r1=165774&r2=165773&pathrev=165774
   A http://src.chromium.org/viewvc/blink/trunk/Source/platform/mac/NSScrollerImpDetails.mm?r1=165774&r2=165773&pathrev=165774
   M http://src.chromium.org/viewvc/blink/trunk/Source/web/web.gypi?r1=165774&r2=165773&pathrev=165774
   A http://src.chromium.org/viewvc/blink/trunk/Source/web/mac/WebScrollbarTheme.cpp?r1=165774&r2=165773&pathrev=165774

Revert of Move preferred scrollbar style preference change listening from renderer to browser, 3 of 3. (https://codereview.chromium.org/136333009/)

Reason for revert:
This seems to be causing a mac_rel failure and is blocking blink roll.

see here: http://build.chromium.org/p/tryserver.chromium/builders/mac_rel/builds/215993/steps/content_browsertests/logs/stdio


Original issue's description:
> Move preferred scrollbar style preference change listening from renderer to browser, 3 of 3.
> 
> This removes the preferred style listener from Blink, now that the browser
> sends the value when it changes over IPC.
> 
> BUG=306348
> 
> Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=165714

TBR=jamesr@chromium.org,thakis@chromium.org,rsesek@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=306348

Review URL: https://codereview.chromium.org/147193002
------------------------------------------------------------------------
Project Member

Comment 26 by bugdroid1@chromium.org, Jan 25 2014

------------------------------------------------------------------------
r247030 | rsesek@chromium.org | 2014-01-25T00:20:04.740159Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/browser/theme_helper_mac.mm?r1=247030&r2=247029&pathrev=247030

Move preferred scrollbar style preference change listening from renderer to browser, 4 of 3.

When --single-process, do not broker system notifications to renderers, since it
will cause some content_browsertests to DCHECK.

BUG=306348

Review URL: https://codereview.chromium.org/145013018
------------------------------------------------------------------------
Project Member

Comment 27 by bugdroid1@chromium.org, Jan 27 2014

The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=165857

------------------------------------------------------------------------
r165857 | rsesek@chromium.org | 2014-01-27T15:24:49.174722Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/web/web.gypi?r1=165857&r2=165856&pathrev=165857
   D http://src.chromium.org/viewvc/blink/trunk/Source/web/mac/WebScrollbarTheme.cpp?r1=165857&r2=165856&pathrev=165857
   M http://src.chromium.org/viewvc/blink/trunk/public/web/mac/WebScrollbarTheme.h?r1=165857&r2=165856&pathrev=165857
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/mac/ScrollAnimatorMac.mm?r1=165857&r2=165856&pathrev=165857
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/scroll/ScrollbarThemeMacCommon.h?r1=165857&r2=165856&pathrev=165857
   A http://src.chromium.org/viewvc/blink/trunk/Source/web/mac/WebScrollbarTheme.mm?r1=165857&r2=165856&pathrev=165857
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/scroll/ScrollbarThemeMacCommon.mm?r1=165857&r2=165856&pathrev=165857
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/mac/NSScrollerImpDetails.h?r1=165857&r2=165856&pathrev=165857
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/scroll/ScrollbarThemeMacOverlayAPI.mm?r1=165857&r2=165856&pathrev=165857
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/blink_platform.gypi?r1=165857&r2=165856&pathrev=165857
   D http://src.chromium.org/viewvc/blink/trunk/Source/platform/mac/NSScrollerImpDetails.mm?r1=165857&r2=165856&pathrev=165857

Revert of Revert of Move preferred scrollbar style preference change listening from renderer to browser, 3 of 3. (https://codereview.chromium.org/147193002/)

Reason for revert:
Fixed in Chromium with https://codereview.chromium.org/145013018

Original issue's description:
> Revert of Move preferred scrollbar style preference change listening from renderer to browser, 3 of 3. (https://codereview.chromium.org/136333009/)
> 
> Reason for revert:
> This seems to be causing a mac_rel failure and is blocking blink roll.
> 
> see here: http://build.chromium.org/p/tryserver.chromium/builders/mac_rel/builds/215993/steps/content_browsertests/logs/stdio
> 
> 
> Original issue's description:
> > Move preferred scrollbar style preference change listening from renderer to browser, 3 of 3.
> > 
> > This removes the preferred style listener from Blink, now that the browser
> > sends the value when it changes over IPC.
> > 
> > BUG=306348
> > 
> > Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=165714
> 
> TBR=jamesr@chromium.org,thakis@chromium.org,rsesek@chromium.org
> NOTREECHECKS=true
> NOTRY=true
> BUG=306348
> 
> Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=165774

TBR=jamesr@chromium.org,thakis@chromium.org,hclam@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=306348

Review URL: https://codereview.chromium.org/144363003
------------------------------------------------------------------------
I noticed that on 10.6, the system kills the process when you change the system theme preference between Aqua and Graphite:


Thread 0 Crashed:  CrRendererMain  Dispatch queue: com.apple.main-thread
0   libSystem.B.dylib             	0x9701dc5a __kill + 10
1   libSystem.B.dylib             	0x9701dc4c kill$UNIX2003 + 32
2   libSystem.B.dylib             	0x970b05a5 raise + 26
3   libSystem.B.dylib             	0x970c66e4 abort + 93
4   com.apple.LaunchServices      	0x930d3e94 GetOurLSSessionIDInit() + 361
5   libSystem.B.dylib             	0x96fdb300 pthread_once + 82
6   com.apple.LaunchServices      	0x930d4091 SetupCoreApplicationServicesCommunicationPort() + 241
7   com.apple.LaunchServices      	0x930d49e0 getProcessDispatchTable() + 28
8   com.apple.LaunchServices      	0x930d6d58 LSClientSideSharedMemory::GetClientSideSharedMemory(LSSessionID, bool) + 192
9   com.apple.LaunchServices      	0x930d74d8 _LSCopyApplicationInformationItem + 37
10  com.apple.AE                  	0x97d60347 aeGetThisProcess() + 69
11  com.apple.AE                  	0x97d602d4 AEEventImpl::initializeData() + 92
12  com.apple.AE                  	0x97d601b9 AEEventImpl::AEEventImpl(unsigned long, unsigned long, AEDesc const*, short, long) + 87
13  com.apple.AE                  	0x97d620ab AECreateAppleEvent + 83
14  com.apple.HIToolbox           	0x956dcbd1 NotifyThisClient(unsigned long) + 107
15  com.apple.HIToolbox           	0x9567da47 BroadcastInternal(unsigned long, void*) + 117
16  com.apple.HIToolbox           	0x9569c8a3 CFNotificationProc(__CFNotificationCenter*, void*, __CFString const*, void const*, __CFDictionary const*) + 359
17  com.apple.CoreFoundation      	0x926abaeb __CFXNotificationHandleMessage + 587
18  com.apple.CoreFoundation      	0x926ab83e __CFXNotificationReceiveFromServer + 270
19  com.apple.CoreFoundation      	0x92654702 __CFMachPortPerform + 338
20  com.apple.CoreFoundation      	0x9265046b __CFRunLoopRun + 6523
21  com.apple.CoreFoundation      	0x9264e3f4 CFRunLoopRunSpecific + 452
22  com.apple.CoreFoundation      	0x9264e221 CFRunLoopRunInMode + 97
23  com.apple.Foundation          	0x97255227 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 279
24  ...chromium.Chromium.framework	0x5f02673f base::MessagePumpNSRunLoop::DoRun(base::MessagePump::Delegate*) + 127
25  ...chromium.Chromium.framework	0x5f0261cc base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate*) + 92
26  ...chromium.Chromium.framework	0x5f079422 base::MessageLoop::RunHandler() + 162
27  ...chromium.Chromium.framework	0x5f095b4e base::RunLoop::Run() + 30
28  ...chromium.Chromium.framework	0x5f078dfa base::MessageLoop::Run() + 26
29  ...chromium.Chromium.framework	0x6262ccac content::RendererMain(content::MainFunctionParams const&) + 1900
30  ...chromium.Chromium.framework	0x5eff4ad2 content::RunNamedProcessTypeMain(std::string const&, content::MainFunctionParams const&, content::ContentMainDelegate*) + 178
31  ...chromium.Chromium.framework	0x5eff5933 content::ContentMainRunnerImpl::Run() + 371
32  ...chromium.Chromium.framework	0x5eff4820 content::ContentMain(int, char const**, content::ContentMainDelegate*) + 64
33  ...chromium.Chromium.framework	0x5e6af419 ChromeMain + 41
34  org.chromium.Chromium.helper  	0x5e6a9f78 main + 24
35  org.chromium.Chromium.helper  	0x5e6a9f55 start + 53

This Mach port is installed before main() is called, though, via a dyld initializer:

	39 : <CFRunLoopSource 0x4003b0 [0xa07a0ec0]>{locked = No, signalled = No, valid = Yes, order = 0, context = <CFMachPort 0x400000 [0xa07a0ec0]>{valid = Yes, port = 0x1403, source = 0x4003b0, callout = __CFXNotificationReceiveFromServer (0x9668a730), context = <CFMachPort context 0x111460>}}



  4  12457         mach_port_allocate:entry 
              libSystem.B.dylib`mach_msg_trap+0xa
              libSystem.B.dylib`mach_port_allocate+0x7f
              CoreFoundation`CFMachPortCreate+0x5d
              CoreFoundation`_CFXNotificationCenterCreate+0x119
              CoreFoundation`_CFXNotificationGetHostCenter+0x56
              CoreFoundation`__CFXPreferencesGetSourceForTriplet+0x162
              CoreFoundation`__CFXPreferencesGetSearchListForBundleID+0xcd
              CoreFoundation`CFPreferencesCopyAppValue+0x35
              Foundation`-[NSUserDefaults(NSUserDefaults) initWithUser:]+0x163
              Foundation`+[NSUserDefaults(NSUserDefaults) standardUserDefaults]+0x85
              AppKit`+[NSView initialize]+0xa9
              libobjc.A.dylib`_class_initialize+0x17c
              libobjc.A.dylib`_class_initialize+0x43
              libobjc.A.dylib`prepareForMethodLookup+0x42
              libobjc.A.dylib`lookUpMethod+0x56
              libobjc.A.dylib`_class_lookupMethodAndLoadCache+0x28
              libobjc.A.dylib`objc_msgSend+0x53
              libobjc.A.dylib`call_load_methods+0xbb
              libobjc.A.dylib`load_images+0x4e
              dyld`dyld::notifySingle(dyld_image_states, ImageLoader const*)+0x15d
              dyld`ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int)+0xe2
              dyld`ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int)+0x9a
              dyld`ImageLoader::runInitializers(ImageLoader::LinkContext const&)+0x3d
              dyld`dyld::initializeMainExecutable()+0x86
              dyld`dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**)+0x105d
              dyld`dyldbootstrap::start(macho_header const*, int, char const**, long)+0x30b
              dyld`_dyld_start+0x27
              0x1000

Yuck! The good news is that this only appears to happen on 10.6.
Cc: a...@chromium.org
Owner: rsesek@chromium.org
Since Mac does not have separate libraries for renderer and browser code, the browser process static initializers are run in the renderer process. CustomFrameView's swizzling logic causes the renderer to connect to the WindowServer:

  2  34484         mach_port_mod_refs:entry 
              libSystem.B.dylib`mach_port_mod_refs
              libSystem.B.dylib`bootstrap_look_up2+0x1e8
              libSystem.B.dylib`bootstrap_look_up+0x37
              CoreGraphics`lookupServerPort+0x61
              CoreGraphics`CGSServerPort+0x5d
              CoreGraphics`CGSScoreboard+0x1c
              CoreGraphics`initCGDisplayState+0x10a
              CoreGraphics`initCGDisplayMappings+0x1e
              CoreGraphics`cg_setup+0x3d
              libSystem.B.dylib`pthread_once+0x52
              CoreGraphics`CGSInitialize+0x2e
              CoreGraphics`CGSServerOperationState+0x26
              AppKit`+[NSThemeFrame initialize]+0x22
              libobjc.A.dylib`_class_initialize+0x17c
              libobjc.A.dylib`_class_initialize+0x43
              libobjc.A.dylib`prepareForMethodLookup+0x42
              libobjc.A.dylib`lookUpMethod+0x56
              libobjc.A.dylib`_class_lookupMethodAndLoadCache+0x28
              libobjc.A.dylib`objc_msgSend+0x53
              libobjc.A.dylib`look_up_method+0x6c
              Chromium Framework`+[CustomFrameView load]+0x359
              libobjc.A.dylib`call_load_methods+0xbb
              libobjc.A.dylib`load_images+0x4e
              dyld`dyld::notifySingle(dyld_image_states, ImageLoader const*)+0x15d
              dyld`ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int)+0xe2
              dyld`ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int)+0x9a
              dyld`ImageLoader::runInitializers(ImageLoader::LinkContext const&)+0x3d
              dyld`dyld::initializeMainExecutable()+0x86
              dyld`dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**)+0x105d
              dyld`dyldbootstrap::start(macho_header const*, int, char const**, long)+0x30b
              dyld`_dyld_start+0x27
              0x1000

Comment 30 by mark@chromium.org, Feb 7 2014

Cc: mark@chromium.org
Project Member

Comment 31 by bugdroid1@chromium.org, Feb 10 2014

------------------------------------------------------------------------
r250112 | rsesek@chromium.org | 2014-02-10T16:18:12.426601Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/ui/cocoa/custom_frame_view.mm?r1=250112&r2=250111&pathrev=250112

[Mac] In +[CustomFrameView load], do not perform any work if the process has a --type flag.

This flag indicates that it is a non-browser process and so does not need to
use NSWindow. By interacting with the NSThemeFrame class, its +initialize method
runs. This initializer communicates with the WindowServer. Since +load is run
from dyld as a module initializer, this effectively connects to the WindowServer
via static initialization.

BUG=306348
R=mark@chromium.org

Review URL: https://codereview.chromium.org/157763002
------------------------------------------------------------------------
Project Member

Comment 32 by bugdroid1@chromium.org, Feb 26 2014

------------------------------------------------------------------------
r253430 | rsesek@chromium.org | 2014-02-26T13:21:15.378922Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/renderer_main_platform_delegate_mac.mm?r1=253430&r2=253429&pathrev=253430

[Mac] Disable Mach IPC between renderers and cfprefsd.

BUG=306348

Review URL: https://codereview.chromium.org/148893005
------------------------------------------------------------------------

Comment 33 Deleted

Cc: srsridhar@chromium.org
Labels: Needs-Feedback
Could you please let us know if QA can verify the fix. If so, please provide us with the steps to verify the same.
Project Member

Comment 35 by bugdroid1@chromium.org, Feb 28 2014

------------------------------------------------------------------------
r253994 | rsesek@chromium.org | 2014-02-28T01:24:28.369923Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/content.gyp?r1=253994&r2=253993&pathrev=253994
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/common/sandbox_mac.mm?r1=253994&r2=253993&pathrev=253994
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/DEPS?r1=253994&r2=253993&pathrev=253994
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/renderer_main.cc?r1=253994&r2=253993&pathrev=253994
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/renderer_main_platform_delegate_mac.mm?r1=253994&r2=253993&pathrev=253994

[Mac] Remove NSApplication from the renderer.

This removes the +sharedApplication warmup from the renderer, along with the
trackpad IME hack. The hack is no longer necessary because NSApplication will no
longer connect to TSM.

BUG=306348, 311899 , 336642 , 31225 , 152566 

Review URL: https://codereview.chromium.org/177243021
------------------------------------------------------------------------
This might have caused extensive crashes on the Mac10.6 layout test bots.  Trying a revert to see.
Project Member

Comment 37 by bugdroid1@chromium.org, Feb 28 2014

------------------------------------------------------------------------
r254034 | pkasting@chromium.org | 2014-02-28T03:49:07.399677Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/DEPS?r1=254034&r2=254033&pathrev=254034
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/renderer_main.cc?r1=254034&r2=254033&pathrev=254034
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/renderer/renderer_main_platform_delegate_mac.mm?r1=254034&r2=254033&pathrev=254034
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/content.gyp?r1=254034&r2=254033&pathrev=254034
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/common/sandbox_mac.mm?r1=254034&r2=254033&pathrev=254034

Revert 253994 "[Mac] Remove NSApplication from the renderer."

Speculative revert to see if this is causing Mac10.6 layout test bots to crash.

> [Mac] Remove NSApplication from the renderer.
> 
> This removes the +sharedApplication warmup from the renderer, along with the
> trackpad IME hack. The hack is no longer necessary because NSApplication will no
> longer connect to TSM.
> 
> BUG=306348, 311899 , 336642 , 31225 , 152566 
> 
> Review URL: https://codereview.chromium.org/177243021

TBR=rsesek@chromium.org

Review URL: https://codereview.chromium.org/183743006
------------------------------------------------------------------------
Update: the next run isn't finished, but it looks like this revert cleared up the crashes.

Unfortunately, I don't seem to be able to find a crash stack.  This is a sample crashing test output from http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Mac10.6%20%28dbg%29/builds/12762/steps/webkit_tests/logs/stdio :

19:24:36.793 2679 renderer crash, pid = 4320, error_line = #CRASHED - renderer (pid 4320)
19:24:36.793 2679 killed pid 4318
19:24:36.794 2679 worker/2 virtual/fasttextautosizing/fast/text-autosizing/textarea-fontsize-change.html crashed, (stderr lines):
19:24:36.794 2679   objc[4318]: Class MockCrApp is implemented in both /Volumes/data/b/build/slave/WebKit_Mac10_6__dbg_/build/src/out/Debug/libblink_web.dylib and /Volumes/data/b/build/slave/WebKit_Mac10_6__dbg_/build/src/out/Debug/Content Shell Framework.framework/Content Shell Framework. One of the two will be used. Which one is undefined.
19:24:36.794 2679   objc[4319]: Class MockCrApp is implemented in both /Volumes/data/b/build/slave/WebKit_Mac10_6__dbg_/build/src/out/Debug/libblink_web.dylib and /Volumes/data/b/build/slave/WebKit_Mac10_6__dbg_/build/src/out/Debug/Content Shell Framework.framework/Content Shell Framework. One of the two will be used. Which one is undefined.
19:24:36.794 2679   objc[4320]: Class MockCrApp is implemented in both /Volumes/data/b/build/slave/WebKit_Mac10_6__dbg_/build/src/out/Debug/libblink_web.dylib and /Volumes/data/b/build/slave/WebKit_Mac10_6__dbg_/build/src/out/Debug/Content Shell Framework.framework/Content Shell Framework. One of the two will be used. Which one is undefined.
19:24:36.799 2653 [3312/30516] virtual/fasttextautosizing/fast/text-autosizing/textarea-fontsize-change.html failed unexpectedly (renderer crashed [pid=4320])
19:24:36.795 2679 worker/2 killing driver
19:24:36.798 2679 worker/2 virtual/fasttextautosizing/fast/text-autosizing/textarea-fontsize-change.html failed:
19:24:36.798 2679 worker/2  renderer crashed [pid=4320]
All right, here's a crash stack from the Mac 10.8 bot that disappeared after I reverted:

[ RUN      ] OutOfProcessPPAPITest.BrowserFont
<output snipped>
BrowserTestBase signal handler received SIGTERM. Backtrace:
0   browser_tests      base::debug::StackTrace::StackTrace() + 26
1   browser_tests      content::(anonymous namespace)::DumpStackTraceSignalHandler(int) + 72
2   libsystem_c.dylib  _sigtramp + 43
3   ???                0x0 + 4294967295
4   CoreFoundation     __CFRunLoopServiceMachPort + 185
5   CoreFoundation     __CFRunLoopRun + 1247
6   CoreFoundation     CFRunLoopRunSpecific + 378
7   CoreFoundation     CFRunLoopRunInMode + 123
8   HIToolbox          RunCurrentEventLoopInMode + 242
9   HIToolbox          ReceiveNextEventCommon + 374
10  HIToolbox          BlockUntilNextEventMatchingListInMode + 88
11  AppKit             _DPSNextEvent + 724
12  AppKit             -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 119
13  AppKit             -[NSApplication run] + 855
14  browser_tests      base::MessagePumpNSApplication::DoRun(base::MessagePump::Delegate*) + 446
15  browser_tests      base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate*) + 92
16  browser_tests      base::MessageLoop::RunHandler() + 162
17  browser_tests      base::RunLoop::Run() + 30
18  browser_tests      content::RunThisRunLoop(base::RunLoop*) + 84
19  browser_tests      content::RunMessageLoop() + 26
20  browser_tests      JavascriptTestObserver::Run() + 122
21  browser_tests      PPAPITestBase::RunTestURL(GURL const&) + 112
22  browser_tests      PPAPITestBase::RunTest(std::string const&) + 48
23  browser_tests      OutOfProcessPPAPITest_BrowserFont_Test::RunTestOnMainThread() + 88
24  browser_tests      InProcessBrowserTest::RunTestOnMainThreadLoop() + 204
25  browser_tests      base::internal::Invoker<1, base::internal::BindState<base::internal::RunnableAdapter<void (content::BrowserTestBase::*)()>, void (content::BrowserTestBase*), void ()(content::BrowserTestBase*)>, void ()(content::BrowserTestBase*)>::Run(base::internal::BindStateBase*) + 33
26  browser_tests      ChromeBrowserMainParts::PreMainMessageLoopRunImpl() + 5469
27  browser_tests      ChromeBrowserMainParts::PreMainMessageLoopRun() + 56
28  browser_tests      content::BrowserMainLoop::PreMainMessageLoopRun() + 57
29  browser_tests      base::internal::Invoker<1, base::internal::BindState<base::internal::RunnableAdapter<int (content::BrowserMainLoop::*)()>, int (content::BrowserMainLoop*), void (base::internal::UnretainedWrapper<content::BrowserMainLoop>)>, int ()(content::BrowserMainLoop*)>::Run(base::internal::BindStateBase*) + 33
30  browser_tests      content::StartupTaskRunner::RunAllTasksNow() + 47
31  browser_tests      content::BrowserMainLoop::CreateStartupTasks() + 697
32  browser_tests      content::BrowserMainRunnerImpl::Initialize(content::MainFunctionParams const&) + 337
33  browser_tests      content::BrowserMain(content::MainFunctionParams const&) + 170
34  browser_tests      content::BrowserTestBase::SetUp() + 1046
35  browser_tests      InProcessBrowserTest::SetUp() + 496
36  browser_tests      testing::Test::Run() + 212
37  browser_tests      testing::TestInfo::Run() + 657
38  browser_tests      testing::TestCase::Run() + 347
39  browser_tests      testing::internal::UnitTestImpl::RunAllTests() + 1371
40  browser_tests      testing::UnitTest::Run() + 103
41  browser_tests      base::TestSuite::Run() + 182
42  browser_tests      ChromeTestSuiteRunner::RunTestSuite(int, char**) + 59
43  browser_tests      (anonymous namespace)::ChromeTestLauncherDelegate::RunTestSuite(int, char**) + 34
44  browser_tests      content::LaunchTests(content::TestLauncherDelegate*, int, int, char**) + 752
45  browser_tests      LaunchChromeTests(int, ChromeTestSuiteRunner*, int, char**) + 67
46  browser_tests      main + 78
47  browser_tests      start + 53

Hmmm, I'm not convinced that crash stack is actually applicable here.  After a clean Mac 10.8 run, I just got another run with a different test that failed with a similar stack.  So you should probably ignore comment 39.
This appears to be a problem specific to ContentShell/layout tests. It looks like we create something called FakeActiveWindow in the renderer. Yuck.

Thread 0 Crashed:  CrRendererMain  Dispatch queue: com.apple.main-thread
0   libSystem.B.dylib             	0x9701dc5a __kill + 10
1   libSystem.B.dylib             	0x9701dc4c kill$UNIX2003 + 32
2   libSystem.B.dylib             	0x970b05a5 raise + 26
3   libSystem.B.dylib             	0x970c66e4 abort + 93
4   com.apple.LaunchServices      	0x930d3e94 GetOurLSSessionIDInit() + 361
5   libSystem.B.dylib             	0x96fdb300 pthread_once + 82
6   com.apple.LaunchServices      	0x930d3d1f GetOurLSSessionAttributeBits() + 37
7   com.apple.LaunchServices      	0x930d3ce4 NormalizeLSSessionID(LSSessionID) + 27
8   com.apple.LaunchServices      	0x930d2b4e _LSApplicationCheckIn + 51
9   com.apple.HIServices          	0x90cabec3 _RegisterApplication + 5348
10  com.apple.HIServices          	0x90caa9b3 GetCurrentProcess + 50
11  com.apple.HIToolbox           	0x9562be73 GetSystemUIMode + 47
12  com.apple.AppKit              	0x96253a80 _dockRect + 39
13  com.apple.AppKit              	0x962535cd _NXPositionWindowOnScreen + 654
14  com.apple.AppKit              	0x96221cec -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 415
15  com.apple.AppKit              	0x96221b47 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 71
16  com.apple.AppKit              	0x968a6622 -[NSWindow init] + 103
17  ...mium.ContentShell.framework	0x430f28c4 -[FakeActiveWindow initWithActiveControls:] + 52
18  ...mium.ContentShell.framework	0x430f2816 +[FakeActiveWindow alwaysActiveWindow] + 70
19  ...mium.ContentShell.framework	0x430f2ac9 WebTestRunner::WebTestThemeEngineMac::paintNSScrollerScrollbarThumb(SkCanvas*, blink::WebThemeEngine::State, blink::WebThemeEngine::Size, blink::WebRect const&, blink::WebThemeEngine::ScrollbarInfo const&) + 217
20  ...mium.ContentShell.framework	0x4417b945 WebCore::ScrollbarThemeMacNonOverlayAPI::paint(WebCore::ScrollbarThemeClient*, WebCore::GraphicsContext*, WebCore::IntRect const&) + 1413
21  ...mium.ContentShell.framework	0x44176a2e WebCore::Scrollbar::paint(WebCore::GraphicsContext*, WebCore::IntRect const&) + 126
22  ...mium.ContentShell.framework	0x441739d0 WebCore::ScrollView::paintScrollbar(WebCore::GraphicsContext*, WebCore::Scrollbar*, WebCore::IntRect const&) + 32
23  ...mium.ContentShell.framework	0x4498fefc WebCore::FrameView::paintScrollbar(WebCore::GraphicsContext*, WebCore::Scrollbar*, WebCore::IntRect const&) + 156
24  ...mium.ContentShell.framework	0x44173e7c WebCore::ScrollView::paint(WebCore::GraphicsContext*, WebCore::IntRect const&) + 892
25  ...mium.ContentShell.framework	0x43f3b6a7 blink::PageWidgetDelegate::paint(WebCore::Page*, blink::PageOverlayList*, SkCanvas*, blink::WebRect const&, blink::PageWidgetDelegate::CanvasBackground) + 343
26  ...mium.ContentShell.framework	0x43f86a8a blink::WebViewImpl::paint(SkCanvas*, blink::WebRect const&, blink::WebWidget::PaintOptions) + 410
27  ...mium.ContentShell.framework	0x430eaab1 WebTestRunner::WebTestProxyBase::paintInvalidatedRegion() + 401
28  ...mium.ContentShell.framework	0x430ea691 WebTestRunner::WebTestProxyBase::capturePixels() + 689
29  ...mium.ContentShell.framework	0x430fa91a content::WebKitTestRunner::CaptureDump() + 490
30  ...mium.ContentShell.framework	0x430fa717 content::WebKitTestRunner::testFinished() + 247
31  ...mium.ContentShell.framework	0x430facd4 non-virtual thunk to content::WebKitTestRunner::testFinished() + 20
32  ...mium.ContentShell.framework	0x430e0b7e WebTestRunner::TestRunner::locationChangeDone() + 190
33  ...mium.ContentShell.framework	0x430ed060 WebTestRunner::WebTestProxyBase::didFinishLoad(blink::WebFrame*) + 176
34  ...mium.ContentShell.framework	0x430ffa2d WebTestRunner::WebTestProxy<content::RenderViewImpl, content::RenderViewImplParams*>::didFinishLoad(blink::WebFrame*) + 29
35  ...mium.ContentShell.framework	0x459e7dd7 content::RenderFrameImpl::didFinishLoad(blink::WebFrame*) + 167
36  ...mium.ContentShell.framework	0x430fe60b non-virtual thunk to WebTestRunner::WebFrameTestProxy<content::RenderFrameImpl, content::RenderViewImpl*, int>::didFinishLoad(blink::WebFrame*) + 27
37  ...mium.ContentShell.framework	0x43f35a69 blink::FrameLoaderClientImpl::dispatchDidFinishLoad() + 57
38  ...mium.ContentShell.framework	0x44a56cd6 WebCore::FrameLoader::checkLoadCompleteForThisFrame() + 374
39  ...mium.ContentShell.framework	0x44a53e79 WebCore::FrameLoader::checkLoadComplete() + 217
40  ...mium.ContentShell.framework	0x44a53b98 WebCore::FrameLoader::checkCompleted() + 280
41  ...mium.ContentShell.framework	0x4495a082 WebCore::ResourceFetcher::didLoadResource(WebCore::Resource*) + 626
42  ...mium.ContentShell.framework	0x44960a81 WebCore::ResourceLoader::releaseResources() + 81
43  ...mium.ContentShell.framework	0x44961d3a WebCore::ResourceLoader::didFinishLoading(blink::WebURLLoader*, double, long long) + 202
44  ...mium.ContentShell.framework	0x458f1911 webkit_glue::WebURLLoaderImpl::Context::OnCompletedRequest(int, bool, bool, std::string const&, base::TimeTicks const&, long long) + 577
45  ...mium.ContentShell.framework	0x458d17ff content::ResourceDispatcher::OnRequestComplete(int, ResourceMsg_RequestCompleteData const&) + 479
46  ...mium.ContentShell.framework	0x458d021c content::ResourceDispatcher::DispatchMessage(IPC::Message const&) + 2204
47  ...mium.ContentShell.framework	0x458cf5b6 content::ResourceDispatcher::OnMessageReceived(IPC::Message const&) + 1030
48  ...mium.ContentShell.framework	0x4588db4c content::ChildThread::OnMessageReceived(IPC::Message const&) + 44
49  ...mium.ContentShell.framework	0x4326cf06 IPC::ChannelProxy::Context::OnDispatchMessage(IPC::Message const&) + 118
50  ...mium.ContentShell.framework	0x4326ef69 base::internal::Invoker<2, base::internal::BindState<base::internal::RunnableAdapter<void (IPC::ChannelProxy::Context::*)(IPC::Message const&)>, void ()(IPC::ChannelProxy::Context*, IPC::Message const&), void ()(IPC::ChannelProxy::Context*, IPC::Message)>, void ()(IPC::ChannelProxy::Context*, IPC::Message const&)>::Run(base::internal::BindStateBase*) + 41
51  ...mium.ContentShell.framework	0x432202fa base::MessageLoop::RunTask(base::PendingTask const&) + 634
52  ...mium.ContentShell.framework	0x43220974 base::MessageLoop::DoWork() + 596
53  ...mium.ContentShell.framework	0x431d47a4 base::MessagePumpCFRunLoopBase::RunWork() + 100
54  com.apple.CoreFoundation      	0x9265145b __CFRunLoopDoSources0 + 1563
55  com.apple.CoreFoundation      	0x9264ef1f __CFRunLoopRun + 1071
56  com.apple.CoreFoundation      	0x9264e3f4 CFRunLoopRunSpecific + 452
57  com.apple.CoreFoundation      	0x9264e221 CFRunLoopRunInMode + 97
58  com.apple.Foundation          	0x97255227 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 279
59  ...mium.ContentShell.framework	0x431d4b1f base::MessagePumpNSRunLoop::DoRun(base::MessagePump::Delegate*) + 127
60  ...mium.ContentShell.framework	0x431d45ac base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate*) + 92
61  ...mium.ContentShell.framework	0x4321fdf2 base::MessageLoop::RunHandler() + 162
62  ...mium.ContentShell.framework	0x4323a97e base::RunLoop::Run() + 30
63  ...mium.ContentShell.framework	0x4321f7ba base::MessageLoop::Run() + 26
64  ...mium.ContentShell.framework	0x45a2a2c4 content::RendererMain(content::MainFunctionParams const&) + 2004
65  ...mium.ContentShell.framework	0x43101182 content::RunNamedProcessTypeMain(std::string const&, content::MainFunctionParams const&, content::ContentMainDelegate*) + 178
66  ...mium.ContentShell.framework	0x43102003 content::ContentMainRunnerImpl::Run() + 371
67  ...mium.ContentShell.framework	0x43100ed0 content::ContentMain(int, char const**, content::ContentMainDelegate*) + 64
68  ...mium.ContentShell.framework	0x4309fcf9 ContentMain + 41 (shell_content_main.cc:14)
69  ...hromium.ContentShell.helper	0x4309bf75 start + 53

Luckily this is pretty easy to work around. If the window is created with defer:YES, then it won't try and be positioned on screen and go down this path of trying to connect to LaunchServices. This works because the FakeActiveWindow is only used to check active/key state and nothing more.

I agree with #40 that the 10.8 crash looks unrelated. That just looks like a test timeout/getting killed by the harness.
Project Member

Comment 43 by bugdroid1@chromium.org, Feb 28 2014

Project Member

Comment 44 by bugdroid1@chromium.org, Mar 1 2014

------------------------------------------------------------------------
r254380 | rsesek@chromium.org | 2014-03-01T19:38:32.163852Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/common/sandbox_mac.mm?r1=254380&r2=254379&pathrev=254380

[Mac] Re-add the NSColor sandbox warmup.

It was removed at r254175. While this is not needed in renderer processes, it is
needed for ppapi processes, specifically Flash.

BUG= 348304 ,306348
TBR=avi@chromium.org

Review URL: https://codereview.chromium.org/181063009
------------------------------------------------------------------------
Project Member

Comment 45 by bugdroid1@chromium.org, Mar 3 2014

Labels: merge-merged-1867
------------------------------------------------------------------------
r254407 | karen@chromium.org | 2014-03-02T17:19:13.718986Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/branches/1867/src/content/common/sandbox_mac.mm?r1=254407&r2=254406&pathrev=254407

Merge 254380 "[Mac] Re-add the NSColor sandbox warmup."

> [Mac] Re-add the NSColor sandbox warmup.
> 
> It was removed at r254175. While this is not needed in renderer processes, it is
> needed for ppapi processes, specifically Flash.
> 
> BUG= 348304 ,306348
> TBR=avi@chromium.org
> 
> Review URL: https://codereview.chromium.org/181063009

TBR=rsesek@chromium.org

Review URL: https://codereview.chromium.org/183803008
------------------------------------------------------------------------
Project Member

Comment 46 by bugdroid1@chromium.org, Mar 7 2014

------------------------------------------------------------------------
r255612 | rsesek@chromium.org | 2014-03-07T14:41:21.403443Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/content/common/sandbox_mac.mm?r1=255612&r2=255611&pathrev=255612

[Mac] Move NSColor sandbox warmup to only happen for ppapi.

This is not needed for renderers, and should be scoped to the right process
type.

BUG= 348304 ,306348
TEST=Flash and renderers do not crash.

Review URL: https://codereview.chromium.org/186803004
------------------------------------------------------------------------
Status: Assigned
The renderers are now down to using a NSRunLoop instead of the NSApplication loop. Until the Mac scrollbars can be made to not rely on NSTimer, though, that's as far as I can get.
These functions could be useful at some point, though calling the presently does break scrollbars:

void CGSShutdownServerConnections(void)
void CGSSetDenyWindowServerConnections(bool)
Project Member

Comment 49 by bugdroid1@chromium.org, Sep 4 2014

The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=181388

------------------------------------------------------------------
r181388 | rsesek@chromium.org | 2014-09-04T18:39:47.314963Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/mac/ScrollAnimatorMac.mm?r1=181388&r2=181387&pathrev=181388

Do not use NSAnimation to drive scrollbar animations.

NSAnimation requires a connection to WindowServer. Since it's only really being
used to drive an animation timer, simply reimplement this with Blink primitives.

BUG= 397642 ,306348, 325938 

Review URL: https://codereview.chromium.org/529103002
-----------------------------------------------------------------
Project Member

Comment 50 by bugdroid1@chromium.org, Sep 5 2014

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a602902631a762be0b49ac0af09de0c9c840e183

commit a602902631a762be0b49ac0af09de0c9c840e183
Author: rsesek <rsesek@chromium.org>
Date: Fri Sep 05 17:26:40 2014

[Mac] Shut down connections to WindowServer before engaging the sandbox.

The connection is only needed during sandbox warmup to initialize the default
color space. It was formerly needed by scrollbar NSAnimations, but that was
replaced via https://codereview.chromium.org/529103002/.

BUG= 397642 ,306348
TEST=Manually tested on 10.6-10.10.
R=avi@chromium.org

Review URL: https://codereview.chromium.org/545603002

Cr-Commit-Position: refs/heads/master@{#293546}

[modify] https://chromium.googlesource.com/chromium/src.git/+/a602902631a762be0b49ac0af09de0c9c840e183/content/renderer/renderer_main_platform_delegate_mac.mm

Project Member

Comment 51 by bugdroid1@chromium.org, Sep 7 2014

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/53ffdf90f4646dbde8df72007fbdc97f3f0220de

commit 53ffdf90f4646dbde8df72007fbdc97f3f0220de
Author: noel <noel@chromium.org>
Date: Sun Sep 07 04:39:06 2014

Revert of [Mac] Shut down connections to WindowServer before engaging the sandbox. (patchset #1 id:1 of https://codereview.chromium.org/545603002/)

Reason for revert:
Speculative revert: seems this change caused 135 layout tests failures on the webkit mac builders, from OSX 10.6-10.9

http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Mac10.6%20%28deps%29/builds/30830

Original issue's description:
> [Mac] Shut down connections to WindowServer before engaging the sandbox.
>
> The connection is only needed during sandbox warmup to initialize the default
> color space. It was formerly needed by scrollbar NSAnimations, but that was
> replaced via https://codereview.chromium.org/529103002/.
>
> BUG= 397642 ,306348
> TEST=Manually tested on 10.6-10.10.
> R=avi@chromium.org
>
> Committed: https://chromium.googlesource.com/chromium/src/+/d9707172e540487d14c53363c5d1c2151999c2d8

TBR=avi@chromium.org,rsesek@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG= 397642 ,306348

Review URL: https://codereview.chromium.org/550763002

Cr-Commit-Position: refs/heads/master@{#293653}

[modify] https://chromium.googlesource.com/chromium/src.git/+/53ffdf90f4646dbde8df72007fbdc97f3f0220de/content/renderer/renderer_main_platform_delegate_mac.mm

Project Member

Comment 53 by bugdroid1@chromium.org, Sep 10 2014

The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=181761

------------------------------------------------------------------
r181761 | rsesek@chromium.org | 2014-09-10T20:11:59.842206Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/image-decoders/ImageDecoder.h?r1=181761&r2=181760&pathrev=181761

Remove the Mac-specific path for getting the color space in ImageDecoder.

This path required a connection to the WindowServer, which should be avoided
(see the two bugs for details). Instead this data can be retrieved via the
ColorProfile class, which can access a value that has been cached during
pre-sandbox warmup.

BUG= 397642 ,306348
R=noel@chromium.org

Review URL: https://codereview.chromium.org/554033002
-----------------------------------------------------------------
Project Member

Comment 54 by bugdroid1@chromium.org, Sep 11 2014

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f3198fb3fc64878b8feb88cfae28ddb7e8bd71ec

commit f3198fb3fc64878b8feb88cfae28ddb7e8bd71ec
Author: rsesek <rsesek@chromium.org>
Date: Thu Sep 11 13:56:34 2014

[Mac] Shut down connections to WindowServer before engaging the sandbox.

The connection is only needed during sandbox warmup to initialize the default
color space. It was formerly needed by scrollbar NSAnimations, but that was
replaced via https://codereview.chromium.org/529103002/.

A similar CL was landed and reverted:
https://chromium.googlesource.com/chromium/src.git/+/53ffdf90f4646dbde8df72007fbdc97f3f0220de

BUG= 397642 , 306348
TEST=Manually tested on 10.6-10.10.

Review URL: https://codereview.chromium.org/561833006

Cr-Commit-Position: refs/heads/master@{#294382}

[modify] https://chromium.googlesource.com/chromium/src.git/+/f3198fb3fc64878b8feb88cfae28ddb7e8bd71ec/content/common/sandbox_mac.mm

Project Member

Comment 55 by bugdroid1@chromium.org, Sep 11 2014

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cef0cb9e60fb0f47562be83f8aa117899f0314d5

commit cef0cb9e60fb0f47562be83f8aa117899f0314d5
Author: rsesek <rsesek@chromium.org>
Date: Thu Sep 11 18:08:12 2014

Revert of [Mac] Shut down connections to WindowServer before engaging the sandbox. (patchset #1 id:20001 of https://codereview.chromium.org/561833006/)

Reason for revert:
Possibly caused blink test failures.

Original issue's description:
> [Mac] Shut down connections to WindowServer before engaging the sandbox.
>
> The connection is only needed during sandbox warmup to initialize the default
> color space. It was formerly needed by scrollbar NSAnimations, but that was
> replaced via https://codereview.chromium.org/529103002/.
>
> A similar CL was landed and reverted:
> https://chromium.googlesource.com/chromium/src.git/+/53ffdf90f4646dbde8df72007fbdc97f3f0220de
>
> BUG= 397642 , 306348
> TEST=Manually tested on 10.6-10.10.
>
> Committed: https://crrev.com/f3198fb3fc64878b8feb88cfae28ddb7e8bd71ec
> Cr-Commit-Position: refs/heads/master@{#294382}

TBR=jeremy@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG= 397642 , 306348

Review URL: https://codereview.chromium.org/567693002

Cr-Commit-Position: refs/heads/master@{#294421}

[modify] https://chromium.googlesource.com/chromium/src.git/+/cef0cb9e60fb0f47562be83f8aa117899f0314d5/content/common/sandbox_mac.mm

Comment 56 by noel@chromium.org, Sep 12 2014

Seems the blink theme code on mac also depends on the WindowServer.

Comment 57 by noel@chromium.org, Sep 12 2014

Possible tip: when landing chromium-side changes via the CQ, I think you can add

CQ_EXTRA_TRYBOTS=tryserver.blink:mac_blink_rel,mac_blink_dbg

to your change description: the CQ will also run blink tests with your change and prevent submit if the blink tests failed.
Project Member

Comment 58 by bugdroid1@chromium.org, Sep 15 2014

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b4d09b93421cfb242c020e1cf41cdf6374298962

commit b4d09b93421cfb242c020e1cf41cdf6374298962
Author: noel <noel@chromium.org>
Date: Mon Sep 15 06:41:01 2014

Revert of [Mac] Implement a new WebSandboxSupport method to get the display's color space. (patchset #1 id:1 of https://codereview.chromium.org/549213004/)

Reason for revert:
Not needed, used https://codereview.chromium.org/554033002 instead.

Original issue's description:
> [Mac] Implement a new WebSandboxSupport method to get the display's color space.
>
> This new interface is defined at https://codereview.chromium.org/554033002/.
>
> BUG= 397642 ,306348
> R=avi@chromium.org
>
> Committed: https://crrev.com/b6ae4d0ecc983a71a32ab1480a70e065c718c195
> Cr-Commit-Position: refs/heads/master@{#293852}

TBR=avi@chromium.org,rsesek@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG= 397642 ,306348

Review URL: https://codereview.chromium.org/563943003

Cr-Commit-Position: refs/heads/master@{#294786}

[modify] https://chromium.googlesource.com/chromium/src.git/+/b4d09b93421cfb242c020e1cf41cdf6374298962/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.cc
[modify] https://chromium.googlesource.com/chromium/src.git/+/b4d09b93421cfb242c020e1cf41cdf6374298962/content/renderer/renderer_webkitplatformsupport_impl.cc

Project Member

Comment 59 by bugdroid1@chromium.org, Oct 23 2014

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4842a0e08daada491fc519b9eade2cfd04f804ed

commit 4842a0e08daada491fc519b9eade2cfd04f804ed
Author: Robert Sesek <rsesek@chromium.org>
Date: Thu Oct 23 15:12:52 2014

[Mac] Shut down connections to WindowServer before engaging the sandbox.

This is only done for Mac OS versions 10.8 and higher.

A similar CL was landed and reverted:
https://chromium.googlesource.com/chromium/src.git/+/cef0cb9e60fb0f47562be83f8aa117899f0314d5

BUG= 397642 , 306348
TEST=Manually tested on 10.6-10.10.
R=avi@chromium.org, jeremy@chromium.org

Review URL: https://codereview.chromium.org/673443002

Cr-Commit-Position: refs/heads/master@{#300891}

[modify] https://chromium.googlesource.com/chromium/src.git/+/4842a0e08daada491fc519b9eade2cfd04f804ed/content/common/sandbox_mac.mm

Project Member

Comment 60 by bugdroid1@chromium.org, Nov 3 2014

Labels: merge-merged-2171
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/43b5d400d15fb8e1bfea129c42df7810d5a5e8f9

commit 43b5d400d15fb8e1bfea129c42df7810d5a5e8f9
Author: Robert Sesek <rsesek@chromium.org>
Date: Mon Nov 03 18:23:16 2014

[Mac] Shut down connections to WindowServer before engaging the sandbox.

This is only done for Mac OS versions 10.8 and higher.

A similar CL was landed and reverted:
https://chromium.googlesource.com/chromium/src.git/+/cef0cb9e60fb0f47562be83f8aa117899f0314d5

BUG= 397642 , 306348
TEST=Manually tested on 10.6-10.10.
R=avi@chromium.org, jeremy@chromium.org

Review URL: https://codereview.chromium.org/673443002

Cr-Commit-Position: refs/heads/master@{#300891}
(cherry picked from commit 4842a0e08daada491fc519b9eade2cfd04f804ed)

Review URL: https://codereview.chromium.org/698953002

Cr-Commit-Position: refs/branch-heads/2171@{#330}
Cr-Branched-From: 267aeeb8d85c8503a7fd12bd14654b8ea78d3974-refs/heads/master@{#297060}

[modify] https://chromium.googlesource.com/chromium/src.git/+/43b5d400d15fb8e1bfea129c42df7810d5a5e8f9/content/common/sandbox_mac.mm

(Automated-archive) Issue requiring feedback hasn't been modified/ commented on in the last 180 days, please re-open or file a new bug if this is still an issue.
Labels: -Needs-Feedback
Project Member

Comment 63 by sheriffbot@chromium.org, Jul 5 2016

Labels: Hotlist-OpenBugWithCL
A change has landed for this issue, but it's been open for over 6 months. Please review and close it if applicable. If this issue should remain open, remove the "Hotlist-OpenBugWithCL" label. If no action is taken, it will be archived in 30 days.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-OpenBugWithCL
Project Member

Comment 65 by bugdroid1@chromium.org, Nov 28 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9cf04c9e74a140d91cea9602298cace5b6277a6f

commit 9cf04c9e74a140d91cea9602298cace5b6277a6f
Author: rsesek <rsesek@chromium.org>
Date: Mon Nov 28 23:36:03 2016

[Mac] Remove NSScreen renderer sandbox warmup.

This should no longer be necessary now that the scrollbar animations are
no longer driven by NSAnimation (https://codereview.chromium.org/529103002/).

BUG=306348, 533537 
R=avi@chromium.org

Review-Url: https://codereview.chromium.org/2509273005
Cr-Commit-Position: refs/heads/master@{#434775}

[modify] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/content/common/sandbox_mac.mm
[modify] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/content/renderer/renderer_main_platform_delegate_mac.mm
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/css1/box_properties/acid_test-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/css2.1/t09-c5526c-display-00-e-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/css3/selectors3/html/css3-modsel-25-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/css3/selectors3/html/css3-modsel-70-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/css3/selectors3/xhtml/css3-modsel-25-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/css3/selectors3/xhtml/css3-modsel-70-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/css3/selectors3/xml/css3-modsel-25-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/css3/selectors3/xml/css3-modsel-70-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/fast/block/basic/011-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/fast/block/margin-collapse/103-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/fast/css/non-standard-checkbox-size-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/001-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/basic-inputs-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/checkbox/checkbox-appearance-basic-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/file/file-input-disabled-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/form-element-geometry-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/formmove-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/formmove2-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/indeterminate-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/input-appearance-height-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/input-value-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/fast/forms/radio/radio-appearance-basic-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/fast/inline/positionedLifetime-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/fast/parser/bad-xml-slash-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/fast/replaced/replaced-breaking-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/fast/text/textIteratorNilRenderer-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/fast/text/whitespace/normal-after-nowrap-breaking-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/paint/invalidation/forms/checkbox-focus-by-mouse-then-keydown-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/paint/invalidation/forms/radio-focus-by-mouse-then-keydown-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/tables/mozilla/bugs/bug1318-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/tables/mozilla/bugs/bug4527-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/tables/mozilla_expected_failures/core/captions1-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/tables/mozilla_expected_failures/core/captions2-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/virtual/parsehtmlonmainthread_coalesce/fast/parser/bad-xml-slash-expected.png
[add] https://crrev.com/9cf04c9e74a140d91cea9602298cace5b6277a6f/third_party/WebKit/LayoutTests/platform/mac-retina/virtual/parsehtmlonmainthread_sync/fast/parser/bad-xml-slash-expected.png

Project Member

Comment 66 by bugdroid1@chromium.org, Nov 30 2016

Project Member

Comment 67 by bugdroid1@chromium.org, Nov 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/028b4899bca8b8150091a11028a342e77ed880a4

commit 028b4899bca8b8150091a11028a342e77ed880a4
Author: rsesek <rsesek@chromium.org>
Date: Wed Nov 30 12:37:37 2016

Permit renderer access to Mach global-name com.apple.lsd.mapdb.

This is an XPC endpoint that provides read access to the LaunchServices
database.

BUG=306348, 533537 , 669561 
R=avi@chromium.org

Review-Url: https://codereview.chromium.org/2531163007
Cr-Commit-Position: refs/heads/master@{#435234}

[modify] https://crrev.com/028b4899bca8b8150091a11028a342e77ed880a4/content/renderer/renderer.sb

Cc: robliao@chromium.org alexclarke@chromium.org
Out of curiosity what is the status of this bug? Are there any blockers?

The scheduler team are considering removing the renderer's message loop in flavor of a SchedulerLoop and we're wondering if we'd need to copy some of the logic from MessagePumpNSRunLoop?
Mac still needs a native OS loop on the main thread, so long as we draw scrollbars and form controls using the Cocoa API. At our most recent convergence we all agreed it'd be a good idea to start doing that drawing ourselves, but I don't think anybody has the cycles to work on it.

Sign in to add a comment