Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/V8StringResource.h

Issue 2668903003: Replace WTF::emptyString{16Bit}() with a static global (Closed)
Patch Set: Replace WTF::emptyString{16Bit}() with a static global Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698