mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
Fix JS_CompileUCFunctionForPrincipals to allow null obj with non-null funAtom, for precompiling a named function against no scope (no bug, r=self trivial change).
This commit is contained in:
parent
d9ad51a769
commit
05f54166a9
@ -3287,7 +3287,7 @@ JS_CompileUCFunctionForPrincipals(JSContext *cx, JSObject *obj,
|
||||
fun = NULL;
|
||||
goto out;
|
||||
}
|
||||
if (funAtom) {
|
||||
if (obj && funAtom) {
|
||||
if (!OBJ_DEFINE_PROPERTY(cx, obj, (jsid)funAtom,
|
||||
OBJECT_TO_JSVAL(fun->object),
|
||||
NULL, NULL, 0, NULL)) {
|
||||
|
Loading…
Reference in New Issue
Block a user