{"action":"created","issue":{"url":"https://api.github.com/repos/servo/servo/issues/13355","repository_url":"https://api.github.com/repos/servo/servo","labels_url":"https://api.github.com/repos/servo/servo/issues/13355/labels{/name}","comments_url":"https://api.github.com/repos/servo/servo/issues/13355/comments","events_url":"https://api.github.com/repos/servo/servo/issues/13355/events","html_url":"https://github.com/servo/servo/issues/13355","id":178395847,"number":13355,"title":"Make it possible to obtain the type of a DOM node from the debugger","user":{"login":"jdm","id":27658,"avatar_url":"https://avatars.githubusercontent.com/u/27658?v=3","gravatar_id":"","url":"https://api.github.com/users/jdm","html_url":"https://github.com/jdm","followers_url":"https://api.github.com/users/jdm/followers","following_url":"https://api.github.com/users/jdm/following{/other_user}","gists_url":"https://api.github.com/users/jdm/gists{/gist_id}","starred_url":"https://api.github.com/users/jdm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdm/subscriptions","organizations_url":"https://api.github.com/users/jdm/orgs","repos_url":"https://api.github.com/users/jdm/repos","events_url":"https://api.github.com/users/jdm/events{/privacy}","received_events_url":"https://api.github.com/users/jdm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-21T16:20:20Z","updated_at":"2016-09-21T16:24:24Z","closed_at":null,"body":"```\r\n12:12 <bholley> jdm: how do I get the type id of a node in a debugger?\r\n12:13 <jdm> bholley: we lost that ability last year\r\n12:13 <jdm> bholley: you need to get the JS class and cast it\r\n12:13 bholley tries\r\n12:14 <jdm> or if you can call https://dxr.mozilla.org/servo/source/components/script/dom/node.rs#371 somehow\r\n12:14 <jdm> maybe gdb master could\r\n12:15 bholley is on mac, so generally has worse debuggers\r\n12:15 <jdm> bholley: otherwise you need to replicate https://dxr.mozilla.org/servo/source/components/script/dom/bindings/codegen/CodegenRust.py#6983\r\n12:15 <bholley> jdm: how do I get the jsclass?\r\n12:15 <bholley> jdm: JSObject appears to be an opaque enum\r\n12:15 <bholley> jdm: so I can't ->clasp\r\n12:15 <jdm> bholley: yeah, I've not figured out how to cast to the C++ type unfortunately\r\n12:15 <jdm> bholley: if you get the pointer, then get to a C++ stack frame...\r\n12:17 <bholley> jdm: so at a high level, is there anything I can do from my breakpoint here without recompiling?\r\n12:17 <jdm> bholley: oh, cast to Object instead\r\n12:17 <jdm> https://github.com/servo/rust-mozjs/pull/301/files#diff-34b82cd514c7429b32451dd0b07c1e1bR962\r\n12:18 <jdm> then object->shape->base->clasp_\r\n```"},"comment":{"url":"https://api.github.com/repos/servo/servo/issues/comments/248665539","html_url":"https://github.com/servo/servo/issues/13355#issuecomment-248665539","issue_url":"https://api.github.com/repos/servo/servo/issues/13355","id":248665539,"user":{"login":"jdm","id":27658,"avatar_url":"https://avatars.githubusercontent.com/u/27658?v=3","gravatar_id":"","url":"https://api.github.com/users/jdm","html_url":"https://github.com/jdm","followers_url":"https://api.github.com/users/jdm/followers","following_url":"https://api.github.com/users/jdm/following{/other_user}","gists_url":"https://api.github.com/users/jdm/gists{/gist_id}","starred_url":"https://api.github.com/users/jdm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdm/subscriptions","organizations_url":"https://api.github.com/users/jdm/orgs","repos_url":"https://api.github.com/users/jdm/repos","events_url":"https://api.github.com/users/jdm/events{/privacy}","received_events_url":"https://api.github.com/users/jdm/received_events","type":"User","site_admin":false},"created_at":"2016-09-21T16:24:24Z","updated_at":"2016-09-21T16:24:24Z","body":"This is a result of #7873, since before that change we could look at the members of the DOM node and see what type is was."}}
{"actor":{"display_login":"jdm"}}