Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(446)

Unified Diff: headless/public/headless_browser.h

Issue 2836823002: Fix DCHECH errors on Windows (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « headless/lib/headless_content_main_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/public/headless_browser.h
diff --git a/headless/public/headless_browser.h b/headless/public/headless_browser.h
index b57c21aac9214912e77db31c929e8dfd6916a9d5..fdc65a54fc6a1b208965640f9b7de479c5e676c4 100644
--- a/headless/public/headless_browser.h
+++ b/headless/public/headless_browser.h
@@ -226,6 +226,7 @@ class HEADLESS_EXPORT HeadlessBrowser::Options::Builder {
DISALLOW_COPY_AND_ASSIGN(Builder);
};
+#if !defined(OS_WIN)
// The headless browser may need to create child processes (e.g., a renderer
// which runs web content). This is done by re-executing the parent process as
// a zygote[1] and forking each child process from that zygote.
@@ -245,9 +246,17 @@ class HEADLESS_EXPORT HeadlessBrowser::Options::Builder {
//
// [1]
// https://chromium.googlesource.com/chromium/src/+/master/docs/linux_zygote.md
-#if !defined(OS_WIN)
HEADLESS_EXPORT void RunChildProcessIfNeeded(int argc, const char** argv);
-#endif
+#else
+// In Windows, the headless browser may need to create child processes. This is
+// done by re-executing the parent process which may have been initialized with
+// different libraries (e.g. child_dll). In this case, the embedder has to pass
+// the appropiate HINSTANCE and initalization sandbox_info to properly launch
+// the child process.
+HEADLESS_EXPORT void RunChildProcessIfNeeded(
+ HINSTANCE instance,
+ sandbox::SandboxInterfaceInfo* sandbox_info);
+#endif // !defined(OS_WIN)
// Main entry point for running the headless browser. This function constructs
// the headless browser instance, passing it to the given
« no previous file with comments | « headless/lib/headless_content_main_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698