WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
212916
ResourceLoadStatisticsDatabaseStore::domainIDFromString failed, error message: bad parameter or other API misuse
https://bugs.webkit.org/show_bug.cgi?id=212916
Summary
ResourceLoadStatisticsDatabaseStore::domainIDFromString failed, error message...
Kate Cheney
Reported
2020-06-08 13:15:56 PDT
The ResourceLoadStatisticsDatabaseStore is reporting "bad parameter or other API misuse" errors.
Attachments
Patch
(2.69 KB, patch)
2020-06-08 13:25 PDT
,
Kate Cheney
no flags
Details
Formatted Diff
Diff
Patch
(3.01 KB, patch)
2020-06-08 14:51 PDT
,
Kate Cheney
no flags
Details
Formatted Diff
Diff
Patch for landing
(3.93 KB, patch)
2020-06-08 16:09 PDT
,
Kate Cheney
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Kate Cheney
Comment 1
2020-06-08 13:16:15 PDT
<
rdar://problem/64127238
>
Kate Cheney
Comment 2
2020-06-08 13:25:32 PDT
Created
attachment 401364
[details]
Patch
Sihui Liu
Comment 3
2020-06-08 14:06:22 PDT
Comment on
attachment 401364
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=401364&action=review
> Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:2226 > + // Reset this statement because it will be used again in the same scope > + // when calling insertObservedDomain. > + scopedStatement->reset();
Can we put the scopedStatement in scope stead? like: { auto scopedStatement = this->scopedStatement(m_domainIDFromStringStatement, domainIDFromStringQuery, "ensureResourceStatisticsForRegistrableDomain"_s); if (!scopedStatement || scopedStatement->bindText(1, domain.string()) != SQLITE_OK) { RELEASE_LOG_ERROR_IF_ALLOWED(m_sessionID, "%p - ResourceLoadStatisticsDatabaseStore::ensureResourceStatisticsForRegistrableDomain failed, error message: %{private}s", this, m_database.lastErrorMsg()); ASSERT_NOT_REACHED(); return { AddedRecord::No, 0 }; } if (scopedStatement->step() == SQLITE_ROW) { unsigned domainID = scopedStatement->getColumnInt(0); return { AddedRecord::No, domainID }; } }
Kate Cheney
Comment 4
2020-06-08 14:51:31 PDT
Created
attachment 401376
[details]
Patch
Kate Cheney
Comment 5
2020-06-08 14:52:33 PDT
(In reply to Sihui Liu from
comment #3
)
> Comment on
attachment 401364
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=401364&action=review
> > > Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:2226 > > + // Reset this statement because it will be used again in the same scope > > + // when calling insertObservedDomain. > > + scopedStatement->reset(); > > Can we put the scopedStatement in scope stead? like: > { > auto scopedStatement = > this->scopedStatement(m_domainIDFromStringStatement, > domainIDFromStringQuery, "ensureResourceStatisticsForRegistrableDomain"_s); > if (!scopedStatement > || scopedStatement->bindText(1, domain.string()) != SQLITE_OK) { > RELEASE_LOG_ERROR_IF_ALLOWED(m_sessionID, "%p - > ResourceLoadStatisticsDatabaseStore:: > ensureResourceStatisticsForRegistrableDomain failed, error message: > %{private}s", this, m_database.lastErrorMsg()); > ASSERT_NOT_REACHED(); > return { AddedRecord::No, 0 }; > } > > if (scopedStatement->step() == SQLITE_ROW) { > unsigned domainID = scopedStatement->getColumnInt(0); > return { AddedRecord::No, domainID }; > } > }
Yes, probably a better idea, I did this in the latest patch.
Sihui Liu
Comment 6
2020-06-08 16:05:49 PDT
Comment on
attachment 401376
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=401376&action=review
> Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:2211 > +{
Nit: indent the block
Kate Cheney
Comment 7
2020-06-08 16:09:33 PDT
Created
attachment 401392
[details]
Patch for landing
EWS
Comment 8
2020-06-08 16:47:27 PDT
Committed
r262752
: <
https://trac.webkit.org/changeset/262752
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 401392
[details]
.
Radar WebKit Bug Importer
Comment 9
2020-06-08 16:48:23 PDT
<
rdar://problem/64140844
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug