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

Unified Diff: content/browser/renderer_host/render_message_filter.cc

Issue 2847033003: Get rid of SharedMemory::GiveToProcess. (Closed)
Patch Set: Rebase. 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
Index: content/browser/renderer_host/render_message_filter.cc
diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc
index 216d089790e5075ba8da1a59b095a9ca392e5ca4..fc05196e1d408f13cd427d9dcd2d25b6656f9b36 100644
--- a/content/browser/renderer_host/render_message_filter.cc
+++ b/content/browser/renderer_host/render_message_filter.cc
@@ -1,4 +1,3 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -240,7 +239,9 @@ void RenderMessageFilter::SendLoadFontReply(IPC::Message* reply,
result->font_data_size = 0;
result->font_id = 0;
} else {
- result->font_data.GiveToProcess(base::GetCurrentProcessHandle(), &handle);
+ handle = result->font_data.handle().Duplicate();
+ result->font_data.Unmap();
+ result->font_data.Close();
Nico 2017/05/02 15:58:45 This code looks kind of weird to me. Don't you rea
erikchen 2017/05/02 18:45:57 [Duplicate changes the ownership_passes_to_ipc mem
}
RenderProcessHostMsg_LoadFont::WriteReplyParams(
reply, result->font_data_size, handle, result->font_id);

Powered by Google App Engine
This is Rietveld 408576698