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

Unified Diff: extensions/browser/user_script_loader.cc

Issue 2852803002: Remove base::SharedMemory::ShareToProcess. (Closed)
Patch Set: Compile error. 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 | « device/gamepad/gamepad_service.cc ('k') | gpu/ipc/service/gpu_channel_test_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/user_script_loader.cc
diff --git a/extensions/browser/user_script_loader.cc b/extensions/browser/user_script_loader.cc
index c20f96a6385963bf57d01a3d9c350646bdd811cb..3eaa3ffc37577f26ef9263a0108e056d2e9d6f13 100644
--- a/extensions/browser/user_script_loader.cc
+++ b/extensions/browser/user_script_loader.cc
@@ -416,9 +416,10 @@ void UserScriptLoader::SendUpdate(content::RenderProcessHost* process,
if (!handle)
return;
- base::SharedMemoryHandle handle_for_process;
- if (!shared_memory->ShareToProcess(handle, &handle_for_process))
- return; // This can legitimately fail if the renderer asserts at startup.
+ base::SharedMemoryHandle handle_for_process =
+ shared_memory->handle().Duplicate();
+ if (!handle_for_process.IsValid())
+ return;
if (base::SharedMemory::IsHandleValid(handle_for_process)) {
process->Send(new ExtensionMsg_UpdateUserScripts(
« no previous file with comments | « device/gamepad/gamepad_service.cc ('k') | gpu/ipc/service/gpu_channel_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698