Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
1 #include "gdb-tests.h"
2 #include "jsapi.h"
4 FRAGMENT(JSObject, simple) {
5 JS::Rooted<JSObject *> glob(cx, JS::CurrentGlobalOrNull(cx));
6 JS::Rooted<JSObject *> plain(cx, JS_NewObject(cx, nullptr, JS::NullPtr(), JS::NullPtr()));
7 JS::Rooted<JSObject *> global(cx, JS::CurrentGlobalOrNull(cx));
8 JS::Rooted<JSObject *> func(cx, (JSObject *) JS_NewFunction(cx, (JSNative) 1, 0, 0,
9 global, "dys"));
10 JS::Rooted<JSObject *> anon(cx, (JSObject *) JS_NewFunction(cx, (JSNative) 1, 0, 0, global, 0));
11 JS::Rooted<JSFunction *> funcPtr(cx, JS_NewFunction(cx, (JSNative) 1, 0, 0,
12 global, "formFollows"));
14 JSObject &plainRef = *plain;
15 JSFunction &funcRef = *funcPtr;
16 JSObject *plainRaw = plain;
17 JSObject *funcRaw = func;
19 breakpoint();
21 (void) glob;
22 (void) plain;
23 (void) func;
24 (void) anon;
25 (void) funcPtr;
26 (void) &plainRef;
27 (void) &funcRef;
28 (void) plainRaw;
29 (void) funcRaw;
30 }
32 FRAGMENT(JSObject, null) {
33 JS::Rooted<JSObject *> null(cx, nullptr);
34 JSObject *nullRaw = null;
36 breakpoint();
38 (void) null;
39 (void) nullRaw;
40 }