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