OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "gen/thing.h" | 5 #include "gen/thing.h" |
6 | 6 |
7 namespace v8 { | 7 namespace v8 { |
8 | 8 |
9 class InterfaceOutsideOfBlink { | 9 class InterfaceOutsideOfBlink { |
10 public: | 10 public: |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 // expect |begin|, |end|, etc. continue to work. This is only necessary | 255 // expect |begin|, |end|, etc. continue to work. This is only necessary |
256 // for instance methods - renaming static methods and funcitons is okay. | 256 // for instance methods - renaming static methods and funcitons is okay. |
257 void begin() {} | 257 void begin() {} |
258 static void begin(int x) {} | 258 static void begin(int x) {} |
259 | 259 |
260 // https://crbug.com/677166: We blacklist renaming of |hash|, because it | 260 // https://crbug.com/677166: We blacklist renaming of |hash|, because it |
261 // collides with a struct named Hash. Blacklisting therefore should be broad | 261 // collides with a struct named Hash. Blacklisting therefore should be broad |
262 // and should cover both instance and static methods as well as functions. | 262 // and should cover both instance and static methods as well as functions. |
263 int hash() const { return 123; } | 263 int hash() const { return 123; } |
264 static int hash(const Foo& x) { return x.hash(); } | 264 static int hash(const Foo& x) { return x.hash(); } |
| 265 |
| 266 // https://crbug.com672902: std-like names should not be rewritten. |
| 267 void emplace_back(int x) {} |
| 268 void push_back(int x) {} |
| 269 int* back() { return nullptr; } |
| 270 int* front() { return nullptr; } |
| 271 void erase() {} |
| 272 bool empty() { return true; } |
265 }; | 273 }; |
266 | 274 |
267 void begin(int x) {} | 275 void begin(int x) {} |
268 int hash(int x) { | 276 int hash(int x) { |
269 return 123 * x; | 277 return 123 * x; |
270 } | 278 } |
271 void swap(Foo& x, Foo& y) {} | 279 void swap(Foo& x, Foo& y) {} |
272 | 280 |
273 } // blacklisting_of_method_and_function_names | 281 } // blacklisting_of_method_and_function_names |
274 | 282 |
(...skipping 29 matching lines...) Expand all Loading... |
304 static void method(); | 312 static void method(); |
305 }; | 313 }; |
306 | 314 |
307 } // namespace internal | 315 } // namespace internal |
308 | 316 |
309 } // namespace blink | 317 } // namespace blink |
310 | 318 |
311 // https://crbug.com/640688 - need to rewrite method name below. | 319 // https://crbug.com/640688 - need to rewrite method name below. |
312 void blink::ClassDeclaredInsideBlink::methodDefinedOutsideBlink() {} | 320 void blink::ClassDeclaredInsideBlink::methodDefinedOutsideBlink() {} |
313 void blink::internal::InternalClass::method() {} | 321 void blink::internal::InternalClass::method() {} |
OLD | NEW |