OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 : m_mode(Externalize) | 172 : m_mode(Externalize) |
173 { | 173 { |
174 } | 174 } |
175 | 175 |
176 V8StringResource(v8::Handle<v8::Value> object) | 176 V8StringResource(v8::Handle<v8::Value> object) |
177 : m_v8Object(object) | 177 : m_v8Object(object) |
178 , m_mode(Externalize) | 178 , m_mode(Externalize) |
179 { | 179 { |
180 } | 180 } |
181 | 181 |
| 182 V8StringResource(const String& string) |
| 183 : m_mode(Externalize) |
| 184 , m_string(string) |
| 185 { |
| 186 } |
| 187 |
182 void operator=(v8::Handle<v8::Value> object) | 188 void operator=(v8::Handle<v8::Value> object) |
183 { | 189 { |
184 m_v8Object = object; | 190 m_v8Object = object; |
185 } | 191 } |
186 | 192 |
187 void operator=(const String& string) | 193 void operator=(const String& string) |
188 { | 194 { |
189 setString(string); | 195 setString(string); |
190 } | 196 } |
191 | 197 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 } | 314 } |
309 | 315 |
310 template<> inline String V8StringResource<TreatNullAndUndefinedAsNullString>::fa
llbackString() const | 316 template<> inline String V8StringResource<TreatNullAndUndefinedAsNullString>::fa
llbackString() const |
311 { | 317 { |
312 return String(); | 318 return String(); |
313 } | 319 } |
314 | 320 |
315 } // namespace blink | 321 } // namespace blink |
316 | 322 |
317 #endif // V8StringResource_h | 323 #endif // V8StringResource_h |
OLD | NEW |