Search code examples
javascriptjqueryreactjsgoogle-chrome-devtoolsv8

Why there are multiple window objects in heap snapshot


I am learning about heap snapshot and while playing i came across one weird observation as attached in screenshot I see there are multiple window objects inside "Window" constructor with different @Id. I have did nothing just opened a new tab and just took a snapshot.

  1. From where these objects are coming ? How they are created ?\
  2. Also what's difference between "Window" "Window /" constructor enter image description here

Solution

  • Each active Chrome extension, each frame has its own context and a global window object. Click on any Window to see native context or __proto__ or global_proxy. See examples:

    Window / stackoverflow.com

    Window / chrome-extension:

    Just walk through Window objects and you will see the details w/o having to ask questions on SO. You also will be surprised by having more than 2 extensions.