运行时发现的循环引用JSON.stringify.
它检测到循环引用的对象在控制台中如下所示。
LOG|ES5|Object>>{
"state": true,
"model": "MAppAMDeleter",
"client": {},
"time": {},
"bin": {
"arg_this": {}, // I'm guessing this is the culprit
"foo_id": "610"
},
"server": {
"smalls": {
"name": "The Foos",
"page": "ma",
"h_token": "1FOO",
"remember": "0",
"pane": "",
"privacy": "0",
"h_file": "1FOO",
"picture": "1",
"special": "0"
},
"tweets": {},
}
}
我认为唯一可能导致错误的是我实际分配给对象文字的这一行。
pipe.bin.arg_this = this; // when I assign this, it points to a different object all together.
我试图理解为什么 Safari 会假设它指向包含结构化数据的对象文字(我在上面复制的那个),而 Firefox 似乎知道它指的是我分配它的初始对象 - 实际上是一个页面元素。