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

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

Issue 24469004: Amusingly deprecate the generic version of 'ExceptionState::throwDOMException'. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 ScriptWrappable::init(this); 45 ScriptWrappable::init(this);
46 } 46 }
47 47
48 int64_t SQLResultSet::insertId(ExceptionState& es) const 48 int64_t SQLResultSet::insertId(ExceptionState& es) const
49 { 49 {
50 // 4.11.4 - Return the id of the last row inserted as a result of the query 50 // 4.11.4 - Return the id of the last row inserted as a result of the query
51 // If the query didn't result in any rows being added, raise an InvalidAcces sError exception 51 // If the query didn't result in any rows being added, raise an InvalidAcces sError exception
52 if (m_insertIdSet) 52 if (m_insertIdSet)
53 return m_insertId; 53 return m_insertId;
54 54
55 es.throwDOMException(InvalidAccessError); 55 es.throwUninformativeAndGenericDOMException(InvalidAccessError);
56 return -1; 56 return -1;
57 } 57 }
58 58
59 int SQLResultSet::rowsAffected() const 59 int SQLResultSet::rowsAffected() const
60 { 60 {
61 return m_rowsAffected; 61 return m_rowsAffected;
62 } 62 }
63 63
64 SQLResultSetRowList* SQLResultSet::rows() const 64 SQLResultSetRowList* SQLResultSet::rows() const
65 { 65 {
66 return m_rows.get(); 66 return m_rows.get();
67 } 67 }
68 68
69 void SQLResultSet::setInsertId(int64_t id) 69 void SQLResultSet::setInsertId(int64_t id)
70 { 70 {
71 ASSERT(!m_insertIdSet); 71 ASSERT(!m_insertIdSet);
72 72
73 m_insertId = id; 73 m_insertId = id;
74 m_insertIdSet = true; 74 m_insertIdSet = true;
75 } 75 }
76 76
77 void SQLResultSet::setRowsAffected(int count) 77 void SQLResultSet::setRowsAffected(int count)
78 { 78 {
79 m_rowsAffected = count; 79 m_rowsAffected = count;
80 } 80 }
81 81
82 } 82 }
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