Quantum/DOM: Difference between revisions

m
(Q7: How to name an annoymous runnable before supporting (Doc|Tab|System)Group labeling?)
Line 300: Line 300:
* 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].
* 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.
** To rename these runnables, you can invoke base classes constructor of '''(Cancelable)Runnable(const char* aName)''' in the subclass constructor.
** If your runnable instance was created from NewRunnableFunction(aFunction, ...) or NewRunnableMethod(aMethod, ...), you can call the the overloaded function of NewRunnableFunction(aName, ...) or NewRunnableMethod(aName, ...) to rename these runnables.
* 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].
* 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.
** 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].
* 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.
** 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.
Confirmed users
205

edits