Avoid unnecessary copy in ConvertToV8
This commit is contained in:
		
					parent
					
						
							
								bcf87fd3c9
							
						
					
				
			
			
				commit
				
					
						1116a36c15
					
				
			
		
					 1 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -189,10 +189,15 @@ struct Converter<std::vector<T> > {
 | 
			
		|||
// Convenience functions that deduce T.
 | 
			
		||||
template<typename T>
 | 
			
		||||
v8::Handle<v8::Value> ConvertToV8(v8::Isolate* isolate,
 | 
			
		||||
                                  T input) {
 | 
			
		||||
                                  const T& input) {
 | 
			
		||||
  return Converter<T>::ToV8(isolate, input);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
inline v8::Handle<v8::Value> ConvertToV8(v8::Isolate* isolate,
 | 
			
		||||
                                         const char* input) {
 | 
			
		||||
  return Converter<const char*>::ToV8(isolate, input);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
inline v8::Handle<v8::String> StringToV8(
 | 
			
		||||
    v8::Isolate* isolate,
 | 
			
		||||
    const base::StringPiece& input) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue