| 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 return String(); | 273 return String(); |
| 274 } | 274 } |
| 275 | 275 |
| 276 template <> | 276 template <> |
| 277 inline bool V8StringResource<TreatNullAsEmptyString>::isValid() const { | 277 inline bool V8StringResource<TreatNullAsEmptyString>::isValid() const { |
| 278 return !m_v8Object->IsNull(); | 278 return !m_v8Object->IsNull(); |
| 279 } | 279 } |
| 280 | 280 |
| 281 template <> | 281 template <> |
| 282 inline String V8StringResource<TreatNullAsEmptyString>::fallbackString() const { | 282 inline String V8StringResource<TreatNullAsEmptyString>::fallbackString() const { |
| 283 return emptyString(); | 283 return emptyString; |
| 284 } | 284 } |
| 285 | 285 |
| 286 template <> | 286 template <> |
| 287 inline bool V8StringResource<TreatNullAsNullString>::isValid() const { | 287 inline bool V8StringResource<TreatNullAsNullString>::isValid() const { |
| 288 return !m_v8Object->IsNull(); | 288 return !m_v8Object->IsNull(); |
| 289 } | 289 } |
| 290 | 290 |
| 291 template <> | 291 template <> |
| 292 inline String V8StringResource<TreatNullAsNullString>::fallbackString() const { | 292 inline String V8StringResource<TreatNullAsNullString>::fallbackString() const { |
| 293 return String(); | 293 return String(); |
| 294 } | 294 } |
| 295 | 295 |
| 296 template <> | 296 template <> |
| 297 inline bool V8StringResource<TreatNullAndUndefinedAsNullString>::isValid() | 297 inline bool V8StringResource<TreatNullAndUndefinedAsNullString>::isValid() |
| 298 const { | 298 const { |
| 299 return !m_v8Object->IsNull() && !m_v8Object->IsUndefined(); | 299 return !m_v8Object->IsNull() && !m_v8Object->IsUndefined(); |
| 300 } | 300 } |
| 301 | 301 |
| 302 template <> | 302 template <> |
| 303 inline String | 303 inline String |
| 304 V8StringResource<TreatNullAndUndefinedAsNullString>::fallbackString() const { | 304 V8StringResource<TreatNullAndUndefinedAsNullString>::fallbackString() const { |
| 305 return String(); | 305 return String(); |
| 306 } | 306 } |
| 307 | 307 |
| 308 } // namespace blink | 308 } // namespace blink |
| 309 | 309 |
| 310 #endif // V8StringResource_h | 310 #endif // V8StringResource_h |
| OLD | NEW |