author | Aryeh Gregor <ayg@aryeh.name> |
Tue, 17 Apr 2012 17:36:22 +0300 | |
changeset 91861 | df9ea73ec1f4a437152e7a75c198f80803c4410b |
parent 91860 | f96f490bedabbcf1a171253d95d38affd1c04cca |
child 91862 | 55f527f49d546342968ff99f5d4e14a15de557e5 |
push id | 22480 |
push user | emorley@mozilla.com |
push date | Wed, 18 Apr 2012 00:48:48 +0000 |
treeherder | mozilla-central@93dfd98900ad [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | smaug |
bugs | 702948 |
milestone | 14.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
content/base/src/nsRange.cpp | file | annotate | diff | comparison | revisions | |
toolkit/components/telemetry/TelemetryHistograms.h | file | annotate | diff | comparison | revisions |
--- a/content/base/src/nsRange.cpp +++ b/content/base/src/nsRange.cpp @@ -57,16 +57,19 @@ #include "nsIDOMNodeList.h" #include "nsGkAtoms.h" #include "nsContentUtils.h" #include "nsGenericDOMDataNode.h" #include "nsClientRect.h" #include "nsLayoutUtils.h" #include "nsTextFrame.h" #include "nsFontFaceList.h" +#include "mozilla/Telemetry.h" + +using namespace mozilla; nsresult NS_NewContentIterator(nsIContentIterator** aInstancePtrResult); nsresult NS_NewContentSubtreeIterator(nsIContentIterator** aInstancePtrResult); /****************************************************** * stack based utilty class for managing monitor ******************************************************/ @@ -238,16 +241,19 @@ nsRange::IsNodeSelected(nsINode* aNode, /****************************************************** * constructor/destructor ******************************************************/ nsRange::~nsRange() { NS_ASSERTION(!IsInSelection(), "deleting nsRange that is in use"); + // Maybe we can remove Detach() -- bug 702948. + Telemetry::Accumulate(Telemetry::DOM_RANGE_DETACHED, mIsDetached); + // we want the side effects (releases and list removals) DoSetRange(nsnull, 0, nsnull, 0, nsnull); } /* static */ nsresult nsRange::CreateRange(nsIDOMNode* aStartParent, PRInt32 aStartOffset, nsIDOMNode* aEndParent, PRInt32 aEndOffset,
--- a/toolkit/components/telemetry/TelemetryHistograms.h +++ b/toolkit/components/telemetry/TelemetryHistograms.h @@ -396,16 +396,17 @@ HISTOGRAM(XUL_INITIAL_FRAME_CONSTRUCTION HISTOGRAM_BOOLEAN(XMLHTTPREQUEST_ASYNC_OR_SYNC, "Type of XMLHttpRequest, async or sync") HISTOGRAM_BOOLEAN(MULTIPART_XHR_RESPONSE, "XMLHttpRequest response was of type multipart/x-mixed-replace.") /** * DOM telemetry. */ HISTOGRAM(DOM_TIMERS_FIRED_PER_NATIVE_TIMEOUT, 1, 3000, 10, EXPONENTIAL, "DOM: Timer handlers called per native timer expiration") HISTOGRAM(DOM_TIMERS_RECENTLY_SET, 1, 3000, 10, EXPONENTIAL, "DOM: setTimeout/setInterval calls recently (last 30s or more)") +HISTOGRAM_BOOLEAN(DOM_RANGE_DETACHED, "DOM: Ranges that are detached on destruction (bug 702948)") /** * DOM Storage telemetry. */ #define DOMSTORAGE_HISTOGRAM(PREFIX, TYPE, TYPESTRING, DESCRIPTION) \ HISTOGRAM(PREFIX ## DOMSTORAGE_ ## TYPE ## _SIZE_BYTES, \ 1024, 32768, 10, EXPONENTIAL, "DOM storage: size of " TYPESTRING "s stored in " DESCRIPTION "Storage") #define DOMSTORAGE_KEY_VAL_SIZE(PREFIX, DESCRIPTION) \