| 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 // expect |begin|, |end|, etc. continue to work. This is only necessary | 251 // expect |begin|, |end|, etc. continue to work. This is only necessary |
| 252 // for instance methods - renaming static methods and funcitons is okay. | 252 // for instance methods - renaming static methods and funcitons is okay. |
| 253 void begin() {} | 253 void begin() {} |
| 254 static void Begin(int x) {} | 254 static void Begin(int x) {} |
| 255 | 255 |
| 256 // https://crbug.com/677166: We blacklist renaming of |hash|, because it | 256 // https://crbug.com/677166: We blacklist renaming of |hash|, because it |
| 257 // collides with a struct named Hash. Blacklisting therefore should be broad | 257 // collides with a struct named Hash. Blacklisting therefore should be broad |
| 258 // and should cover both instance and static methods as well as functions. | 258 // and should cover both instance and static methods as well as functions. |
| 259 int hash() const { return 123; } | 259 int hash() const { return 123; } |
| 260 static int hash(const Foo& x) { return x.hash(); } | 260 static int hash(const Foo& x) { return x.hash(); } |
| 261 |
| 262 // https://crbug.com672902: std-like names should not be rewritten. |
| 263 void emplace_back(int x) {} |
| 264 void insert(int x) {} |
| 265 void push_back(int x) {} |
| 266 int* back() { return nullptr; } |
| 267 int* front() { return nullptr; } |
| 268 void erase() {} |
| 269 bool empty() { return true; } |
| 261 }; | 270 }; |
| 262 | 271 |
| 263 void Begin(int x) {} | 272 void Begin(int x) {} |
| 264 int hash(int x) { | 273 int hash(int x) { |
| 265 return 123 * x; | 274 return 123 * x; |
| 266 } | 275 } |
| 267 void swap(Foo& x, Foo& y) {} | 276 void swap(Foo& x, Foo& y) {} |
| 268 | 277 |
| 269 } // blacklisting_of_method_and_function_names | 278 } // blacklisting_of_method_and_function_names |
| 270 | 279 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 300 static void Method(); | 309 static void Method(); |
| 301 }; | 310 }; |
| 302 | 311 |
| 303 } // namespace internal | 312 } // namespace internal |
| 304 | 313 |
| 305 } // namespace blink | 314 } // namespace blink |
| 306 | 315 |
| 307 // https://crbug.com/640688 - need to rewrite method name below. | 316 // https://crbug.com/640688 - need to rewrite method name below. |
| 308 void blink::ClassDeclaredInsideBlink::MethodDefinedOutsideBlink() {} | 317 void blink::ClassDeclaredInsideBlink::MethodDefinedOutsideBlink() {} |
| 309 void blink::internal::InternalClass::Method() {} | 318 void blink::internal::InternalClass::Method() {} |
| OLD | NEW |