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

Side by Side Diff: extensions/common/stack_frame.cc

Issue 1619363002: Add compile time checks against longs being used in IPC structs on 32 bit Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more per Dmitry Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "extensions/common/stack_frame.h" 5 #include "extensions/common/stack_frame.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "third_party/re2/src/re2/re2.h" 10 #include "third_party/re2/src/re2/re2.h"
11 11
12 namespace extensions { 12 namespace extensions {
13 13
14 namespace { 14 namespace {
15 const char kAnonymousFunction[] = "(anonymous function)"; 15 const char kAnonymousFunction[] = "(anonymous function)";
16 } 16 }
17 17
18 StackFrame::StackFrame() : line_number(1), column_number(1) { 18 StackFrame::StackFrame() : line_number(1), column_number(1) {
19 } 19 }
20 20
21 StackFrame::StackFrame(const StackFrame& frame) 21 StackFrame::StackFrame(const StackFrame& frame)
22 : line_number(frame.line_number), 22 : line_number(frame.line_number),
23 column_number(frame.column_number), 23 column_number(frame.column_number),
24 source(frame.source), 24 source(frame.source),
25 function(frame.function) { 25 function(frame.function) {
26 } 26 }
27 27
28 StackFrame::StackFrame(size_t line_number, 28 StackFrame::StackFrame(uint32_t line_number,
29 size_t column_number, 29 uint32_t column_number,
30 const base::string16& source, 30 const base::string16& source,
31 const base::string16& function) 31 const base::string16& function)
32 : line_number(line_number), 32 : line_number(line_number),
33 column_number(column_number), 33 column_number(column_number),
34 source(source), 34 source(source),
35 function(function.empty() ? base::UTF8ToUTF16(kAnonymousFunction) 35 function(function.empty() ? base::UTF8ToUTF16(kAnonymousFunction)
36 : function) { 36 : function) {
37 } 37 }
38 38
39 StackFrame::~StackFrame() { 39 StackFrame::~StackFrame() {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } 71 }
72 72
73 bool StackFrame::operator==(const StackFrame& rhs) const { 73 bool StackFrame::operator==(const StackFrame& rhs) const {
74 return line_number == rhs.line_number && 74 return line_number == rhs.line_number &&
75 column_number == rhs.column_number && 75 column_number == rhs.column_number &&
76 source == rhs.source && 76 source == rhs.source &&
77 function == rhs.function; 77 function == rhs.function;
78 } 78 }
79 79
80 } // namespace extensions 80 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698