mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 972075 - Add profile markers from browser element event synthesis. r=BenWa, r=vingtetun
This commit is contained in:
parent
b896a20a13
commit
6fe23512c2
@ -254,9 +254,9 @@ BrowserElementParent.prototype = {
|
|||||||
"hello": this._recvHello,
|
"hello": this._recvHello,
|
||||||
"contextmenu": this._fireCtxMenuEvent,
|
"contextmenu": this._fireCtxMenuEvent,
|
||||||
"locationchange": this._fireEventFromMsg,
|
"locationchange": this._fireEventFromMsg,
|
||||||
"loadstart": this._fireEventFromMsg,
|
"loadstart": this._fireProfiledEventFromMsg,
|
||||||
"loadend": this._fireEventFromMsg,
|
"loadend": this._fireProfiledEventFromMsg,
|
||||||
"titlechange": this._fireEventFromMsg,
|
"titlechange": this._fireProfiledEventFromMsg,
|
||||||
"iconchange": this._fireEventFromMsg,
|
"iconchange": this._fireEventFromMsg,
|
||||||
"manifestchange": this._fireEventFromMsg,
|
"manifestchange": this._fireEventFromMsg,
|
||||||
"metachange": this._fireEventFromMsg,
|
"metachange": this._fireEventFromMsg,
|
||||||
@ -267,8 +267,8 @@ BrowserElementParent.prototype = {
|
|||||||
"securitychange": this._fireEventFromMsg,
|
"securitychange": this._fireEventFromMsg,
|
||||||
"error": this._fireEventFromMsg,
|
"error": this._fireEventFromMsg,
|
||||||
"scroll": this._fireEventFromMsg,
|
"scroll": this._fireEventFromMsg,
|
||||||
"firstpaint": this._fireEventFromMsg,
|
"firstpaint": this._fireProfiledEventFromMsg,
|
||||||
"documentfirstpaint": this._fireEventFromMsg,
|
"documentfirstpaint": this._fireProfiledEventFromMsg,
|
||||||
"nextpaint": this._recvNextPaint,
|
"nextpaint": this._recvNextPaint,
|
||||||
"keyevent": this._fireKeyEvent,
|
"keyevent": this._fireKeyEvent,
|
||||||
"showmodalprompt": this._handleShowModalPrompt,
|
"showmodalprompt": this._handleShowModalPrompt,
|
||||||
@ -407,6 +407,16 @@ BrowserElementParent.prototype = {
|
|||||||
return !this._frameElement.dispatchEvent(evt);
|
return !this._frameElement.dispatchEvent(evt);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* add profiler marker for each event fired.
|
||||||
|
*/
|
||||||
|
_fireProfiledEventFromMsg: function(data) {
|
||||||
|
if (Services.profiler !== undefined) {
|
||||||
|
Services.profiler.AddMarker(data.json.msg_name);
|
||||||
|
}
|
||||||
|
this._fireEventFromMsg(data);
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fire either a vanilla or a custom event, depending on the contents of
|
* Fire either a vanilla or a custom event, depending on the contents of
|
||||||
* |data|.
|
* |data|.
|
||||||
|
@ -64,6 +64,9 @@ let initTable = [
|
|||||||
["obs", "@mozilla.org/observer-service;1", "nsIObserverService"],
|
["obs", "@mozilla.org/observer-service;1", "nsIObserverService"],
|
||||||
["perms", "@mozilla.org/permissionmanager;1", "nsIPermissionManager"],
|
["perms", "@mozilla.org/permissionmanager;1", "nsIPermissionManager"],
|
||||||
["prompt", "@mozilla.org/embedcomp/prompt-service;1", "nsIPromptService"],
|
["prompt", "@mozilla.org/embedcomp/prompt-service;1", "nsIPromptService"],
|
||||||
|
#ifdef MOZ_ENABLE_PROFILER_SPS
|
||||||
|
["profiler", "@mozilla.org/tools/profiler;1", "nsIProfiler"],
|
||||||
|
#endif
|
||||||
["scriptloader", "@mozilla.org/moz/jssubscript-loader;1", "mozIJSSubScriptLoader"],
|
["scriptloader", "@mozilla.org/moz/jssubscript-loader;1", "mozIJSSubScriptLoader"],
|
||||||
["scriptSecurityManager", "@mozilla.org/scriptsecuritymanager;1", "nsIScriptSecurityManager"],
|
["scriptSecurityManager", "@mozilla.org/scriptsecuritymanager;1", "nsIScriptSecurityManager"],
|
||||||
#ifdef MOZ_TOOLKIT_SEARCH
|
#ifdef MOZ_TOOLKIT_SEARCH
|
||||||
|
Loading…
Reference in New Issue
Block a user