Bug 152342 - include proper header to use inline function isMainFrame
Summary: include proper header to use inline function isMainFrame
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-16 10:18 PST by Hong
Modified: 2019-09-18 07:33 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hong 2015-12-16 10:18:08 PST
When I am building webcore in debug mode, the build failed 

../../lib/libWPEWebKit.so.0.0.1: error: undefined reference to 'WebCore::Frame::isMainFrame() const'

The issue may be introduced by https://bugs.webkit.org/show_bug.cgi?id=150416

Since Frame::isMainFrame() is inline function defined in MainFrame.h,
The change from 150416 introduced in DEBUG mode a reference to isMainFrame without using #include "MainFrame.h"

Adding the following lines in Source/WebCore /rendering/RenderObject.cpp 
resolved the build failure.

diff --git a/Source/WebCore/rendering/RenderObject.cpp b/Source/WebCore/rendering/RenderObject.cpp
index 8b74a66..5365daa 100644
--- a/Source/WebCore/rendering/RenderObject.cpp
+++ b/Source/WebCore/rendering/RenderObject.cpp
@@ -72,6 +72,9 @@
 #include <algorithm>
 #include <stdio.h>
 #include <wtf/RefCountedLeakCounter.h>
+#ifndef NDEBUG
+#include "MainFrame.h"
+#endif
Comment 1 Adrian Perez 2019-09-18 07:33:47 PDT
Nowadays isMainFrame() is defined in page/Frame.h, which is always
included by RenderObject.h (and therefore by RenderObject.cpp).

I have made debug builds without any issues recently, so I am
confident that this issue is not a problem anymore → Closing.