diegoles / closure-library

Automatically exported from code.google.com/p/closure-library
0 stars 0 forks source link

False loops in goog.debug.deepExpse #480

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
goog.debug.deepExpose falsely detects non-loops as loops when the reference 
tree contains two references to the same object.

To reproduce:

  var o = {};
  goog.debug.deepExpose({
    foo: o,
    bar: o
  });

Expected:

  {
    foo = {
    }
    bar = {
    }
  }

Actual:

  {
    foo = {
    }
    bar = *** reference loop detected ***
  }

NOTE: closure_uid_xxxxxx properties are omitted in the above outputs for 
clarity.

Original issue reported on code.google.com by rossda...@gmail.com on 28 Jun 2012 at 1:12

GoogleCodeExporter commented 8 years ago
This bug is documented in the code:

          // TODO(user): This is a bug; it falsely detects non-loops as loops
          // when the reference tree contains two references to the same object.

http://code.google.com/p/closure-library/source/browse/trunk/closure/goog/debug/
debug.js#131

Original comment by rossda...@gmail.com on 28 Jun 2012 at 1:13

GoogleCodeExporter commented 8 years ago
Patch: http://codereview.appspot.com/6348048/

Original comment by rossda...@gmail.com on 28 Jun 2012 at 8:24

GoogleCodeExporter commented 8 years ago

Original comment by pall...@google.com on 25 Jul 2012 at 1:30