Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Crashpad Authors. All rights reserved. | 1 // Copyright 2015 The Crashpad Authors. All rights reserved. |
| 2 // | 2 // |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
| 5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
| 6 // | 6 // |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 // | 8 // |
| 9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 65 std::string key; | 65 std::string key; |
| 66 if (!ReadMinidumpUTF8String(file_reader, entry.key, &key)) { | 66 if (!ReadMinidumpUTF8String(file_reader, entry.key, &key)) { |
| 67 return false; | 67 return false; |
| 68 } | 68 } |
| 69 | 69 |
| 70 std::string value; | 70 std::string value; |
| 71 if (!ReadMinidumpUTF8String(file_reader, entry.value, &value)) { | 71 if (!ReadMinidumpUTF8String(file_reader, entry.value, &value)) { |
| 72 return false; | 72 return false; |
| 73 } | 73 } |
| 74 | 74 |
| 75 if (local_dictionary.find(key) != local_dictionary.end()) { | 75 if (!local_dictionary.insert(std::make_pair(key, value)).second) { |
| 76 LOG(WARNING) << "duplicate key " << key << ", discarding value " << value; | 76 LOG(ERROR) << "duplicate key " << key; |
|
scottmg
2015/03/31 18:16:15
log level change was intentional?
Mark Mentovai
2015/03/31 18:21:32
scottmg wrote:
| |
| 77 return false; | 77 return false; |
| 78 } | 78 } |
| 79 | |
| 80 local_dictionary.insert(std::make_pair(key, value)); | |
| 81 } | 79 } |
| 82 | 80 |
| 83 dictionary->swap(local_dictionary); | 81 dictionary->swap(local_dictionary); |
| 84 return true; | 82 return true; |
| 85 } | 83 } |
| 86 | 84 |
| 87 } // namespace internal | 85 } // namespace internal |
| 88 } // namespace crashpad | 86 } // namespace crashpad |
| OLD | NEW |