Fixed problem that second time profiling data does not comes on inspector.
authorbunam.jeon <bunam.jeon@samsung.com>
Thu, 12 Sep 2013 04:40:57 +0000 (13:40 +0900)
committerbunam.jeon <bunam.jeon@samsung.com>
Thu, 12 Sep 2013 05:43:33 +0000 (14:43 +0900)
[Title]    Fixed problem that second time profiling data does not comes on inspector.
[Issue#]   N_SE-51553
[Problem]  Second time profiling data does not comes on inspector.
[Cause]    Use unnecessary logic
[Solution] It is a problem that has been fixed in the open source already,
           Because cherry-pick the patch.
[cherry-pick] Web Inspector: Do not disable network tracking while profiling cpu.
              https://bugs.webkit.org/show_bug.cgi?id=93359

Change-Id: Ie4ef5b272418a4afb33d55b06c73afc0b849b744

Source/WebCore/inspector/front-end/CPUProfileView.js
Source/WebCore/inspector/front-end/NetworkManager.js
Source/WebCore/inspector/front-end/ResourceTreeModel.js

index eb71ff8..3015328 100644 (file)
@@ -560,10 +560,8 @@ WebInspector.CPUProfileType.prototype = {
     {
         if (this._recording) {
             this.stopRecordingProfile();
-            WebInspector.networkManager.enableResourceTracking();
             return false;
         } else {
-            WebInspector.networkManager.disableResourceTracking();
             this.startRecordingProfile();
             return true;
         }
index fd6f61c..ecf6a59 100644 (file)
@@ -49,8 +49,6 @@ WebInspector.NetworkManager = function()
 }
 
 WebInspector.NetworkManager.EventTypes = {
-    ResourceTrackingEnabled: "ResourceTrackingEnabled",
-    ResourceTrackingDisabled: "ResourceTrackingDisabled",
     RequestStarted: "RequestStarted",
     RequestUpdated: "RequestUpdated",
     RequestFinished: "RequestFinished",
@@ -94,24 +92,6 @@ WebInspector.NetworkManager._MIMETypes = {
 }
 
 WebInspector.NetworkManager.prototype = {
-    enableResourceTracking: function()
-    {
-        function callback(error)
-        {
-            this.dispatchEventToListeners(WebInspector.NetworkManager.EventTypes.ResourceTrackingEnabled);
-        }
-        NetworkAgent.enable(callback.bind(this));
-    },
-
-    disableResourceTracking: function()
-    {
-        function callback(error)
-        {
-            this.dispatchEventToListeners(WebInspector.NetworkManager.EventTypes.ResourceTrackingDisabled);
-        }
-        NetworkAgent.disable(callback.bind(this));
-    },
-
     /**
      * @param {string} url
      * @return {WebInspector.NetworkRequest}
index e0dfbab..3616571 100644 (file)
@@ -35,7 +35,6 @@
  */
 WebInspector.ResourceTreeModel = function(networkManager)
 {
-    networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.ResourceTrackingEnabled, this._onResourceTrackingEnabled, this);
     networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.RequestUpdated, this._onRequestUpdated, this);
     networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.RequestFinished, this._onRequestUpdated, this);
     networkManager.addEventListener(WebInspector.NetworkManager.EventTypes.RequestUpdateDropped, this._onRequestUpdateDropped, this);
@@ -68,11 +67,6 @@ WebInspector.ResourceTreeModel.EventTypes = {
 }
 
 WebInspector.ResourceTreeModel.prototype = {
-    _onResourceTrackingEnabled: function()
-    {
-        this._fetchResourceTree();
-    },
-
     _fetchResourceTree: function()
     {
         this._frames = {};