Bug 110317 - Add an ASSERT to didChangeDeviceProximity
Summary: Add an ASSERT to didChangeDeviceProximity
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Kihong Kwon
URL:
Keywords:
Depends on:
Blocks: 92837
  Show dependency treegraph
 
Reported: 2013-02-20 02:31 PST by Kihong Kwon
Modified: 2013-02-24 18:04 PST (History)
3 users (show)

See Also:


Attachments
Patch (4.53 KB, patch)
2013-02-20 02:43 PST, Kihong Kwon
no flags Details | Formatted Diff | Diff
Patch (4.79 KB, patch)
2013-02-22 21:31 PST, Kihong Kwon
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kihong Kwon 2013-02-20 02:31:46 PST
Proximity event is occurred normally even if value is less than min or more then max.
Therefore we need to add checking the range of proximity value.
Comment 1 Kihong Kwon 2013-02-20 02:43:18 PST
Created attachment 189271 [details]
Patch
Comment 2 Hajime Morrita 2013-02-21 21:05:44 PST
Comment on attachment 189271 [details]
Patch

I wonder whether this should be done in WebCore. Why not handle this in client side and just assert the range here?
Comment 3 Kihong Kwon 2013-02-21 21:25:16 PST
(In reply to comment #2)
> (From update of attachment 189271 [details])
> I wonder whether this should be done in WebCore. Why not handle this in client side and just assert the range here?

As you said, client can check this.
IMHO, we need to add a minimal defense in the WebCore, but I'm not strongly sure about this. Could I get your opinion about this?
Comment 4 Hajime Morrita 2013-02-21 22:07:06 PST
(In reply to comment #3)
> (In reply to comment #2)
> > (From update of attachment 189271 [details] [details])
> > I wonder whether this should be done in WebCore. Why not handle this in client side and just assert the range here?
> 
> As you said, client can check this.
> IMHO, we need to add a minimal defense in the WebCore, but I'm not strongly sure about this. Could I get your opinion about this?

Just add an assertion here and a guard on caller side?
Comment 5 Kihong Kwon 2013-02-22 21:21:03 PST
Add ASSERT to didChangeDeviceProximity function to check range of value.
In addition, fix some wrong layout test cases.
Comment 6 Kihong Kwon 2013-02-22 21:31:02 PST
Created attachment 189903 [details]
Patch
Comment 7 WebKit Review Bot 2013-02-24 18:04:02 PST
Comment on attachment 189903 [details]
Patch

Clearing flags on attachment: 189903

Committed r143882: <http://trac.webkit.org/changeset/143882>
Comment 8 WebKit Review Bot 2013-02-24 18:04:08 PST
All reviewed patches have been landed.  Closing bug.