From b82272abe4f64121f0bdd95f18f84c7455420cf6 Mon Sep 17 00:00:00 2001 From: jam Date: Mon, 8 Feb 2016 18:13:03 -0800 Subject: Switch extension struct members that are sent over IPC to use uint32_t instead of size_t. size_t's size depends on the architecture. We need IPCs to match as we're now going to support 32 and 64 bit processes communicating on Android. This is split off from https://codereview.chromium.org/1619363002/. BUG=581409 Review URL: https://codereview.chromium.org/1676093003 Cr-Commit-Position: refs/heads/master@{#374268} --- extensions/renderer/user_script_set.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'extensions/renderer') diff --git a/extensions/renderer/user_script_set.cc b/extensions/renderer/user_script_set.cc index 200f84c..e289f3f 100644 --- a/extensions/renderer/user_script_set.cc +++ b/extensions/renderer/user_script_set.cc @@ -109,15 +109,15 @@ bool UserScriptSet::UpdateUserScripts(base::SharedMemoryHandle shared_memory, return false; // Unpickle scripts. - size_t num_scripts = 0; + uint32_t num_scripts = 0; base::Pickle pickle(reinterpret_cast(shared_memory_->memory()), pickle_size); base::PickleIterator iter(pickle); - CHECK(iter.ReadSizeT(&num_scripts)); + CHECK(iter.ReadUInt32(&num_scripts)); scripts_.clear(); scripts_.reserve(num_scripts); - for (size_t i = 0; i < num_scripts; ++i) { + for (uint32_t i = 0; i < num_scripts; ++i) { scoped_ptr script(new UserScript()); script->Unpickle(pickle, &iter); -- cgit v1.1