{"action":"opened","issue":{"url":"https://api.github.com/repos/devtools-html/debugger.html/issues/6139","repository_url":"https://api.github.com/repos/devtools-html/debugger.html","labels_url":"https://api.github.com/repos/devtools-html/debugger.html/issues/6139/labels{/name}","comments_url":"https://api.github.com/repos/devtools-html/debugger.html/issues/6139/comments","events_url":"https://api.github.com/repos/devtools-html/debugger.html/issues/6139/events","html_url":"https://github.com/devtools-html/debugger.html/issues/6139","id":318042040,"number":6139,"title":"Handle Symbol with longString names","user":{"login":"nchevobbe","id":578107,"avatar_url":"https://avatars3.githubusercontent.com/u/578107?v=4","gravatar_id":"","url":"https://api.github.com/users/nchevobbe","html_url":"https://github.com/nchevobbe","followers_url":"https://api.github.com/users/nchevobbe/followers","following_url":"https://api.github.com/users/nchevobbe/following{/other_user}","gists_url":"https://api.github.com/users/nchevobbe/gists{/gist_id}","starred_url":"https://api.github.com/users/nchevobbe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nchevobbe/subscriptions","organizations_url":"https://api.github.com/users/nchevobbe/orgs","repos_url":"https://api.github.com/users/nchevobbe/repos","events_url":"https://api.github.com/users/nchevobbe/events{/privacy}","received_events_url":"https://api.github.com/users/nchevobbe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-26T13:57:46Z","updated_at":"2018-04-26T13:57:46Z","closed_at":null,"author_association":"MEMBER","body":"_From @nchevobbe on July 25, 2017 13:7_\n\n**Steps to reproduce:** \r\nEvaluate `Symbol(\"aa\".repeat(10000))` in the Reps test app\r\n\r\n**Expected results**\r\nThe symbol is rendered as `Symbol(aaaaaaaaaaaaaa…aaaaaaaaaaaaaa)`\r\n\r\n**Actual results**\r\nThe symbol is rendered as `Symbol([object Object])`\r\n\r\n---\r\n\r\nHere is the RDP packet we receive : \r\n```json\r\n{\r\n  \"type\": \"symbol\",\r\n  \"name\": {\r\n    \"type\": \"longString\",\r\n    \"initial\": \"aaaaaaaaaaaaaa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/longString44\"\r\n  }\r\n}\r\n```\r\n\r\nAnd here is the code where we handle the Symbol name : https://github.com/devtools-html/devtools-core/blob/master/packages/devtools-reps/src/reps/symbol.js#L26 \r\n\r\nThe error is due to the fact that we do a concatenation of the name \r\n```js\r\n`Symbol(${name || \"\"})`\r\n```\r\nbut here the name property is a longString actor.\r\n\r\nTo fix this issue, we should : \r\n- Test if the name is a string, and if so, do the same thing as we do\r\n- If not, render the name as its own element using `Rep({object: name})`, which will take care of displaying the longString as we need.\n\n_Copied from original issue: devtools-html/devtools-core#518_"}}
{"actor":{"display_login":"nchevobbe"}}