| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // written. | 43 // written. |
| 44 | 44 |
| 45 // Overloaded operators should not be rewritten. | 45 // Overloaded operators should not be rewritten. |
| 46 Task& operator++() { return *this; } | 46 Task& operator++() { return *this; } |
| 47 | 47 |
| 48 // Conversion functions should not be rewritten. | 48 // Conversion functions should not be rewritten. |
| 49 explicit operator int() const { return 42; } | 49 explicit operator int() const { return 42; } |
| 50 | 50 |
| 51 // These are special functions that we don't rename so that range-based | 51 // These are special functions that we don't rename so that range-based |
| 52 // for loops and STL things work. | 52 // for loops and STL things work. |
| 53 MyIterator begin() {} | 53 MyIterator begin() { return {}; } |
| 54 my_iterator end() {} | 54 my_iterator end() { return {}; } |
| 55 my_iterator rbegin() {} | 55 my_iterator rbegin() { return {}; } |
| 56 MyIterator rend() {} | 56 MyIterator rend() { return {}; } |
| 57 // The trace() method is used by Oilpan, but we plan to tweak the Oilpan's | 57 // The trace() method is used by Oilpan, but we plan to tweak the Oilpan's |
| 58 // clang plugin, so that it recognizes the new method name. | 58 // clang plugin, so that it recognizes the new method name. |
| 59 void Trace() {} | 59 void Trace() {} |
| 60 // These are used by std::unique_lock and std::lock_guard. | 60 // These are used by std::unique_lock and std::lock_guard. |
| 61 void lock() {} | 61 void lock() {} |
| 62 void unlock() {} | 62 void unlock() {} |
| 63 void try_lock() {} | 63 void try_lock() {} |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 class Other { | 66 class Other { |
| 67 // Static begin/end/trace don't count, and should be renamed. | 67 // Static begin/end/trace don't count, and should be renamed. |
| 68 static MyIterator Begin() {} | 68 static MyIterator Begin() { return {}; } |
| 69 static my_iterator End() {} | 69 static my_iterator End() { return {}; } |
| 70 static void Trace() {} | 70 static void Trace() {} |
| 71 static void Lock() {} | 71 static void Lock() {} |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 // Test that the actual method definition is also updated. | 74 // Test that the actual method definition is also updated. |
| 75 void Task::DoTheWork() { | 75 void Task::DoTheWork() { |
| 76 ReallyDoTheWork(); | 76 ReallyDoTheWork(); |
| 77 } | 77 } |
| 78 | 78 |
| 79 template <typename T> | 79 template <typename T> |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 static void Method(); | 259 static void Method(); |
| 260 }; | 260 }; |
| 261 | 261 |
| 262 } // namespace internal | 262 } // namespace internal |
| 263 | 263 |
| 264 } // namespace blink | 264 } // namespace blink |
| 265 | 265 |
| 266 // https://crbug.com/640688 - need to rewrite method name below. | 266 // https://crbug.com/640688 - need to rewrite method name below. |
| 267 void blink::ClassDeclaredInsideBlink::MethodDefinedOutsideBlink() {} | 267 void blink::ClassDeclaredInsideBlink::MethodDefinedOutsideBlink() {} |
| 268 void blink::internal::InternalClass::Method() {} | 268 void blink::internal::InternalClass::Method() {} |
| OLD | NEW |