marking pref file load times in timeline. For timeline builds only.

This commit is contained in:
dp%netscape.com 2001-11-27 01:39:09 +00:00
parent d4d1682471
commit 8435bcef61

View File

@ -59,6 +59,8 @@ class nsIFileSpec; // needed for prefapi_private_data.h inclusion
#include "nsIFileSpec.h"
#include "nsFileStream.h"
#include "nsITimelineService.h"
// Definitions
#define PREFS_HEADER_LINE_1 "# Mozilla User Preferences"
#define PREFS_HEADER_LINE_2 "// This is a generated file!"
@ -439,6 +441,12 @@ static nsresult openPrefFileSpec(nsIFileSpec* aFilespec, PRBool aIsErrorFatal, P
nsresult rv;
char* readBuf;
#if MOZ_TIMELINE
nsXPIDLCString str;
aFilespec->GetNativePath(getter_Copies(str));
NS_TIMELINE_MARK_FUNCTION1("load pref file", str.get());
#endif
// TODO: Validate this entire function, I seriously doubt it does what it is
// supposed to. Note for instance that gErrorOpeningUserPrefs will only
// be set if the evaluation of the config script fails AND aIsErrorFatal