I added the DCHECK in BrowserContextIOData as suggested.
I see two problems with moving the Qt port check to WebContextAdapter though:
- (minor) the warning message cannot mention "WebContext.maxCacheSizeHint" as we’re not guaranteed the class and property would be called like this in a QtWidgets port
- maxCacheSizeHintChanged() would still be emitted from the QML API even if an integer overflow (or a value < 0) was detected and the size hint was not actually changed, unless we change the signature of WebContextAdapter::setMaxCacheSizeHint(…) to return a boolean indicating success
I added the DCHECK in BrowserContextI OData as suggested.
I see two problems with moving the Qt port check to WebContextAdapter though:
- (minor) the warning message cannot mention "WebContext. maxCacheSizeHin t" as we’re not guaranteed the class and property would be called like this in a QtWidgets port
- maxCacheSizeHin tChanged( ) would still be emitted from the QML API even if an integer overflow (or a value < 0) was detected and the size hint was not actually changed, unless we change the signature of WebContextAdapt er::setMaxCache SizeHint( …) to return a boolean indicating success