summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/inspector/front-end/ExtensionServer.js
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/inspector/front-end/ExtensionServer.js')
-rw-r--r--Source/WebCore/inspector/front-end/ExtensionServer.js16
1 files changed, 12 insertions, 4 deletions
diff --git a/Source/WebCore/inspector/front-end/ExtensionServer.js b/Source/WebCore/inspector/front-end/ExtensionServer.js
index f9af7dc..9554dfa 100644
--- a/Source/WebCore/inspector/front-end/ExtensionServer.js
+++ b/Source/WebCore/inspector/front-end/ExtensionServer.js
@@ -118,7 +118,13 @@ WebInspector.ExtensionServer.prototype = {
_notifyResourceFinished: function(event)
{
var resource = event.data;
- this._postNotification("resource-finished", this._resourceId(resource), (new WebInspector.HAREntry(resource)).build());
+ if (this._hasSubscribers("resource-finished"))
+ this._postNotification("resource-finished", this._resourceId(resource), (new WebInspector.HAREntry(resource)).build());
+ },
+
+ _hasSubscribers: function(type)
+ {
+ return !!this._subscribers[type];
},
_postNotification: function(type, details)
@@ -261,16 +267,18 @@ WebInspector.ExtensionServer.prototype = {
_onReload: function(message)
{
if (typeof message.userAgent === "string")
- InspectorAgent.setUserAgentOverride(message.userAgent);
+ PageAgent.setUserAgentOverride(message.userAgent);
- InspectorAgent.reloadPage(false);
+ PageAgent.reloadPage(false);
return this._status.OK();
},
_onEvaluateOnInspectedPage: function(message, port)
{
- function callback(resultPayload)
+ function callback(error, resultPayload)
{
+ if (error)
+ return;
var resultObject = WebInspector.RemoteObject.fromPayload(resultPayload);
var result = {};
if (resultObject.isError())