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

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

Issue 72363002: Rename es => exceptionState in other than bindings/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Retry Created 7 years, 1 month 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 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 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 25 matching lines...) Expand all
36 36
37 SQLResultSet::SQLResultSet() 37 SQLResultSet::SQLResultSet()
38 : m_rows(SQLResultSetRowList::create()) 38 : m_rows(SQLResultSetRowList::create())
39 , m_insertId(0) 39 , m_insertId(0)
40 , m_insertIdSet(false) 40 , m_insertIdSet(false)
41 , m_rowsAffected(0) 41 , m_rowsAffected(0)
42 { 42 {
43 ScriptWrappable::init(this); 43 ScriptWrappable::init(this);
44 } 44 }
45 45
46 int64_t SQLResultSet::insertId(ExceptionState& es) const 46 int64_t SQLResultSet::insertId(ExceptionState& exceptionState) const
47 { 47 {
48 // 4.11.4 - Return the id of the last row inserted as a result of the query 48 // 4.11.4 - Return the id of the last row inserted as a result of the query
49 // If the query didn't result in any rows being added, raise an InvalidAcces sError exception 49 // If the query didn't result in any rows being added, raise an InvalidAcces sError exception
50 if (m_insertIdSet) 50 if (m_insertIdSet)
51 return m_insertId; 51 return m_insertId;
52 52
53 es.throwUninformativeAndGenericDOMException(InvalidAccessError); 53 exceptionState.throwUninformativeAndGenericDOMException(InvalidAccessError);
54 return -1; 54 return -1;
55 } 55 }
56 56
57 int SQLResultSet::rowsAffected() const 57 int SQLResultSet::rowsAffected() const
58 { 58 {
59 return m_rowsAffected; 59 return m_rowsAffected;
60 } 60 }
61 61
62 SQLResultSetRowList* SQLResultSet::rows() const 62 SQLResultSetRowList* SQLResultSet::rows() const
63 { 63 {
64 return m_rows.get(); 64 return m_rows.get();
65 } 65 }
66 66
67 void SQLResultSet::setInsertId(int64_t id) 67 void SQLResultSet::setInsertId(int64_t id)
68 { 68 {
69 ASSERT(!m_insertIdSet); 69 ASSERT(!m_insertIdSet);
70 70
71 m_insertId = id; 71 m_insertId = id;
72 m_insertIdSet = true; 72 m_insertIdSet = true;
73 } 73 }
74 74
75 void SQLResultSet::setRowsAffected(int count) 75 void SQLResultSet::setRowsAffected(int count)
76 { 76 {
77 m_rowsAffected = count; 77 m_rowsAffected = count;
78 } 78 }
79 79
80 } 80 }
OLDNEW
« no previous file with comments | « Source/modules/webdatabase/DatabaseSync.cpp ('k') | Source/modules/webdatabase/SQLStatementSync.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698