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

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

Issue 1110433002: Make Isolate as the first argument. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix Compile error Created 5 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
« no previous file with comments | « Source/bindings/core/v8/V8NPObject.cpp ('k') | Source/bindings/core/v8/WindowProxy.h » ('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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 static void DisposeWeak(const v8::WeakCallbackInfo<WeakCallbackDataType>&); 60 static void DisposeWeak(const v8::WeakCallbackInfo<WeakCallbackDataType>&);
61 }; 61 };
62 62
63 63
64 class CORE_EXPORT StringCache { 64 class CORE_EXPORT StringCache {
65 WTF_MAKE_NONCOPYABLE(StringCache); 65 WTF_MAKE_NONCOPYABLE(StringCache);
66 public: 66 public:
67 StringCache(v8::Isolate* isolate) : m_stringCache(isolate) { } 67 StringCache(v8::Isolate* isolate) : m_stringCache(isolate) { }
68 ~StringCache(); 68 ~StringCache();
69 69
70 v8::Local<v8::String> v8ExternalString(StringImpl* stringImpl, v8::Isolate* isolate) 70 v8::Local<v8::String> v8ExternalString(v8::Isolate* isolate, StringImpl* str ingImpl)
71 { 71 {
72 ASSERT(stringImpl); 72 ASSERT(stringImpl);
73 if (m_lastStringImpl.get() == stringImpl) 73 if (m_lastStringImpl.get() == stringImpl)
74 return m_lastV8String.NewLocal(isolate); 74 return m_lastV8String.NewLocal(isolate);
75 return v8ExternalStringSlow(isolate, stringImpl); 75 return v8ExternalStringSlow(isolate, stringImpl);
76 } 76 }
77 77
78 void setReturnValueFromString(v8::ReturnValue<v8::Value> returnValue, String Impl* stringImpl) 78 void setReturnValueFromString(v8::ReturnValue<v8::Value> returnValue, String Impl* stringImpl)
79 { 79 {
80 ASSERT(stringImpl); 80 ASSERT(stringImpl);
(...skipping 16 matching lines...) Expand all
97 97
98 // Note: RefPtr is a must as we cache by StringImpl* equality, not identity 98 // Note: RefPtr is a must as we cache by StringImpl* equality, not identity
99 // hence lastStringImpl might be not a key of the cache (in sense of identit y) 99 // hence lastStringImpl might be not a key of the cache (in sense of identit y)
100 // and hence it's not refed on addition. 100 // and hence it's not refed on addition.
101 RefPtr<StringImpl> m_lastStringImpl; 101 RefPtr<StringImpl> m_lastStringImpl;
102 }; 102 };
103 103
104 } // namespace blink 104 } // namespace blink
105 105
106 #endif // V8ValueCache_h 106 #endif // V8ValueCache_h
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/V8NPObject.cpp ('k') | Source/bindings/core/v8/WindowProxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698