diff --git a/js/src/jsxdrapi.cpp b/js/src/jsxdrapi.cpp index d63f24c6f91f..9702e377569d 100644 --- a/js/src/jsxdrapi.cpp +++ b/js/src/jsxdrapi.cpp @@ -695,6 +695,9 @@ JS_XDRFunctionObject(JSXDRState *xdr, JSObject **objp) fstate.filename = fun->script()->filename; } + if (!JS_XDRCStringOrNull(xdr, (char **) &fstate.filename)) + return false; + return js_XDRFunctionObject(xdr, objp); }