Bug 83325

Summary: Get rid of the useless flag PREEMPT_GEOLOCATION_PERMISSION
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: WebCore Misc.Assignee: Benjamin Poulain <benjamin>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, jberlin, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch rniwa: review+

Benjamin Poulain
Reported 2012-04-05 16:11:34 PDT
The flag PREEMPT_GEOLOCATION_PERMISSION was added in http://trac.webkit.org/changeset/63742 around some code of Geolocation. I could not find any case where PREEMPT_GEOLOCATION_PERMISSION is not used. Unless someone does not use this flag, I plan to remove the flag and the related useless code.
Attachments
Patch (8.75 KB, patch)
2012-04-05 16:33 PDT, Benjamin Poulain
rniwa: review+
Benjamin Poulain
Comment 1 2012-04-05 16:33:57 PDT
Ryosuke Niwa
Comment 2 2012-04-05 17:31:21 PDT
Comment on attachment 135933 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=135933&action=review > Source/WebCore/ChangeLog:23 > + (WebCore::Geolocation::positionChanged): The case (!isAllowed()) was there > + to support granting the authorization for WTF_USE_PREEMPT_GEOLOCATION_PERMISSION. You mean when PREEMPT_GEOLOCATION_PERMISSION is disabled?
Benjamin Poulain
Comment 3 2012-04-05 17:37:29 PDT
> > Source/WebCore/ChangeLog:23 > > + (WebCore::Geolocation::positionChanged): The case (!isAllowed()) was there > > + to support granting the authorization for WTF_USE_PREEMPT_GEOLOCATION_PERMISSION. > > You mean when PREEMPT_GEOLOCATION_PERMISSION is disabled? Yes indeed. I will reword that when landing.
Benjamin Poulain
Comment 4 2012-04-06 15:24:16 PDT
Alexey Proskuryakov
Comment 5 2012-04-14 10:53:35 PDT
Was there a specific reason to use CRASH instead of ASSERT? We usually only do that for out of memory conditions, and use ASSERT.
Benjamin Poulain
Comment 6 2012-04-14 13:29:05 PDT
> Was there a specific reason to use CRASH instead of ASSERT? We usually only do that for out of memory conditions, and use ASSERT. This particular check comes from a hardening patch I previously did. At the time, Adam suggested it would be better to crash so we learn if that happens I the wild. At the time, I did not aggree because there were too many corner case for granting permission. Now that the permission system is greatly simplified, I think CRASH() is reasonable.
Note You need to log in before you can comment on or make changes to this bug.