michael@0: #include "gdb-tests.h" michael@0: #include "jsapi.h" michael@0: michael@0: FRAGMENT(Root, null) { michael@0: JS::Rooted null(cx, nullptr); michael@0: michael@0: breakpoint(); michael@0: michael@0: (void) null; michael@0: } michael@0: michael@0: void callee(JS::Handle obj, JS::MutableHandle mutableObj) michael@0: { michael@0: // Prevent the linker from unifying this function with others that are michael@0: // equivalent in machine code but not type. michael@0: fprintf(stderr, "Called " __FILE__ ":callee\n"); michael@0: breakpoint(); michael@0: } michael@0: michael@0: FRAGMENT(Root, handle) { michael@0: JS::Rooted global(cx, JS::CurrentGlobalOrNull(cx)); michael@0: callee(global, &global); michael@0: (void) global; michael@0: } michael@0: michael@0: FRAGMENT(Root, HeapSlot) { michael@0: JS::Rooted plinth(cx, STRING_TO_JSVAL(JS_NewStringCopyZ(cx, "plinth"))); michael@0: JS::Rooted array(cx, JS_NewArrayObject(cx, plinth)); michael@0: michael@0: breakpoint(); michael@0: michael@0: (void) plinth; michael@0: (void) array; michael@0: }