don't run bookmark menu building code on separate thread as it would case

re-entrancy crashes at startup.
This commit is contained in:
pinkerton%netscape.com 2003-11-03 19:54:43 +00:00
parent c925cbe5f1
commit 04d207ce3a
2 changed files with 7 additions and 4 deletions

View File

@ -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
{

View File

@ -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];