Name Description Size
components.conf 764
moz.build 527
nsAutoConfig.cpp Observe() is called twice: once at the instantiation time and other after the profile is set. It doesn't do anything but return NS_OK during the creation time. Second time it calls downloadAutoConfig(). 14842
nsAutoConfig.h 1459
nsJSConfigTriggers.cpp MOZ_RUNINIT static JS::PersistentRooted<JSObject*> autoconfigSystemSb; MOZ_RUNINIT static JS::PersistentRooted<JSObject*> autoconfigSb; bool sandboxEnabled; nsresult CentralizedAdminPrefManagerInit(bool aSandboxEnabled) { // If the sandbox is already created, no need to create it again. if (autoconfigSb.initialized()) return NS_OK; sandboxEnabled = aSandboxEnabled; // Grab XPConnect. nsCOMPtr<nsIXPConnect> xpc = nsIXPConnect::XPConnect(); // Grab the system principal. nsCOMPtr<nsIPrincipal> principal; nsContentUtils::GetSecurityManager()->GetSystemPrincipal( getter_AddRefs(principal)); // Create a sandbox. AutoSafeJSContext cx; JS::Rooted<JSObject*> sandbox(cx); nsresult rv = xpc->CreateSandbox(cx, principal, sandbox.address()); NS_ENSURE_SUCCESS(rv, rv); // Unwrap, store and root the sandbox. NS_ENSURE_STATE(sandbox); autoconfigSystemSb.init(cx, js::UncheckedUnwrap(sandbox)); // Create an unprivileged sandbox. principal = NullPrincipal::CreateWithoutOriginAttributes(); rv = xpc->CreateSandbox(cx, principal, sandbox.address()); NS_ENSURE_SUCCESS(rv, rv); autoconfigSb.init(cx, js::UncheckedUnwrap(sandbox)); // Define gSandbox on system sandbox. JSAutoRealm ar(cx, autoconfigSystemSb); JS::Rooted<JS::Value> value(cx, JS::ObjectValue(*sandbox)); if (!JS_WrapValue(cx, &value) || !JS_DefineProperty(cx, autoconfigSystemSb, "gSandbox", value, JSPROP_ENUMERATE)) { return NS_ERROR_FAILURE; } // Define ChromeUtils for ChromeUtils.import. if (!mozilla::dom::ChromeUtils_Binding::CreateAndDefineOnGlobal(cx)) { return NS_ERROR_FAILURE; } return NS_OK; } nsresult CentralizedAdminPrefManagerFinish() { if (autoconfigSb.initialized()) { AutoSafeJSContext cx; autoconfigSb.reset(); autoconfigSystemSb.reset(); JS_MaybeGC(cx); } return NS_OK; } nsresult EvaluateAdminConfigScript(const char* js_buffer, size_t length, const char* filename, bool globalContext, bool callbacks, bool skipFirstLine, bool isPrivileged) { if (!sandboxEnabled) { isPrivileged = true; } return EvaluateAdminConfigScript( isPrivileged ? autoconfigSystemSb : autoconfigSb, js_buffer, length, filename, globalContext, callbacks, skipFirstLine); } nsresult EvaluateAdminConfigScript(JS::Handle<JSObject*> sandbox, const char* js_buffer, size_t length, const char* filename, bool globalContext, bool callbacks, bool skipFirstLine) { if (skipFirstLine) { /* In order to protect the privacy of the JavaScript preferences file from loading by the browser, we make the first line unparseable by JavaScript. We must skip that line here before executing the JavaScript code. 5389
nsJSConfigTriggers.h 1037
nsReadConfig.cpp This is the blocklist for known bad autoconfig files. 9984
nsReadConfig.h 847
prefcalls.js global processLDAPValues 5130