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

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

Issue 20300002: Fix trailing whitespace in .cpp, .h, and .idl files (ex. Source/core) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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/V8Utilities.cpp ('k') | Source/bindings/v8/V8ValueCache.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 * 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 template <class T> 50 template <class T>
51 void setReturnValueFromString(const T& info, StringImpl* stringImpl, v8::Iso late* isolate) 51 void setReturnValueFromString(const T& info, StringImpl* stringImpl, v8::Iso late* isolate)
52 { 52 {
53 if (m_lastStringImpl.get() == stringImpl && m_lastV8String.isWeak()) 53 if (m_lastStringImpl.get() == stringImpl && m_lastV8String.isWeak())
54 info.GetReturnValue().Set(*m_lastV8String.persistent()); 54 info.GetReturnValue().Set(*m_lastV8String.persistent());
55 else 55 else
56 setReturnValueFromStringSlow(info, stringImpl, isolate); 56 setReturnValueFromStringSlow(info, stringImpl, isolate);
57 } 57 }
58 58
59 void clearOnGC() 59 void clearOnGC()
60 { 60 {
61 m_lastStringImpl = 0; 61 m_lastStringImpl = 0;
62 m_lastV8String.clear(); 62 m_lastV8String.clear();
63 } 63 }
64 64
65 void remove(StringImpl*); 65 void remove(StringImpl*);
66 66
67 private: 67 private:
68 static v8::Local<v8::String> makeExternalString(const String&); 68 static v8::Local<v8::String> makeExternalString(const String&);
69 static void makeWeakCallback(v8::Isolate*, v8::Persistent<v8::String>*, Stri ngImpl*); 69 static void makeWeakCallback(v8::Isolate*, v8::Persistent<v8::String>*, Stri ngImpl*);
(...skipping 29 matching lines...) Expand all
99 UnsafePersistent<v8::String> m_lastV8String; 99 UnsafePersistent<v8::String> m_lastV8String;
100 // Note: RefPtr is a must as we cache by StringImpl* equality, not identity 100 // Note: RefPtr is a must as we cache by StringImpl* equality, not identity
101 // hence lastStringImpl might be not a key of the cache (in sense of identit y) 101 // hence lastStringImpl might be not a key of the cache (in sense of identit y)
102 // and hence it's not refed on addition. 102 // and hence it's not refed on addition.
103 RefPtr<StringImpl> m_lastStringImpl; 103 RefPtr<StringImpl> m_lastStringImpl;
104 }; 104 };
105 105
106 } // namespace WebCore 106 } // namespace WebCore
107 107
108 #endif // V8ValueCache_h 108 #endif // V8ValueCache_h
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8Utilities.cpp ('k') | Source/bindings/v8/V8ValueCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698