2011-03-08 Ilya Tikhonovsky <loislo@chromium.org>
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Mar 2011 06:32:41 +0000 (06:32 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Mar 2011 06:32:41 +0000 (06:32 +0000)
        Reviewed by Pavel Feldman.

        Web Inspector: remove groupName from objectId.
        https://bugs.webkit.org/show_bug.cgi?id=55825

        * inspector/protocol/runtime-agent-expected.txt:
2011-03-08  Ilya Tikhonovsky  <loislo@chromium.org>

        Reviewed by Pavel Feldman.

        Web Inspector: remove groupName from objectId.
        https://bugs.webkit.org/show_bug.cgi?id=55825

        * inspector/InjectedScriptSource.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@80623 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/inspector/protocol/runtime-agent-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/inspector/InjectedScriptSource.js

index 358fb81823bfb77767da062e85dfacefac932191..83265d98f0bf8845c5cc6327130ce16d4ed4348e 100644 (file)
@@ -1,3 +1,12 @@
+2011-03-08  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: remove groupName from objectId.
+        https://bugs.webkit.org/show_bug.cgi?id=55825
+
+        * inspector/protocol/runtime-agent-expected.txt:
+
 2011-03-08  Xiaomei Ji  <xji@chromium.org>
 
         Reviewed by David Hyatt.
index 4258e365bdb09b24a47fe5c0896ac0a1aacf86a3..dbdbbb71ed1d26652a3f8118c156e5284534c782 100644 (file)
@@ -23,7 +23,6 @@ response:
             objectId : {
                 injectedScriptId : <number>
                 id : <number>
-                groupName : "test"
             }
             type : "object"
             description : "TestObject"
@@ -33,7 +32,7 @@ response:
 }
 
 -----------------------------------------------------------
-RuntimeAgent.evaluateOn({"injectedScriptId":<number>,"id":<number>,"groupName":"test"},"this.assignedByEvaluateOn = \"evaluateOn function works fine\";")
+RuntimeAgent.evaluateOn({"injectedScriptId":<number>,"id":<number>},"this.assignedByEvaluateOn = \"evaluateOn function works fine\";")
 
 request:
 {
@@ -44,7 +43,6 @@ request:
         objectId : {
             injectedScriptId : <number>
             id : <number>
-            groupName : "test"
         }
         expression : "this.assignedByEvaluateOn = "evaluateOn function works fine";"
     }
@@ -64,7 +62,7 @@ response:
 }
 
 -----------------------------------------------------------
-RuntimeAgent.setPropertyValue({"injectedScriptId":<number>,"id":<number>,"groupName":"test"},"assignedBySetPropertyValue","true")
+RuntimeAgent.setPropertyValue({"injectedScriptId":<number>,"id":<number>},"assignedBySetPropertyValue","true")
 
 request:
 {
@@ -75,7 +73,6 @@ request:
         objectId : {
             injectedScriptId : <number>
             id : <number>
-            groupName : "test"
         }
         propertyName : "assignedBySetPropertyValue"
         expression : "true"
@@ -91,7 +88,7 @@ response:
 }
 
 -----------------------------------------------------------
-RuntimeAgent.setPropertyValue({"injectedScriptId":<number>,"id":<number>,"groupName":"test"},"removedBySetPropertyValue","")
+RuntimeAgent.setPropertyValue({"injectedScriptId":<number>,"id":<number>},"removedBySetPropertyValue","")
 
 request:
 {
@@ -102,7 +99,6 @@ request:
         objectId : {
             injectedScriptId : <number>
             id : <number>
-            groupName : "test"
         }
         propertyName : "removedBySetPropertyValue"
         expression : ""
@@ -118,7 +114,7 @@ response:
 }
 
 -----------------------------------------------------------
-RuntimeAgent.getProperties({"injectedScriptId":<number>,"id":<number>,"groupName":"test"},false,false)
+RuntimeAgent.getProperties({"injectedScriptId":<number>,"id":<number>},false,false)
 
 request:
 {
@@ -129,7 +125,6 @@ request:
         objectId : {
             injectedScriptId : <number>
             id : <number>
-            groupName : "test"
         }
         ignoreHasOwnProperty : false
         abbreviate : false
@@ -165,7 +160,6 @@ response:
                     objectId : {
                         injectedScriptId : <number>
                         id : <number>
-                        groupName : "test"
                     }
                     type : "object"
                     description : "TestObject"
@@ -177,7 +171,7 @@ response:
 }
 
 -----------------------------------------------------------
-RuntimeAgent.releaseObject({"injectedScriptId":<number>,"id":<number>,"groupName":"test"})
+RuntimeAgent.releaseObject({"injectedScriptId":<number>,"id":<number>})
 
 request:
 {
@@ -188,7 +182,6 @@ request:
         objectId : {
             injectedScriptId : <number>
             id : <number>
-            groupName : "test"
         }
     }
 }
index c106d3f93ef8d83c295fe2f000e9b7af01eddfa9..5cffbdff0c826885450c5fd20a8d655a9cceff7f 100644 (file)
@@ -1,3 +1,12 @@
+2011-03-08  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: remove groupName from objectId.
+        https://bugs.webkit.org/show_bug.cgi?id=55825
+
+        * inspector/InjectedScriptSource.js:
+
 2011-03-08  Xiaomei Ji  <xji@chromium.org>
 
         Reviewed by David Hyatt.
index 9c662e80039114708b7ab65bb32a4bf8d95e47be..c11475033b0f4b5f17c76dea02b48dce0235f719 100644 (file)
@@ -46,6 +46,7 @@ var InjectedScript = function()
 {
     this._lastBoundObjectId = 1;
     this._idToWrappedObject = {};
+    this._idToObjectGroupName = {};
     this._objectGroups = {};
 }
 
@@ -104,7 +105,7 @@ InjectedScript.prototype = {
                         this._objectGroups[objectGroupName] = group;
                     }
                     group.push(id);
-                    objectId.groupName = objectGroupName;
+                    this._idToObjectGroupName[id] = objectGroupName;
                 }
             }
             return InjectedScript.RemoteObject.fromObject(object, objectId, abbreviate);
@@ -124,7 +125,7 @@ InjectedScript.prototype = {
         if (!group)
             return;
         for (var i = 0; i < group.length; i++)
-            delete this._idToWrappedObject[group[i]];
+            this._releaseObject(group[i]);
         delete this._objectGroups[objectGroupName];
     },
 
@@ -143,6 +144,7 @@ InjectedScript.prototype = {
     {
         var parsedObjectId = this._parseObjectId(objectId);
         var object = this._objectForId(parsedObjectId);
+        var objectGroupName = this._idToObjectGroupName[parsedObjectId.id];
 
         if (!this._isDefined(object))
             return false;
@@ -161,7 +163,7 @@ InjectedScript.prototype = {
             var isGetter = object["__lookupGetter__"] && object.__lookupGetter__(propertyName);
             if (!isGetter) {
                 try {
-                    property.value = this._wrapObject(object[propertyName], parsedObjectId.groupName, abbreviate);
+                    property.value = this._wrapObject(object[propertyName], objectGroupName, abbreviate);
                 } catch(e) {
                     property.value = new InjectedScript.RemoteObject.fromException(e);
                 }
@@ -213,7 +215,13 @@ InjectedScript.prototype = {
     releaseObject: function(objectId)
     {
         var parsedObjectId = this._parseObjectId(objectId);
-        delete this._idToWrappedObject[parsedObjectId.id];
+        this._releaseObject(parsedObjectId.id);
+    },
+
+    _releaseObject: function(id)
+    {
+        delete this._idToWrappedObject[id];
+        delete this._idToObjectGroupName[id];
     },
 
     _populatePropertyNames: function(object, resultSet)