| 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 void operator=(v8::Handle<v8::Value> object) | 182 V8StringResource& operator=(v8::Handle<v8::Value> object) |
| 183 { | 183 { |
| 184 m_v8Object = object; | 184 m_v8Object = object; |
| 185 return *this; |
| 185 } | 186 } |
| 186 | 187 |
| 187 void operator=(const String& string) | 188 V8StringResource& operator=(const String& string) |
| 188 { | 189 { |
| 189 setString(string); | 190 setString(string); |
| 191 return *this; |
| 190 } | 192 } |
| 191 | 193 |
| 192 void operator=(std::nullptr_t) | 194 void operator=(std::nullptr_t) |
| 193 { | 195 { |
| 194 setString(String()); | 196 setString(String()); |
| 195 } | 197 } |
| 196 | 198 |
| 197 bool prepare() | 199 bool prepare() |
| 198 { | 200 { |
| 199 if (prepareFast()) | 201 if (prepareFast()) |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 } | 310 } |
| 309 | 311 |
| 310 template<> inline String V8StringResource<TreatNullAndUndefinedAsNullString>::fa
llbackString() const | 312 template<> inline String V8StringResource<TreatNullAndUndefinedAsNullString>::fa
llbackString() const |
| 311 { | 313 { |
| 312 return String(); | 314 return String(); |
| 313 } | 315 } |
| 314 | 316 |
| 315 } // namespace blink | 317 } // namespace blink |
| 316 | 318 |
| 317 #endif // V8StringResource_h | 319 #endif // V8StringResource_h |
| OLD | NEW |