michael@0: #include "gdb-tests.h" michael@0: #include "jsapi.h" michael@0: michael@0: FRAGMENT(JSObject, simple) { michael@0: JS::Rooted glob(cx, JS::CurrentGlobalOrNull(cx)); michael@0: JS::Rooted plain(cx, JS_NewObject(cx, nullptr, JS::NullPtr(), JS::NullPtr())); michael@0: JS::Rooted global(cx, JS::CurrentGlobalOrNull(cx)); michael@0: JS::Rooted func(cx, (JSObject *) JS_NewFunction(cx, (JSNative) 1, 0, 0, michael@0: global, "dys")); michael@0: JS::Rooted anon(cx, (JSObject *) JS_NewFunction(cx, (JSNative) 1, 0, 0, global, 0)); michael@0: JS::Rooted funcPtr(cx, JS_NewFunction(cx, (JSNative) 1, 0, 0, michael@0: global, "formFollows")); michael@0: michael@0: JSObject &plainRef = *plain; michael@0: JSFunction &funcRef = *funcPtr; michael@0: JSObject *plainRaw = plain; michael@0: JSObject *funcRaw = func; michael@0: michael@0: breakpoint(); michael@0: michael@0: (void) glob; michael@0: (void) plain; michael@0: (void) func; michael@0: (void) anon; michael@0: (void) funcPtr; michael@0: (void) &plainRef; michael@0: (void) &funcRef; michael@0: (void) plainRaw; michael@0: (void) funcRaw; michael@0: } michael@0: michael@0: FRAGMENT(JSObject, null) { michael@0: JS::Rooted null(cx, nullptr); michael@0: JSObject *nullRaw = null; michael@0: michael@0: breakpoint(); michael@0: michael@0: (void) null; michael@0: (void) nullRaw; michael@0: }