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

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

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/V8ValueCache.h ('k') | Source/bindings/v8/WorkerScriptDebugServer.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 return newString; 49 return newString;
50 } 50 }
51 51
52 void StringCache::makeWeakCallback(v8::Isolate* isolate, v8::Persistent<v8::Stri ng>* wrapper, StringImpl* stringImpl) 52 void StringCache::makeWeakCallback(v8::Isolate* isolate, v8::Persistent<v8::Stri ng>* wrapper, StringImpl* stringImpl)
53 { 53 {
54 V8PerIsolateData::current()->stringCache()->remove(stringImpl); 54 V8PerIsolateData::current()->stringCache()->remove(stringImpl);
55 wrapper->Dispose(isolate); 55 wrapper->Dispose(isolate);
56 stringImpl->deref(); 56 stringImpl->deref();
57 } 57 }
58 58
59 void StringCache::remove(StringImpl* stringImpl) 59 void StringCache::remove(StringImpl* stringImpl)
60 { 60 {
61 ASSERT(m_stringCache.contains(stringImpl)); 61 ASSERT(m_stringCache.contains(stringImpl));
62 m_stringCache.remove(stringImpl); 62 m_stringCache.remove(stringImpl);
63 // Make sure that already disposed m_lastV8String is not used in 63 // Make sure that already disposed m_lastV8String is not used in
64 // StringCache::v8ExternalString(). 64 // StringCache::v8ExternalString().
65 clearOnGC(); 65 clearOnGC();
66 } 66 }
67 67
68 v8::Handle<v8::String> StringCache::v8ExternalStringSlow(StringImpl* stringImpl, v8::Isolate* isolate) 68 v8::Handle<v8::String> StringCache::v8ExternalStringSlow(StringImpl* stringImpl, v8::Isolate* isolate)
69 { 69 {
(...skipping 23 matching lines...) Expand all
93 wrapper.MarkIndependent(isolate); 93 wrapper.MarkIndependent(isolate);
94 wrapper.MakeWeak(stringImpl, &makeWeakCallback); 94 wrapper.MakeWeak(stringImpl, &makeWeakCallback);
95 m_lastV8String = UnsafePersistent<v8::String>(wrapper); 95 m_lastV8String = UnsafePersistent<v8::String>(wrapper);
96 m_stringCache.set(stringImpl, m_lastV8String); 96 m_stringCache.set(stringImpl, m_lastV8String);
97 97
98 m_lastStringImpl = stringImpl; 98 m_lastStringImpl = stringImpl;
99 return newString; 99 return newString;
100 } 100 }
101 101
102 } // namespace WebCore 102 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8ValueCache.h ('k') | Source/bindings/v8/WorkerScriptDebugServer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698