[Webkit-unassigned] [Bug 140919] New: WeakMap Object key expected to be garbage collected is not

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 26 19:21:34 PST 2015


https://bugs.webkit.org/show_bug.cgi?id=140919

            Bug ID: 140919
           Summary: WeakMap Object key expected to be garbage collected is
                    not
    Classification: Unclassified
           Product: WebKit
           Version: 528+ (Nightly build)
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: joepeck at webkit.org
                CC: ggaren at apple.com, joepeck at webkit.org,
                    mark.lam at apple.com, timothy at apple.com

* SUMMARY
In a LayoutTest I am adding to test WeakMap, an Object I expected to be garbage collected is not. This reproduces 100% for me in Debug (x84_64) builds, but does not in Release builds on the same machine.

* STEPS TO REPRODUCE
1. shell> run-webkit-tests --debug LayoutTests/inspector/model/remote-object-weak-collection.html
  => FAILURE

After these series of steps:

> strongKey1 = {id:1};
> strongKey2 = {id:2};
> weakMap = new WeakMap;
> 
> GCController.collect();
> weakMap.set(strongKey1, 1);
> weakMap.set(strongKey2, 2);
> GCController.collect();
> delete window.strongKey1;
> GCController.collect();
> weakMap.set({id:3}, 3);
> weakMap.set({id:4}, 4);
> GCController.collect();
> weakMap

I expect the temporary object {id:4} to be garbage collected, but it is not.

* RESULTS DIFF
--- Build/Debug/layout-test-results/inspector/model/remote-object-weak-collection-expected.txt
+++ Build/Debug/layout-test-results/inspector/model/remote-object-weak-collection-actual.txt
@@ -119,6 +119,31 @@
       "value": 2,
       "description": "2"
     }
+  },
+  {
+    "key": {
+      "type": "object",
+      "objectId": "<filtered>",
+      "className": "Object",
+      "description": "Object",
+      "preview": {
+        "type": "object",
+        "description": "Object",
+        "lossless": true,
+        "properties": [
+          {
+            "name": "id",
+            "type": "number",
+            "value": "4"
+          }
+        ]
+      }
+    },
+    "value": {
+      "type": "number",
+      "value": 4,
+      "description": "4"
+    }
   }
 ]

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150127/0873068d/attachment-0002.html>


More information about the webkit-unassigned mailing list