Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 #include "gdb-tests.h"
2 #include "jsapi.h"
4 FRAGMENT(Root, null) {
5 JS::Rooted<JSObject *> null(cx, nullptr);
7 breakpoint();
9 (void) null;
10 }
12 void callee(JS::Handle<JSObject *> obj, JS::MutableHandle<JSObject *> mutableObj)
13 {
14 // Prevent the linker from unifying this function with others that are
15 // equivalent in machine code but not type.
16 fprintf(stderr, "Called " __FILE__ ":callee\n");
17 breakpoint();
18 }
20 FRAGMENT(Root, handle) {
21 JS::Rooted<JSObject *> global(cx, JS::CurrentGlobalOrNull(cx));
22 callee(global, &global);
23 (void) global;
24 }
26 FRAGMENT(Root, HeapSlot) {
27 JS::Rooted<jsval> plinth(cx, STRING_TO_JSVAL(JS_NewStringCopyZ(cx, "plinth")));
28 JS::Rooted<JSObject *> array(cx, JS_NewArrayObject(cx, plinth));
30 breakpoint();
32 (void) plinth;
33 (void) array;
34 }