RESOLVED FIXED 147966
Web Inspector: A {Map, WeakMap, Set, WeakSet} object contains itself will hang the console
https://bugs.webkit.org/show_bug.cgi?id=147966
Summary Web Inspector: A {Map, WeakMap, Set, WeakSet} object contains itself will han...
ziyunfei
Reported 2015-08-12 20:29:53 PDT
Run this code in the console: wm = new WeakMap wm.set(wm, wm)
Attachments
[PATCH] Proposed Fix (15.76 KB, patch)
2015-08-13 13:22 PDT, Joseph Pecoraro
no flags
[IMAGE] After - Cyclic Set (23.49 KB, image/png)
2015-08-13 13:22 PDT, Joseph Pecoraro
no flags
[IMAGE] After - Cyclic Map (18.75 KB, image/png)
2015-08-13 13:23 PDT, Joseph Pecoraro
no flags
Joseph Pecoraro
Comment 1 2015-08-13 11:51:47 PDT
Good find!
Joseph Pecoraro
Comment 2 2015-08-13 13:21:55 PDT
In may case, the console is not hanging. It just didn't output anything for the object. You can continue to use the console. What actually happened is the backend generated an "error" trying to generate the RemoteObject for the object (specifically the preview). That said, this still stinks. I have a fix, that gets this working, and fixes a few other possible subtle issues (propagating lossless to the top).
Joseph Pecoraro
Comment 3 2015-08-13 13:22:20 PDT
Created attachment 258923 [details] [PATCH] Proposed Fix
Joseph Pecoraro
Comment 4 2015-08-13 13:22:49 PDT
Created attachment 258924 [details] [IMAGE] After - Cyclic Set
Joseph Pecoraro
Comment 5 2015-08-13 13:23:07 PDT
Created attachment 258925 [details] [IMAGE] After - Cyclic Map
WebKit Commit Bot
Comment 6 2015-08-13 14:30:37 PDT
Comment on attachment 258923 [details] [PATCH] Proposed Fix Clearing flags on attachment: 258923 Committed r188403: <http://trac.webkit.org/changeset/188403>
WebKit Commit Bot
Comment 7 2015-08-13 14:30:41 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 8 2015-08-13 14:31:05 PDT
Note You need to log in before you can comment on or make changes to this bug.