diff --git a/htmlparser/src/makefile.win b/htmlparser/src/makefile.win index b734bb2d867a..806c93ef9ac4 100644 --- a/htmlparser/src/makefile.win +++ b/htmlparser/src/makefile.win @@ -21,6 +21,11 @@ include <$(DEPTH)\config\config.mak> LIBRARY_NAME=raptorhtmlpars DEFINES=-D_IMPL_NS_HTMLPARS -DWIN32_LEAN_AND_MEAN -DXML_DTD + +!if defined(MOZ_PERF) +DEFINES = $(DEFINES) -DRAPTOR_PERF_METRICS +!endif + MODULE=raptor REQUIRES=xpcom raptor netlib @@ -148,6 +153,9 @@ LLIBS= \ $(DIST)\lib\expat.lib \ !ifdef NECKO $(DIST)\lib\neckoutil_s.lib \ +!endif +!ifdef MOZ_PERF + $(DIST)\lib\util.lib \ !endif $(LIBNSPR) diff --git a/htmlparser/src/nsParser.cpp b/htmlparser/src/nsParser.cpp index 9c53849f748f..7569b92c853d 100644 --- a/htmlparser/src/nsParser.cpp +++ b/htmlparser/src/nsParser.cpp @@ -636,10 +636,10 @@ nsresult nsParser::EnableParser(PRBool aState){ result=mInternalState; } + NS_STOP_STOPWATCH(mTotalTime) + // Release reference if we added one at the top of this routine NS_IF_RELEASE(me); - - NS_STOP_STOPWATCH(mTotalTime) return result; } diff --git a/parser/htmlparser/src/makefile.win b/parser/htmlparser/src/makefile.win index b734bb2d867a..806c93ef9ac4 100644 --- a/parser/htmlparser/src/makefile.win +++ b/parser/htmlparser/src/makefile.win @@ -21,6 +21,11 @@ include <$(DEPTH)\config\config.mak> LIBRARY_NAME=raptorhtmlpars DEFINES=-D_IMPL_NS_HTMLPARS -DWIN32_LEAN_AND_MEAN -DXML_DTD + +!if defined(MOZ_PERF) +DEFINES = $(DEFINES) -DRAPTOR_PERF_METRICS +!endif + MODULE=raptor REQUIRES=xpcom raptor netlib @@ -148,6 +153,9 @@ LLIBS= \ $(DIST)\lib\expat.lib \ !ifdef NECKO $(DIST)\lib\neckoutil_s.lib \ +!endif +!ifdef MOZ_PERF + $(DIST)\lib\util.lib \ !endif $(LIBNSPR) diff --git a/parser/htmlparser/src/nsParser.cpp b/parser/htmlparser/src/nsParser.cpp index 9c53849f748f..7569b92c853d 100644 --- a/parser/htmlparser/src/nsParser.cpp +++ b/parser/htmlparser/src/nsParser.cpp @@ -636,10 +636,10 @@ nsresult nsParser::EnableParser(PRBool aState){ result=mInternalState; } + NS_STOP_STOPWATCH(mTotalTime) + // Release reference if we added one at the top of this routine NS_IF_RELEASE(me); - - NS_STOP_STOPWATCH(mTotalTime) return result; }