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 condition | 5 * modification, are permitted provided that the following condition |
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 18 matching lines...) Expand all Loading... |
29 #include "modules/webdatabase/sqlite/SQLValue.h" | 29 #include "modules/webdatabase/sqlite/SQLValue.h" |
30 | 30 |
31 namespace blink { | 31 namespace blink { |
32 | 32 |
33 SQLValue::SQLValue(const SQLValue& val) | 33 SQLValue::SQLValue(const SQLValue& val) |
34 : type_(val.type_), | 34 : type_(val.type_), |
35 number_(val.number_), | 35 number_(val.number_), |
36 string_(val.string_.IsolatedCopy()) {} | 36 string_(val.string_.IsolatedCopy()) {} |
37 | 37 |
38 String SQLValue::GetString() const { | 38 String SQLValue::GetString() const { |
39 ASSERT(type_ == kStringValue); | 39 DCHECK_EQ(type_, kStringValue); |
40 | 40 |
41 // Must return a copy since ref-shared Strings are not thread safe | 41 // Must return a copy since ref-shared Strings are not thread safe |
42 return string_.IsolatedCopy(); | 42 return string_.IsolatedCopy(); |
43 } | 43 } |
44 | 44 |
45 double SQLValue::Number() const { | 45 double SQLValue::Number() const { |
46 ASSERT(type_ == kNumberValue); | 46 DCHECK_EQ(type_, kNumberValue); |
47 | 47 |
48 return number_; | 48 return number_; |
49 } | 49 } |
50 | 50 |
51 } // namespace blink | 51 } // namespace blink |
OLD | NEW |