It's going to be removed from Chromium, see https://crbug.com/812523.

/cc @electron/code-owners 
shell/browser/electron_javascript_dialog_manager.cc
void ElectronJavaScriptDialogManager::RunJavaScriptDialog(
    content::WebContents* web_contents,
    content::RenderFrameHost* rfh,
    JavaScriptDialogType dialog_type,
    const base::string16& message_text,
    const base::string16& default_prompt_text,
    DialogClosedCallback callback,
    bool* did_suppress_message) {
  auto origin_url = rfh->GetLastCommittedURL();
  std::string origin;
  
  
  if (origin_url.SchemeIsFile()) {
    origin = origin_url.path();
  } else {
    origin = origin_url.GetOrigin().spec();
  }
  if (origin_counts_[origin] == kUserWantsNoMoreDialogs) {
    return std::move(callback).Run(false, base::string16());
  }
  if (dialog_type != JavaScriptDialogType::JAVASCRIPT_DIALOG_TYPE_ALERT &&
      dialog_type != JavaScriptDialogType::JAVASCRIPT_DIALOG_TYPE_CONFIRM) {
    std::move(callback).Run(false, base::string16());
    return;
  }
  auto* web_preferences = WebContentsPreferences::From(web_contents);
  if (web_preferences && web_preferences->IsEnabled("disableDialogs")) {
    return std::move(callback).Run(false, base::string16());
  }