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

Side by Side Diff: Source/bindings/v8/V8Binding.h

Issue 242223004: Rename macros TONATIVE_BOOL* and TOSTRING_BOOL to *_DEFAULT (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix comment Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/v8/ScriptValue.cpp ('k') | Source/bindings/v8/V8Binding.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Ericsson AB. All rights reserved. 3 * Copyright (C) 2012 Ericsson AB. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 // FIXME: Remove the special casing for NodeFilter and XPathNSResolver. 442 // FIXME: Remove the special casing for NodeFilter and XPathNSResolver.
443 PassRefPtr<NodeFilter> toNodeFilter(v8::Handle<v8::Value>, v8::Isolate*); 443 PassRefPtr<NodeFilter> toNodeFilter(v8::Handle<v8::Value>, v8::Isolate*);
444 PassRefPtrWillBeRawPtr<XPathNSResolver> toXPathNSResolver(v8::Handle<v8::Value>, v8::Isolate*); 444 PassRefPtrWillBeRawPtr<XPathNSResolver> toXPathNSResolver(v8::Handle<v8::Value>, v8::Isolate*);
445 445
446 template<class T> struct NativeValueTraits; 446 template<class T> struct NativeValueTraits;
447 447
448 template<> 448 template<>
449 struct NativeValueTraits<String> { 449 struct NativeValueTraits<String> {
450 static inline String nativeValue(const v8::Handle<v8::Value>& value, v8::Iso late* isolate) 450 static inline String nativeValue(const v8::Handle<v8::Value>& value, v8::Iso late* isolate)
451 { 451 {
452 TOSTRING_BOOL(V8StringResource<>, stringValue, value, String()); 452 TOSTRING_DEFAULT(V8StringResource<>, stringValue, value, String());
453 return stringValue; 453 return stringValue;
454 } 454 }
455 }; 455 };
456 456
457 template<> 457 template<>
458 struct NativeValueTraits<unsigned> { 458 struct NativeValueTraits<unsigned> {
459 static inline unsigned nativeValue(const v8::Handle<v8::Value>& value, v8::I solate* isolate) 459 static inline unsigned nativeValue(const v8::Handle<v8::Value>& value, v8::I solate* isolate)
460 { 460 {
461 return toUInt32(value); 461 return toUInt32(value);
462 } 462 }
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 759
760 private: 760 private:
761 v8::HandleScope m_handleScope; 761 v8::HandleScope m_handleScope;
762 v8::Context::Scope m_contextScope; 762 v8::Context::Scope m_contextScope;
763 RefPtr<NewScriptState> m_scriptState; 763 RefPtr<NewScriptState> m_scriptState;
764 }; 764 };
765 765
766 } // namespace WebCore 766 } // namespace WebCore
767 767
768 #endif // V8Binding_h 768 #endif // V8Binding_h
OLDNEW
« no previous file with comments | « Source/bindings/v8/ScriptValue.cpp ('k') | Source/bindings/v8/V8Binding.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698