| OLD | NEW |
| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 String message() const { return m_message.isolatedCopy(); } | 56 String message() const { return m_message.isolatedCopy(); } |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 SQLErrorData(unsigned code, const String& message) : m_code(code), m_message
(message.isolatedCopy()) { } | 59 SQLErrorData(unsigned code, const String& message) : m_code(code), m_message
(message.isolatedCopy()) { } |
| 60 | 60 |
| 61 unsigned m_code; | 61 unsigned m_code; |
| 62 String m_message; | 62 String m_message; |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 class SQLError : public ThreadSafeRefCountedWillBeGarbageCollectedFinalized<SQLE
rror>, public ScriptWrappable { | 65 class SQLError : public ThreadSafeRefCountedWillBeGarbageCollectedFinalized<SQLE
rror>, public ScriptWrappable { |
| 66 DEFINE_WRAPPERTYPEINFO(); |
| 66 public: | 67 public: |
| 67 static PassRefPtrWillBeRawPtr<SQLError> create(const SQLErrorData& data) { r
eturn adoptRefWillBeNoop(new SQLError(data)); } | 68 static PassRefPtrWillBeRawPtr<SQLError> create(const SQLErrorData& data) { r
eturn adoptRefWillBeNoop(new SQLError(data)); } |
| 68 void trace(Visitor*) { } | 69 void trace(Visitor*) { } |
| 69 | 70 |
| 70 unsigned code() const { return m_data.code(); } | 71 unsigned code() const { return m_data.code(); } |
| 71 String message() const { return m_data.message(); } | 72 String message() const { return m_data.message(); } |
| 72 | 73 |
| 73 enum SQLErrorCode { | 74 enum SQLErrorCode { |
| 74 UNKNOWN_ERR = 0, | 75 UNKNOWN_ERR = 0, |
| 75 DATABASE_ERR = 1, | 76 DATABASE_ERR = 1, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 87 | 88 |
| 88 private: | 89 private: |
| 89 explicit SQLError(const SQLErrorData& data) : m_data(data) | 90 explicit SQLError(const SQLErrorData& data) : m_data(data) |
| 90 { | 91 { |
| 91 ScriptWrappable::init(this); | 92 ScriptWrappable::init(this); |
| 92 } | 93 } |
| 93 | 94 |
| 94 const SQLErrorData m_data; | 95 const SQLErrorData m_data; |
| 95 }; | 96 }; |
| 96 | 97 |
| 97 } | 98 } // namespace blink |
| 98 | 99 |
| 99 #endif // SQLError_h | 100 #endif // SQLError_h |
| OLD | NEW |