michael@0: #include "gdb-tests.h" michael@0: #include "jsapi.h" michael@0: michael@0: FRAGMENT(jsid, simple) { michael@0: JS::Rooted string(cx, JS_NewStringCopyZ(cx, "moon")); michael@0: JS::Rooted interned(cx, JS_InternJSString(cx, string)); michael@0: JS::Rooted string_id(cx, INTERNED_STRING_TO_JSID(cx, interned)); michael@0: jsid int_id = INT_TO_JSID(1729); michael@0: jsid void_id = JSID_VOID; michael@0: JS::Rooted object_id(cx, OBJECT_TO_JSID(JS::CurrentGlobalOrNull(cx))); michael@0: michael@0: breakpoint(); michael@0: michael@0: (void) string; michael@0: (void) interned; michael@0: (void) string_id; michael@0: (void) int_id; michael@0: (void) void_id; michael@0: (void) object_id; michael@0: } michael@0: michael@0: void michael@0: jsid_handles(JS::Handle jsid_handle, michael@0: JS::MutableHandle mutable_jsid_handle) 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__ ":jsid_handles\n"); michael@0: breakpoint(); michael@0: } michael@0: michael@0: FRAGMENT(jsid, handles) { michael@0: JS::Rooted string(cx, JS_NewStringCopyZ(cx, "shovel")); michael@0: JS::Rooted interned(cx, JS_InternJSString(cx, string)); michael@0: JS::Rooted string_id(cx, INTERNED_STRING_TO_JSID(cx, interned)); michael@0: jsid_handles(string_id, &string_id); michael@0: }