1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 * vim: set ts=8 sw=4 et tw=99:
10 BEGIN_TEST(test_cloneScript)
14 CHECK(A = createGlobal());
15 CHECK(B = createGlobal());
30 JSAutoEnterCompartment a;
35 CHECK(fun = JS_CompileFunction(cx, A, "f", 0, NULL, source, strlen(source), __FILE__, 1));
36 CHECK(obj = JS_GetFunctionObject(fun));
41 JSAutoEnterCompartment b;
45 CHECK(JS_CloneFunctionObject(cx, obj, B));
50 END_TEST(test_cloneScript)