Bug 99946 - Add int64 wrapper for WebKit2 API
Summary: Add int64 wrapper for WebKit2 API
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 97417
  Show dependency treegraph
 
Reported: 2012-10-21 17:29 PDT by Jiyeon Kim
Modified: 2012-11-01 00:38 PDT (History)
6 users (show)

See Also:


Attachments
Patch (6.68 KB, patch)
2012-10-21 19:17 PDT, Jiyeon Kim
ap: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jiyeon Kim 2012-10-21 17:29:48 PDT
Add int64 wrapper for WebKit2 API.
Int64 value will be used to get/set application cache quota size.
Comment 1 Jiyeon Kim 2012-10-21 19:17:36 PDT
Created attachment 169822 [details]
Patch
Comment 2 Alexey Proskuryakov 2012-10-22 11:39:13 PDT
Thank you for providing a rationale!

Int64 can have negative values. Is that a good match for application cache quota?
Comment 3 Jiyeon Kim 2012-10-22 16:06:18 PDT
(In reply to comment #2)
> Thank you for providing a rationale!
> 
> Int64 can have negative values. Is that a good match for application cache quota?
The return type of "defaultOriginQuota()" in ApplicationCacheStorage.h is "int64_t". Also "setDefaultOriginQuota()" argument is int64_t type. So I think It needs int64_t wrapper for supporting these APIs for webkit2.
Comment 4 Jiyeon Kim 2012-10-22 22:47:01 PDT
(In reply to comment #3)
> (In reply to comment #2)
> > Thank you for providing a rationale!
> > 
> > Int64 can have negative values. Is that a good match for application cache quota?
> The return type of "defaultOriginQuota()" in ApplicationCacheStorage.h is "int64_t". Also "setDefaultOriginQuota()" argument is int64_t type. So I think It needs int64_t wrapper for supporting these APIs for webkit2.
But I also think that quota doesn't need to be negative value.
Comment 5 Jiyeon Kim 2012-10-30 02:36:11 PDT
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > Thank you for providing a rationale!
> > > 
> > > Int64 can have negative values. Is that a good match for application cache quota?
> > The return type of "defaultOriginQuota()" in ApplicationCacheStorage.h is "int64_t". Also "setDefaultOriginQuota()" argument is int64_t type. So I think It needs int64_t wrapper for supporting these APIs for webkit2.
> But I also think that quota doesn't need to be negative value.
I also have a plan to make some apis for getting disk usage of local storage and application cache. These apis will use StorageTracker::diskUsageForOrigin and ApplicationCache::diskUsageForOrigin return long long type. So I think we need int64 wrapper for WebKit2.
Please review this patch.
Comment 6 Alexey Proskuryakov 2012-10-30 08:39:06 PDT
Comment on attachment 169822 [details]
Patch

> I also have a plan to make some apis for getting disk usage of local storage and application cache.

These also don't need to be signed. r-, since there is no compelling rationale.
Comment 7 Jiyeon Kim 2012-11-01 00:38:13 PDT
(In reply to comment #6)
> (From update of attachment 169822 [details])
> > I also have a plan to make some apis for getting disk usage of local storage and application cache.
> 
> These also don't need to be signed. r-, since there is no compelling rationale.
Is there any way better to get/set application cache quota?
I think I have two options. First, change the type of quota int64 to uint64 in webcore. Second, just use casting value for webkit2 api.
Would you give me some advice about quota value?