зеркало из https://github.com/mozilla/gecko-dev.git
don't run bookmark menu building code on separate thread as it would case
re-entrancy crashes at startup.
This commit is contained in:
Родитель
c925cbe5f1
Коммит
04d207ce3a
|
@ -312,9 +312,11 @@ const int kReuseWindowOnAE = 2;
|
|||
}
|
||||
|
||||
//
|
||||
// this gets called by bookmark load background thread, so it's a possible
|
||||
// point of contention. but, it's only called once on startup, so probably
|
||||
// won't be a problem.
|
||||
// setupBookmarkMenus
|
||||
//
|
||||
// Needs to be called at startup after we've initialized the bookmark service. Currently
|
||||
// it's called on a delayed call after we run through the event loop once, but still
|
||||
// on the main thread.
|
||||
//
|
||||
- (void)setupBookmarkMenus:(BookmarkManager *)BookmarkManager
|
||||
{
|
||||
|
|
|
@ -89,7 +89,6 @@ static unsigned gFirstUserCollection = 0;
|
|||
startupLock = nil;
|
||||
[avoidRaceLock unlock];
|
||||
[avoidRaceLock release];
|
||||
[[NSApp delegate] setupBookmarkMenus:gBookmarksManager];
|
||||
[mainThreadRunLoopMessenger target:gBookmarksManager performSelector:@selector(delayedStartupItems)];
|
||||
}
|
||||
[pool release];
|
||||
|
@ -180,6 +179,8 @@ static unsigned gFirstUserCollection = 0;
|
|||
|
||||
- (void)delayedStartupItems
|
||||
{
|
||||
[[NSApp delegate] setupBookmarkMenus:gBookmarksManager];
|
||||
|
||||
// check update status of 1 bookmark every 2 minutes.
|
||||
mUpdateTimer = [NSTimer scheduledTimerWithTimeInterval:kTimeToCheckAnotherBookmark target:self selector:@selector(checkForUpdates:) userInfo:nil repeats:YES];
|
||||
[mSmartFolderManager postStartupInitialization:self];
|
||||
|
|
Загрузка…
Ссылка в новой задаче