Confirmed users
205
edits
Bevis Tseng (talk | contribs) |
Bevis Tseng (talk | contribs) (Q7: How to name an annoymous runnable before supporting (Doc|Tab|System)Group labeling?) |
||
Line 279: | Line 279: | ||
* Subclass of '''nsExpirationTracker''' (The overriden method of NotifyExpired() will be triggered implicitly with a new runnable by the internal timer in nsExpirationTracker implementation. See the dependency tree of [https://bugzilla.mozilla.org/show_bug.cgi?id=1345464 bug 1345464] for the list of the sub-classes.) | * Subclass of '''nsExpirationTracker''' (The overriden method of NotifyExpired() will be triggered implicitly with a new runnable by the internal timer in nsExpirationTracker implementation. See the dependency tree of [https://bugzilla.mozilla.org/show_bug.cgi?id=1345464 bug 1345464] for the list of the sub-classes.) | ||
* The use of '''NS_New(In|Out)putStreamReadyEvent''' or the use of '''AsyncWait()''' on the '''(In|Out)putStream''' acquired from '''new Pipe()''' in js or '''NS_NewPipe()''' in native implementaiton. (These 2 use cases trigger new runnables named '''(In|Out)putStreamReadyEvent''' to the specified nsIEventTarget which needs to be labeled if the nsIEventTarget points to the main thread.) | * The use of '''NS_New(In|Out)putStreamReadyEvent''' or the use of '''AsyncWait()''' on the '''(In|Out)putStream''' acquired from '''new Pipe()''' in js or '''NS_NewPipe()''' in native implementaiton. (These 2 use cases trigger new runnables named '''(In|Out)putStreamReadyEvent''' to the specified nsIEventTarget which needs to be labeled if the nsIEventTarget points to the main thread.) | ||
* The use of '''NS_ProxyRelease''' on main thread or NS_'''ReleaseOnMainThread'''. | |||
=== Q4: How do I specify a label for an nsITimer TimerCallback? === | === Q4: How do I specify a label for an nsITimer TimerCallback? === | ||
Line 293: | Line 294: | ||
<b>A:</b> No. Only content process runnables need to be labeled. But labeling other runnables won't break anything. | <b>A:</b> No. Only content process runnables need to be labeled. But labeling other runnables won't break anything. | ||
=== Q7: How to name an annoymous runnable before supporting (Doc|Tab|System)Group labeling? === | |||
<b>A:</b> Name can be given according to the type of annoymous runnables | |||
* Subclasses of '''(Cancelable)Runnable''' classes which is displayed as "anonymous runnable" in the runnable analysis of [https://bugzilla.mozilla.org/show_bug.cgi?id=1333984 bug 1333984]. | |||
** To rename these runnables, you can invoke base classes constructor of '''(Cancelable)Runnable(const char* aName)''' in the subclass constructor. | |||
* Subclasses of '''nsIRunnable''' but not '''Runnable''' classes which is displayed as "non-nsINamed runnable" in the runnable analysis of [https://bugzilla.mozilla.org/show_bug.cgi?id=1333984 bug 1333984]. | |||
** To rename these runnables, you can either change the base class to '''Runnable''' or inherit '''nsINamed''' class and override its '''GetName''' method. | |||
* The timer callbacks of '''nsITimer::Init()''' or '''nsITimer::InitWith(FuncCallback|Callback)''' which are displayed as "Anonymous_observer_timer", "Anonymous_callback_timer", and "Anonymous_interface_timer" in the runnable analysis of [https://bugzilla.mozilla.org/show_bug.cgi?id=1333984 bug 1333984]. | |||
** To rename this timercallbacks, you can either have your nsISupport/nsIObserver class inheriting '''nsINamed''' class or call the named version of '''Timer::InitWith(NamedFuncCallback|initWithNameableFuncCallback)''' for your nsTimerCallbackFunc instance. |