js/src/gdb/tests/test-Root.py

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/gdb/tests/test-Root.py	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,19 @@
     1.4 +# Test printing Handles.
     1.5 +
     1.6 +assert_subprinter_registered('SpiderMonkey', 'instantiations-of-JS::Rooted')
     1.7 +assert_subprinter_registered('SpiderMonkey', 'instantiations-of-JS::Handle')
     1.8 +assert_subprinter_registered('SpiderMonkey', 'instantiations-of-JS::MutableHandle')
     1.9 +assert_subprinter_registered('SpiderMonkey', 'instantiations-of-js::EncapsulatedPtr')
    1.10 +assert_subprinter_registered('SpiderMonkey', 'js::EncapsulatedValue')
    1.11 +
    1.12 +run_fragment('Root.handle')
    1.13 +
    1.14 +assert_pretty('obj', '(JSObject * const)  [object global] delegate')
    1.15 +assert_pretty('mutableObj', '(JSObject *)  [object global] delegate')
    1.16 +
    1.17 +run_fragment('Root.HeapSlot')
    1.18 +
    1.19 +# This depends on implementation details of arrays, but since HeapSlot is
    1.20 +# not a public type, I'm not sure how to avoid doing *something* ugly.
    1.21 +assert_pretty('array->elements[0]', '$jsval("plinth")')
    1.22 +

mercurial