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

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

Issue 1071963002: Replace Handle<> with Local<> in bindings/core/v8 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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/V8ValueCache.h ('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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 WebCoreStringResource16* stringResource = new WebCoreStringResource16(string ); 69 WebCoreStringResource16* stringResource = new WebCoreStringResource16(string );
70 v8::Local<v8::String> newString; 70 v8::Local<v8::String> newString;
71 if (!v8::String::NewExternalTwoByte(isolate, stringResource).ToLocal(&newStr ing)) { 71 if (!v8::String::NewExternalTwoByte(isolate, stringResource).ToLocal(&newStr ing)) {
72 delete stringResource; 72 delete stringResource;
73 return v8::String::Empty(isolate); 73 return v8::String::Empty(isolate);
74 } 74 }
75 return newString; 75 return newString;
76 } 76 }
77 77
78 v8::Handle<v8::String> StringCache::v8ExternalStringSlow(v8::Isolate* isolate, S tringImpl* stringImpl) 78 v8::Local<v8::String> StringCache::v8ExternalStringSlow(v8::Isolate* isolate, St ringImpl* stringImpl)
79 { 79 {
80 if (!stringImpl->length()) 80 if (!stringImpl->length())
81 return v8::String::Empty(isolate); 81 return v8::String::Empty(isolate);
82 82
83 StringCacheMapTraits::MapType::PersistentValueReference cachedV8String = m_s tringCache.GetReference(stringImpl); 83 StringCacheMapTraits::MapType::PersistentValueReference cachedV8String = m_s tringCache.GetReference(stringImpl);
84 if (!cachedV8String.IsEmpty()) { 84 if (!cachedV8String.IsEmpty()) {
85 m_lastStringImpl = stringImpl; 85 m_lastStringImpl = stringImpl;
86 m_lastV8String = cachedV8String; 86 m_lastV8String = cachedV8String;
87 return m_lastV8String.NewLocal(isolate); 87 return m_lastV8String.NewLocal(isolate);
88 } 88 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 return newString; 127 return newString;
128 } 128 }
129 129
130 void StringCache::InvalidateLastString() 130 void StringCache::InvalidateLastString()
131 { 131 {
132 m_lastStringImpl = nullptr; 132 m_lastStringImpl = nullptr;
133 m_lastV8String.Reset(); 133 m_lastV8String.Reset();
134 } 134 }
135 135
136 } // namespace blink 136 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/V8ValueCache.h ('k') | Source/bindings/core/v8/WindowProxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698