Bug 670059 - Add some JS engine telemetry counters to measure occurrences of: E4X, __iterator__, mutable __proto__ (r=taras,waldo)

This commit is contained in:
Luke Wagner
2011-07-07 15:40:33 -07:00
parent 38f04af12b
commit 12c8958bc1
14 changed files with 182 additions and 9 deletions

View File

@@ -338,6 +338,8 @@ GetPropertyNames(JSContext *cx, JSObject *obj, uintN flags, AutoIdVector *props)
}
size_t sCustomIteratorCount = 0;
static inline bool
GetCustomIterator(JSContext *cx, JSObject *obj, uintN flags, Value *vp)
{
@@ -352,6 +354,9 @@ GetCustomIterator(JSContext *cx, JSObject *obj, uintN flags, Value *vp)
return true;
}
if (!cx->runningWithTrustedPrincipals())
++sCustomIteratorCount;
/* Otherwise call it and return that object. */
LeaveTrace(cx);
Value arg = BooleanValue((flags & JSITER_FOREACH) == 0);