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

Unified Diff: chrome/common/chrome_content_client.cc

Issue 8667006: Extract similar code into SetJobObjectAsKillOnJobClose() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
Index: chrome/common/chrome_content_client.cc
diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc
index 65b004b3ede042d7c5f9f3ceb30305b025eaa03f..6a4ad8ae3664021c85b6e1098dc898a4b546b150 100644
--- a/chrome/common/chrome_content_client.cc
+++ b/chrome/common/chrome_content_client.cc
@@ -229,11 +229,7 @@ bool LoadFlashBroker(const FilePath& plugin_path, CommandLine* cmd_line) {
// terminates the job object is destroyed (by the OS) and the flash broker
// is terminated.
HANDLE job = ::CreateJobObjectW(NULL, NULL);
- JOBOBJECT_EXTENDED_LIMIT_INFORMATION job_limits = {0};
- job_limits.BasicLimitInformation.LimitFlags =
- JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE;
- if (::SetInformationJobObject(job, JobObjectExtendedLimitInformation,
- &job_limits, sizeof(job_limits))) {
+ if (SetJobObjectAsKillOnJobClose(job)) {
::AssignProcessToJobObject(job, process);
// Yes, we are leaking the object here. Read comment above.
} else {

Powered by Google App Engine
This is Rietveld 408576698