Bug 125064 - Fix EFL build with INSPECTOR disabled
Summary: Fix EFL build with INSPECTOR disabled
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-02 00:53 PST by Peter Molnar
Modified: 2014-02-10 03:36 PST (History)
9 users (show)

See Also:


Attachments
Patch (3.06 KB, patch)
2013-12-02 00:55 PST, Peter Molnar
ossy: review-
ossy: commit-queue-
Details | Formatted Diff | Diff
updated patch (9.09 KB, patch)
2014-02-06 06:17 PST, Peter Molnar
no flags Details | Formatted Diff | Diff
updated patch (7.87 KB, patch)
2014-02-10 01:30 PST, Peter Molnar
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Molnar 2013-12-02 00:53:42 PST
EFL build currently fails when INSPECTOR is turned off.
Comment 1 Peter Molnar 2013-12-02 00:55:49 PST
Created attachment 218149 [details]
Patch
Comment 2 Gyuyoung Kim 2013-12-02 01:01:02 PST
Comment on attachment 218149 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=218149&action=review

> Source/WebKit/efl/ewk/ewk_contextmenu.h:112
> +#if defined(ENABLE_INSPECTOR) && ENABLE_INSPECTOR

I think this isn't meaningful. ewk_contentmenu.h is public header. When application includes this, they can't know ENABLE_INSPECTOR is enabled or not.
Comment 3 Peter Molnar 2013-12-02 02:43:16 PST
(In reply to comment #2)
> (From update of attachment 218149 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=218149&action=review
> 
> > Source/WebKit/efl/ewk/ewk_contextmenu.h:112
> > +#if defined(ENABLE_INSPECTOR) && ENABLE_INSPECTOR
> 
> I think this isn't meaningful. ewk_contentmenu.h is public header. When application includes this, they can't know ENABLE_INSPECTOR is enabled or not.

This context menu item is correctly guarded in ContextMenuItem.h:134, but not here. These two must be in sync, as stated at the beginning of this file.

They are not in sync now, that causes a lot of enum assertions, therefore WebKit currenty doesn't build.
Comment 4 Gyuyoung Kim 2013-12-02 04:17:43 PST
Comment on attachment 218149 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=218149&action=review

>>> Source/WebKit/efl/ewk/ewk_contextmenu.h:112
>>> +#if defined(ENABLE_INSPECTOR) && ENABLE_INSPECTOR
>> 
>> I think this isn't meaningful. ewk_contentmenu.h is public header. When application includes this, they can't know ENABLE_INSPECTOR is enabled or not.
> 
> This context menu item is correctly guarded in ContextMenuItem.h:134, but not here. These two must be in sync, as stated at the beginning of this file.
> 
> They are not in sync now, that causes a lot of enum assertions, therefore WebKit currenty doesn't build.

This file will be included by EFL application. If EFL application doesn't define ENABLE_INSPECTOR, it can't use EWK_CONTEXT_MENU_ITEM_TAG_INSPECT_ELEMENT when INSPECTOR is enabled. Now you only think when INSPECTOR is disabled.
Comment 5 Michal Pakula vel Rutka 2013-12-02 05:52:25 PST
Maybe we should remove context menu's COMPILE_ASSERT_MATCHING_ENUM, and replace it with methods similar to those used in WK API: https://trac.webkit.org/browser/trunk/Source/WebKit2/Shared/API/c/WKSharedAPICast.h#L328 and https://trac.webkit.org/browser/trunk/Source/WebKit2/Shared/API/c/WKSharedAPICast.h#L522
Comment 6 Csaba Osztrogonác 2014-01-30 04:46:39 PST
(In reply to comment #5)
> Maybe we should remove context menu's COMPILE_ASSERT_MATCHING_ENUM, and replace it with methods similar to those used in WK API: https://trac.webkit.org/browser/trunk/Source/WebKit2/Shared/API/c/WKSharedAPICast.h#L328 and https://trac.webkit.org/browser/trunk/Source/WebKit2/Shared/API/c/WKSharedAPICast.h#L522

This one was done by https://trac.webkit.org/changeset/163033
Comment 7 Csaba Osztrogonác 2014-01-30 04:48:53 PST
Comment on attachment 218149 [details]
Patch

r- now, because COMPILE_ASSERT_MATCHING_ENUM was already removed.

Péter, could you update the patch and check if we need 
additional fixes too to make !INSPECTOR build happy?
Comment 8 Peter Molnar 2014-02-06 06:17:18 PST
Created attachment 223329 [details]
updated patch
Comment 9 Gyuyoung Kim 2014-02-06 18:03:59 PST
Comment on attachment 223329 [details]
updated patch

View in context: https://bugs.webkit.org/attachment.cgi?id=223329&action=review

> Source/WebCore/inspector/ScriptCallFrame.cpp:38
>  #include <inspector/InspectorValues.h>

Isn't it also more clear to contain this inclusion by ENABLE(INSPECTOR) ?

> Source/WebCore/inspector/ScriptCallStack.cpp:38
>  #include <inspector/InspectorValues.h>

ditto.
Comment 10 Peter Molnar 2014-02-10 01:30:00 PST
Created attachment 223684 [details]
updated patch
Comment 11 Csaba Osztrogonác 2014-02-10 01:38:57 PST
Comment on attachment 223329 [details]
updated patch

View in context: https://bugs.webkit.org/attachment.cgi?id=223329&action=review

>> Source/WebCore/inspector/ScriptCallFrame.cpp:38
>>  #include <inspector/InspectorValues.h>
> 
> Isn't it also more clear to contain this inclusion by ENABLE(INSPECTOR) ?

Are you sure if it is good? As far as I remember InspectorValues.h
doesn't have ENABLE(INSPECTOR) guard intentionally, because it
is used on many places regardless of enabled/disabled inspector.
Comment 12 Gyuyoung Kim 2014-02-10 02:11:22 PST
Comment on attachment 223329 [details]
updated patch

View in context: https://bugs.webkit.org/attachment.cgi?id=223329&action=review

>>> Source/WebCore/inspector/ScriptCallFrame.cpp:38
>>>  #include <inspector/InspectorValues.h>
>> 
>> Isn't it also more clear to contain this inclusion by ENABLE(INSPECTOR) ?
> 
> Are you sure if it is good? As far as I remember InspectorValues.h
> doesn't have ENABLE(INSPECTOR) guard intentionally, because it
> is used on many places regardless of enabled/disabled inspector.

Ah, right. InspectorValues.h is being used by many places regardless of enabled/disabled inspector. I only saw where it is used on ENABLE(INSPECTOR) guard. Sorry for noise.
Comment 13 Gyuyoung Kim 2014-02-10 02:12:21 PST
Peter, could you request review with previous patch ?
Comment 14 Peter Molnar 2014-02-10 02:19:51 PST
(In reply to comment #13)
> Peter, could you request review with previous patch ?

The previous patch wouldn't apply because ScriptCallFrame.cpp and ScriptCallStack.cpp have been renamed since I uploaded that patch. Also, there were other changes since that, so, that patch doesn't even build now.

The most recent patch builds on the current ToT, so I think it is the one that should be reviewed.
Comment 15 Gyuyoung Kim 2014-02-10 02:26:26 PST
Comment on attachment 223684 [details]
updated patch

LGTM. Ossy ?
Comment 16 Csaba Osztrogonác 2014-02-10 03:05:42 PST
Comment on attachment 223684 [details]
updated patch

LGTM, r=me
Comment 17 WebKit Commit Bot 2014-02-10 03:36:11 PST
Comment on attachment 223684 [details]
updated patch

Clearing flags on attachment: 223684

Committed r163777: <http://trac.webkit.org/changeset/163777>
Comment 18 WebKit Commit Bot 2014-02-10 03:36:15 PST
All reviewed patches have been landed.  Closing bug.