diff -r 000000000000 -r 6474c204b198 js/src/gdb/tests/test-Root.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/gdb/tests/test-Root.py Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,19 @@ +# Test printing Handles. + +assert_subprinter_registered('SpiderMonkey', 'instantiations-of-JS::Rooted') +assert_subprinter_registered('SpiderMonkey', 'instantiations-of-JS::Handle') +assert_subprinter_registered('SpiderMonkey', 'instantiations-of-JS::MutableHandle') +assert_subprinter_registered('SpiderMonkey', 'instantiations-of-js::EncapsulatedPtr') +assert_subprinter_registered('SpiderMonkey', 'js::EncapsulatedValue') + +run_fragment('Root.handle') + +assert_pretty('obj', '(JSObject * const) [object global] delegate') +assert_pretty('mutableObj', '(JSObject *) [object global] delegate') + +run_fragment('Root.HeapSlot') + +# This depends on implementation details of arrays, but since HeapSlot is +# not a public type, I'm not sure how to avoid doing *something* ugly. +assert_pretty('array->elements[0]', '$jsval("plinth")') +