The native window.open system has been better for quite a while now, and it resolves a lot of issues. We should make it the default and deprecate the old `BrowserWindowProxy`-based method.
shell/browser/web_contents_preferences.cc
DCHECK(path);
  base::FilePath::StringType preload_path;
  if (GetAsString(&preference_, options::kPreloadScript, &preload_path)) {
    base::FilePath preload(preload_path);
    if (preload.IsAbsolute()) {
      *path = std::move(preload);
      return true;
    } else {
      LOG(ERROR) << "preload script must have absolute path.";
    }
  } else if (GetAsString(&preference_, options::kPreloadURL, &preload_path)) {
    
    base::FilePath preload;
    GURL preload_url;
#if defined(OS_WIN)
    preload_url = GURL(base::WideToUTF8(preload_path));
#else
    preload_url = GURL(preload_path);
#endif
    if (net::FileURLToFilePath(preload_url, &preload)) {
      *path = std::move(preload);
      return true;
    } else {
      LOG(ERROR) << "preload url must be file:// protocol.";
    }
  }
  return false;
}
content::WebContents* WebContentsPreferences::GetWebContentsFromProcessID(