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

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

Issue 13973026: remove memoryinstrumentation Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove the rest part of MemoryInstrumentation Created 7 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/V8PerIsolateData.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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 return v8ExternalStringSlow(stringImpl, handleType, isolate); 59 return v8ExternalStringSlow(stringImpl, handleType, isolate);
60 } 60 }
61 61
62 void clearOnGC() 62 void clearOnGC()
63 { 63 {
64 m_lastStringImpl = 0; 64 m_lastStringImpl = 0;
65 m_lastV8String.Clear(); 65 m_lastV8String.Clear();
66 } 66 }
67 67
68 void remove(StringImpl*); 68 void remove(StringImpl*);
69 void reportMemoryUsage(MemoryObjectInfo*) const;
70 69
71 private: 70 private:
72 v8::Handle<v8::String> v8ExternalStringSlow(StringImpl*, ReturnHandleType, v 8::Isolate*); 71 v8::Handle<v8::String> v8ExternalStringSlow(StringImpl*, ReturnHandleType, v 8::Isolate*);
73 72
74 HashMap<StringImpl*, v8::Persistent<v8::String> > m_stringCache; 73 HashMap<StringImpl*, v8::Persistent<v8::String> > m_stringCache;
75 v8::Persistent<v8::String> m_lastV8String; 74 v8::Persistent<v8::String> m_lastV8String;
76 // Note: RefPtr is a must as we cache by StringImpl* equality, not identity 75 // Note: RefPtr is a must as we cache by StringImpl* equality, not identity
77 // hence lastStringImpl might be not a key of the cache (in sense of identit y) 76 // hence lastStringImpl might be not a key of the cache (in sense of identit y)
78 // and hence it's not refed on addition. 77 // and hence it's not refed on addition.
79 RefPtr<StringImpl> m_lastStringImpl; 78 RefPtr<StringImpl> m_lastStringImpl;
(...skipping 19 matching lines...) Expand all
99 return v8::Integer::NewFromUnsigned(value, isolate); 98 return v8::Integer::NewFromUnsigned(value, isolate);
100 } 99 }
101 100
102 private: 101 private:
103 ScopedPersistent<v8::Integer> m_smallIntegers[numberOfCachedSmallIntegers]; 102 ScopedPersistent<v8::Integer> m_smallIntegers[numberOfCachedSmallIntegers];
104 }; 103 };
105 104
106 } // namespace WebCore 105 } // namespace WebCore
107 106
108 #endif // V8ValueCache_h 107 #endif // V8ValueCache_h
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8PerIsolateData.cpp ('k') | Source/bindings/v8/V8ValueCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698