LocalFrameViewTest: Rename |ChromeClient()| to avoid naming conflicts
GCC is stricter than clang when it comes to class members' names and how they can change the meaning of a previously existing symbol with the same name: ../../third_party/WebKit/Source/core/frame/LocalFrameViewTest.cpp:72:77: error: declaration of ‘blink::{anonymous}::AnimationMockChromeClient& blink::{anonymous}::LocalFrameViewTest::ChromeClient() const’ [-fpermissive] AnimationMockChromeClient& ChromeClient() const { return *chrome_client_; } ^ In file included from ../../third_party/WebKit/Source/core/loader/EmptyClients.h:39:0, from ../../third_party/WebKit/Source/core/layout/LayoutTestHelper.h:17, from ../../third_party/WebKit/Source/core/frame/LocalFrameViewTest.cpp:10: ../../third_party/WebKit/Source/core/page/ChromeClient.h:94:19: error: changes meaning of ‘ChromeClient’ from ‘class blink::ChromeClient’ [-fpermissive] class CORE_EXPORT ChromeClient : public PlatformChromeClient { ^~~~~~~~~~~~ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84709 contains a longer explanation, but essentially having a |ChromeClient()| method can change the meaning of references to |ChromeClient| in the code dependending on where it is declared, which contradicts the C++ standard. Fix it by renaming the method to |GetAnimationMockChromeClient()|. Change-Id: I3d92e960384ba6b8d1885f7fed2618085ce19855 Reviewed-on: https://chromium-review.googlesource.com/968425Reviewed-by:David Bokan <bokan@chromium.org> Reviewed-by:
Daniel Cheng <dcheng@chromium.org> Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> Cr-Commit-Position: refs/heads/master@{#544031}
Showing
Please register or sign in to comment