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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/v8/V8Initializer.cpp ('k') | Source/bindings/v8/WorkerScriptController.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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 m_lastV8String = UnsafePersistent<v8::String>(wrapper); 99 m_lastV8String = UnsafePersistent<v8::String>(wrapper);
100 m_lastStringImpl = stringImpl; 100 m_lastStringImpl = stringImpl;
101 m_stringCache.set(stringImpl, m_lastV8String); 101 m_stringCache.set(stringImpl, m_lastV8String);
102 102
103 return newString; 103 return newString;
104 } 104 }
105 105
106 void StringCache::setWeakCallback(const v8::WeakCallbackData<v8::String, StringI mpl>& data) 106 void StringCache::setWeakCallback(const v8::WeakCallbackData<v8::String, StringI mpl>& data)
107 { 107 {
108 StringCache* stringCache = V8PerIsolateData::from(data.GetIsolate())->string Cache(); 108 StringCache* stringCache = V8PerIsolateData::from(data.GetIsolate())->string Cache();
109 stringCache->m_lastStringImpl = 0; 109 stringCache->m_lastStringImpl = nullptr;
110 stringCache->m_lastV8String.clear(); 110 stringCache->m_lastV8String.clear();
111 ASSERT(stringCache->m_stringCache.contains(data.GetParameter())); 111 ASSERT(stringCache->m_stringCache.contains(data.GetParameter()));
112 stringCache->m_stringCache.get(data.GetParameter()).dispose(); 112 stringCache->m_stringCache.get(data.GetParameter()).dispose();
113 stringCache->m_stringCache.remove(data.GetParameter()); 113 stringCache->m_stringCache.remove(data.GetParameter());
114 data.GetParameter()->deref(); 114 data.GetParameter()->deref();
115 } 115 }
116 116
117 } // namespace WebCore 117 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8Initializer.cpp ('k') | Source/bindings/v8/WorkerScriptController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698