Bug 134246

Summary: REGRESSION(r170235): Remove incorrect ifdef guard
Product: WebKit Reporter: Éva Balázsfalvi <evab.u-szeged>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bunhere, cdumez, commit-queue, enrica, gyuyoung.kim, ossy, sergio
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 133844    
Attachments:
Description Flags
Patch none

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 .