WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
159255
Purge PassRefPtr in Modules/webdatabase
https://bugs.webkit.org/show_bug.cgi?id=159255
Summary
Purge PassRefPtr in Modules/webdatabase
Gyuyoung Kim
Reported
2016-06-29 02:07:05 PDT
SSIA.
Attachments
Patch
(22.51 KB, patch)
2016-06-29 02:09 PDT
,
Gyuyoung Kim
no flags
Details
Formatted Diff
Diff
Patch
(25.09 KB, patch)
2016-06-29 17:45 PDT
,
Gyuyoung Kim
no flags
Details
Formatted Diff
Diff
Patch for landing
(25.11 KB, patch)
2016-06-29 21:32 PDT
,
Gyuyoung Kim
no flags
Details
Formatted Diff
Diff
Patch
(22.98 KB, patch)
2016-07-05 01:43 PDT
,
Gyuyoung Kim
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Gyuyoung Kim
Comment 1
2016-06-29 02:09:51 PDT
Created
attachment 282334
[details]
Patch
Alex Christensen
Comment 2
2016-06-29 09:33:23 PDT
Comment on
attachment 282334
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=282334&action=review
> Source/WebCore/Modules/webdatabase/Database.cpp:249 > - PassRefPtr<ScriptExecutionContext> passedContext = m_scriptExecutionContext.release(); > + RefPtr<ScriptExecutionContext> passedContext = WTFMove(m_scriptExecutionContext); > passedContext->postTask({ScriptExecutionContext::Task::CleanupTask, [passedContext] (ScriptExecutionContext& context) {
c++14 allows you to do the WTFMove in the capture, like this: passedContext = WTFMove(m_scriptExecutionContext)
> Source/WebCore/Modules/webdatabase/Database.h:128 > + Database(RefPtr<DatabaseContext>&, const String& name, const String& expectedVersion, const String& displayName, unsigned long estimatedSize);
RefPtr<DatabaseContext>&&
Gyuyoung Kim
Comment 3
2016-06-29 17:45:43 PDT
Created
attachment 282394
[details]
Patch
Gyuyoung Kim
Comment 4
2016-06-29 18:18:37 PDT
(In reply to
comment #2
)
> Comment on
attachment 282334
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=282334&action=review
> > > Source/WebCore/Modules/webdatabase/Database.cpp:249 > > - PassRefPtr<ScriptExecutionContext> passedContext = m_scriptExecutionContext.release(); > > + RefPtr<ScriptExecutionContext> passedContext = WTFMove(m_scriptExecutionContext); > > passedContext->postTask({ScriptExecutionContext::Task::CleanupTask, [passedContext] (ScriptExecutionContext& context) { > > c++14 allows you to do the WTFMove in the capture, like this: > passedContext = WTFMove(m_scriptExecutionContext) > > > Source/WebCore/Modules/webdatabase/Database.h:128 > > + Database(RefPtr<DatabaseContext>&, const String& name, const String& expectedVersion, const String& displayName, unsigned long estimatedSize); > > RefPtr<DatabaseContext>&&
I see. Fixed all. Thanks~
Benjamin Poulain
Comment 5
2016-06-29 20:32:23 PDT
Comment on
attachment 282394
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=282394&action=review
> Source/WebCore/Modules/webdatabase/SQLStatement.h:62 > + RefPtr<SQLError> sqlError() const; > + SQLResultSet* sqlResultSet() const;
This is an inconsistent design. Why is one returned by RefPTR and the other by pointer? Please change this before landing unless you have a rationale.
Gyuyoung Kim
Comment 6
2016-06-29 21:32:19 PDT
Created
attachment 282414
[details]
Patch for landing
Gyuyoung Kim
Comment 7
2016-06-29 21:37:17 PDT
(In reply to
comment #5
)
> Comment on
attachment 282394
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=282394&action=review
> > > Source/WebCore/Modules/webdatabase/SQLStatement.h:62 > > + RefPtr<SQLError> sqlError() const; > > + SQLResultSet* sqlResultSet() const; > > This is an inconsistent design. > Why is one returned by RefPTR and the other by pointer? > > Please change this before landing unless you have a rationale.
I thought sqlError() was referenced by other variables. For example, void SQLTransactionBackend::openTransactionAndPreflight() { ... m_transactionError = m_wrapper->sqlError(); However it looks m_transactionError just calls member functions, not referenced or is passed to other variables. So it seems to me that sqlError() can be changed as well.
WebKit Commit Bot
Comment 8
2016-06-30 01:14:59 PDT
Comment on
attachment 282414
[details]
Patch for landing Clearing flags on attachment: 282414 Committed
r202676
: <
http://trac.webkit.org/changeset/202676
>
WebKit Commit Bot
Comment 9
2016-06-30 01:15:03 PDT
All reviewed patches have been landed. Closing bug.
Ryan Haddad
Comment 10
2016-06-30 13:17:59 PDT
This change appears to have caused storage/websql test crashes See crashlogs from mac-wk1 here:
https://build.webkit.org/results/Apple%20El%20Capitan%20Debug%20WK1%20(Tests)/r202693%20(6322)/results.html
WebKit Commit Bot
Comment 11
2016-06-30 13:41:30 PDT
Re-opened since this is blocked by
bug 159314
Gyuyoung Kim
Comment 12
2016-07-05 01:43:56 PDT
Created
attachment 282758
[details]
Patch
Gyuyoung Kim
Comment 13
2016-07-05 01:47:07 PDT
Below lambda function caused the test crash on mac-wk1. However I don't know how to fix this issue yet. So I'd like to prepare a new patch after landing this patch. In Database.cpp, Database::~Database() { ... PassRefPtr<ScriptExecutionContext> passedContext = m_scriptExecutionContext.release(); passedContext->postTask({ScriptExecutionContext::Task::CleanupTask, [passedContext] (ScriptExecutionContext& context) { ASSERT_UNUSED(context, &context == passedContext); RefPtr<ScriptExecutionContext> scriptExecutionContext(passedContext); }}); ...
Gyuyoung Kim
Comment 14
2016-07-07 18:09:35 PDT
Ryan, Darin, could you take a look ? Last patch doesn't cause the test crash anymore.
WebKit Commit Bot
Comment 15
2016-07-12 18:25:08 PDT
Comment on
attachment 282758
[details]
Patch Clearing flags on attachment: 282758 Committed
r203146
: <
http://trac.webkit.org/changeset/203146
>
WebKit Commit Bot
Comment 16
2016-07-12 18:25:13 PDT
All reviewed patches have been landed. Closing bug.
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