DescriptionProperly detect cycles in V8ValueConverter, current impl is too strict.
Currently, just reusing a value in extension API would null out the
second occurrence of that value. Ideally, we only need to null out
a value if it introduces a cycle.
Examples of cycle:
1) var v = {}, v = {key: v};
2) var a = [], a = [1, a];
However, these are not cycles and this CL will correctly detect
them as non-cycles:
1) var v = {}, w = {keyA: v, keyB: v};
2) var a = [], b = [a, a]
BUG=606955
Test=See steps in OP https://crbug.com/detail?id=606955
Committed: https://crrev.com/275ec3e2a5ce1d16fc9c2a0dab3b58f8a7b9fa38
Cr-Commit-Position: refs/heads/master@{#391559}
Patch Set 1 #Patch Set 2 : fix test, some nits #
Total comments: 2
Patch Set 3 : address comments from asargent@ #
Depends on Patchset: Messages
Total messages: 12 (5 generated)
|