Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(579)

Side by Side Diff: Source/modules/webdatabase/SQLStatementBackend.cpp

Issue 205823002: Oilpan: Prepare to move AbstractSQLStatementBackend and SQLStatementBackend to Oilpan heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2013 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // ========================================================================= ============== 64 // ========================================================================= ==============
65 // When we're done executing, we'll grab the next statement. But before we 65 // When we're done executing, we'll grab the next statement. But before we
66 // do that, getNextStatement() nullify SQLTransactionBackend::m_currentState mentBackend. 66 // do that, getNextStatement() nullify SQLTransactionBackend::m_currentState mentBackend.
67 // This will trigger the deletion of the SQLStatementBackend and SQLStatemen t. 67 // This will trigger the deletion of the SQLStatementBackend and SQLStatemen t.
68 // 68 //
69 // Note: unlike with SQLTransaction, there is no JS representation of SQLSta tement. 69 // Note: unlike with SQLTransaction, there is no JS representation of SQLSta tement.
70 // Hence, there is no GC dependency at play here. 70 // Hence, there is no GC dependency at play here.
71 71
72 namespace WebCore { 72 namespace WebCore {
73 73
74 PassRefPtr<SQLStatementBackend> SQLStatementBackend::create(PassOwnPtr<AbstractS QLStatement> frontend, 74 PassRefPtrWillBeRawPtr<SQLStatementBackend> SQLStatementBackend::create(PassOwnP tr<AbstractSQLStatement> frontend,
75 const String& statement, const Vector<SQLValue>& arguments, int permissions) 75 const String& statement, const Vector<SQLValue>& arguments, int permissions)
76 { 76 {
77 return adoptRef(new SQLStatementBackend(frontend, statement, arguments, perm issions)); 77 return adoptRefWillBeNoop(new SQLStatementBackend(frontend, statement, argum ents, permissions));
78 } 78 }
79 79
80 SQLStatementBackend::SQLStatementBackend(PassOwnPtr<AbstractSQLStatement> fronte nd, 80 SQLStatementBackend::SQLStatementBackend(PassOwnPtr<AbstractSQLStatement> fronte nd,
81 const String& statement, const Vector<SQLValue>& arguments, int permissions) 81 const String& statement, const Vector<SQLValue>& arguments, int permissions)
82 : m_frontend(frontend) 82 : m_frontend(frontend)
83 , m_statement(statement.isolatedCopy()) 83 , m_statement(statement.isolatedCopy())
84 , m_arguments(arguments) 84 , m_arguments(arguments)
85 , m_hasCallback(m_frontend->hasCallback()) 85 , m_hasCallback(m_frontend->hasCallback())
86 , m_hasErrorCallback(m_frontend->hasErrorCallback()) 86 , m_hasErrorCallback(m_frontend->hasErrorCallback())
87 , m_permissions(permissions) 87 , m_permissions(permissions)
88 { 88 {
89 m_frontend->setBackend(this); 89 m_frontend->setBackend(this);
90 } 90 }
91 91
92 void SQLStatementBackend::trace(Visitor*)
93 {
94 }
95
92 AbstractSQLStatement* SQLStatementBackend::frontend() 96 AbstractSQLStatement* SQLStatementBackend::frontend()
93 { 97 {
94 return m_frontend.get(); 98 return m_frontend.get();
95 } 99 }
96 100
97 PassRefPtr<SQLError> SQLStatementBackend::sqlError() const 101 PassRefPtr<SQLError> SQLStatementBackend::sqlError() const
98 { 102 {
99 return m_error; 103 return m_error;
100 } 104 }
101 105
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 if (lastExecutionFailedDueToQuota()) 231 if (lastExecutionFailedDueToQuota())
228 m_error = nullptr; 232 m_error = nullptr;
229 } 233 }
230 234
231 bool SQLStatementBackend::lastExecutionFailedDueToQuota() const 235 bool SQLStatementBackend::lastExecutionFailedDueToQuota() const
232 { 236 {
233 return m_error && m_error->code() == SQLError::QUOTA_ERR; 237 return m_error && m_error->code() == SQLError::QUOTA_ERR;
234 } 238 }
235 239
236 } // namespace WebCore 240 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/webdatabase/SQLStatementBackend.h ('k') | Source/modules/webdatabase/SQLTransactionBackend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698