Bug 134246 - REGRESSION(r170235): Remove incorrect ifdef guard
Summary: REGRESSION(r170235): Remove incorrect ifdef guard
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 133844
  Show dependency treegraph
 
Reported: 2014-06-24 03:09 PDT by Éva Balázsfalvi
Modified: 2014-06-24 10:48 PDT (History)
7 users (show)

See Also:


Attachments
Patch (1.20 KB, patch)
2014-06-24 03:12 PDT, Éva Balázsfalvi
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Éva Balázsfalvi 2014-06-24 03:09:41 PDT
Removr unnecessary #if guard which remained in the code while removing PAGE_VISIBILITY_API compile guard.

> Source/WebKit/mac/WebView/WebView.mm:4328
> #if ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING)
>      if (_private->page)
>          return kit(_private->page->visibilityState());
>  #endif
Comment 1 Éva Balázsfalvi 2014-06-24 03:12:46 PDT
Created attachment 233692 [details]
Patch
Comment 2 Csaba Osztrogonác 2014-06-24 03:23:44 PDT
(In reply to comment #1)
> Created an attachment (id=233692) [details]
> Patch

https://bugs.webkit.org/show_bug.cgi?id=133844#c4
> -#if ENABLE(PAGE_VISIBILITY_API) || ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING)
> +#if ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING)

I agree, this guard is really unnecessary, "true || FOO" is always true.
Comment 3 Csaba Osztrogonác 2014-06-24 03:24:15 PDT
Comment on attachment 233692 [details]
Patch

LGTM, r=me. Thanks for the quick fix.
Comment 4 WebKit Commit Bot 2014-06-24 04:03:07 PDT
Comment on attachment 233692 [details]
Patch

Clearing flags on attachment: 233692

Committed r170358: <http://trac.webkit.org/changeset/170358>
Comment 5 WebKit Commit Bot 2014-06-24 04:03:13 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Enrica Casucci 2014-06-24 10:21:27 PDT
This breaks the build for all the platforms that do not enable HIDDEN_PAGE_DOM_TIMER_THROTTLING.
You removed the #ifdef but you left it around the kit function on line 521.
Comment 7 Csaba Osztrogonác 2014-06-24 10:35:57 PDT
(In reply to comment #6)
> This breaks the build for all the platforms that do not enable HIDDEN_PAGE_DOM_TIMER_THROTTLING.
> You removed the #ifdef but you left it around the kit function on line 521.

In this case the original guarding was incorrect. This call was guarded with
"#if ENABLE(PAGE_VISIBILITY_API) || ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING)".
But now there isn't PAGE_VISIBILITY_API guard, so we need this kit call
unconditionally. Should we remove guards around kit function core?
Comment 8 Csaba Osztrogonác 2014-06-24 10:48:14 PDT
Thanks for the fix landed in https://trac.webkit.org/changeset/170372 .