Commit 9b67b694 authored by Mike Hommey's avatar Mike Hommey
Browse files

Bug 1822484 - Rename IsDevelopmentBuild. r=necko-reviewers,media-playback-reviewers,padenot,emilio

parent c062dcce
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2564,10 +2564,10 @@ static void CacheSandboxParams(std::vector<std::string>& aCachedParams) {
    info.testingReadPath2 = testingReadPath2.get();
  }

  // TESTING_READ_PATH3, TESTING_READ_PATH4. In development builds,
  // TESTING_READ_PATH3, TESTING_READ_PATH4. In non-packaged builds,
  // these are used to whitelist the repo dir and object dir respectively.
  nsresult rv;
  if (mozilla::IsDevelopmentBuild()) {
  if (!mozilla::IsPackagedBuild()) {
    // Repo dir
    nsCOMPtr<nsIFile> repoDir;
    rv = nsMacUtilsImpl::GetRepoDir(getter_AddRefs(repoDir));
+2 −2
Original line number Diff line number Diff line
@@ -220,9 +220,9 @@ bool GMPProcessParent::FillMacSandboxInfo(MacSandboxInfo& aInfo) {
      "resolved plugin dir path: %s",
      resolvedPluginPath.get());

  if (mozilla::IsDevelopmentBuild()) {
  if (!mozilla::IsPackagedBuild()) {
    GMP_LOG_DEBUG(
        "GMPProcessParent::FillMacSandboxInfo: IsDevelopmentBuild()=true");
        "GMPProcessParent::FillMacSandboxInfo: IsPackagedBuild()=false");

    // Repo dir
    nsCOMPtr<nsIFile> repoDir;
+4 −4
Original line number Diff line number Diff line
@@ -632,11 +632,11 @@ Result<bool, nsresult> ExtensionProtocolHandler::AllowExternalResource(
  MOZ_ASSERT(!IsNeckoChild());

#if defined(XP_WIN)
  // On Windows, dev builds don't use symlinks so we never need to
  // On Windows, non-package builds don't use symlinks so we never need to
  // allow a resource from outside of the extension dir.
  return false;
#else
  if (!mozilla::IsDevelopmentBuild()) {
  if (mozilla::IsPackagedBuild()) {
    return false;
  }

@@ -666,7 +666,7 @@ Result<bool, nsresult> ExtensionProtocolHandler::AllowExternalResource(
// The |aRequestedFile| argument must already be Normalize()'d
Result<bool, nsresult> ExtensionProtocolHandler::DevRepoContains(
    nsIFile* aRequestedFile) {
  MOZ_ASSERT(mozilla::IsDevelopmentBuild());
  MOZ_ASSERT(!mozilla::IsPackagedBuild());
  MOZ_ASSERT(!IsNeckoChild());

  // On the first invocation, set mDevRepo
@@ -691,7 +691,7 @@ Result<bool, nsresult> ExtensionProtocolHandler::DevRepoContains(
#if !defined(XP_WIN)
Result<bool, nsresult> ExtensionProtocolHandler::AppDirContains(
    nsIFile* aExtensionDir) {
  MOZ_ASSERT(mozilla::IsDevelopmentBuild());
  MOZ_ASSERT(!mozilla::IsPackagedBuild());
  MOZ_ASSERT(!IsNeckoChild());

  // On the first invocation, set mAppDir
+8 −8
Original line number Diff line number Diff line
@@ -605,10 +605,10 @@ void SandboxBrokerPolicyFactory::InitContentPolicy() {
    }
  }

  if (mozilla::IsDevelopmentBuild()) {
    // If this is a developer build the resources are symlinks to outside the
    // binary dir. Therefore in non-release builds we allow reads from the whole
    // repository. MOZ_DEVELOPER_REPO_DIR is set by mach run.
  if (!mozilla::IsPackagedBuild()) {
    // If this is not a packaged build the resources are likely symlinks to
    // outside the binary dir. Therefore in non-release builds we allow reads
    // from the whole repository. MOZ_DEVELOPER_REPO_DIR is set by mach run.
    const char* developer_repo_dir = PR_GetEnv("MOZ_DEVELOPER_REPO_DIR");
    if (developer_repo_dir) {
      policy->AddDir(rdonly, developer_repo_dir);
@@ -857,10 +857,10 @@ SandboxBrokerPolicyFactory::GetRDDPolicy(int aPid) {
    }
  }

  if (mozilla::IsDevelopmentBuild()) {
    // If this is a developer build the resources are symlinks to outside the
    // binary dir. Therefore in non-release builds we allow reads from the whole
    // repository. MOZ_DEVELOPER_REPO_DIR is set by mach run.
  if (!mozilla::IsPackagedBuild()) {
    // If this is not a packaged build the resources are likely symlinks to
    // outside the binary dir. Therefore in non-release builds we allow reads
    // from the whole repository. MOZ_DEVELOPER_REPO_DIR is set by mach run.
    const char* developer_repo_dir = PR_GetEnv("MOZ_DEVELOPER_REPO_DIR");
    if (developer_repo_dir) {
      policy->AddDir(rdonly, developer_repo_dir);
+1 −1
Original line number Diff line number Diff line
@@ -296,7 +296,7 @@ bool SandboxBroker::LaunchApp(const wchar_t* aPath, const wchar_t* aArguments,
  // Enable the child process to write log files when setup
  AddMozLogRulesToPolicy(mPolicy, aEnvironment);

  if (mozilla::IsDevelopmentBuild()) {
  if (!mozilla::IsPackagedBuild()) {
    AddDeveloperRepoDirToPolicy(mPolicy);
  }

Loading