refactor: simplify ParseUserScript() (#45269)
		
	refactor: simplify ParseUserScript() local variable user_script no longer needed after #43205
This commit is contained in:
		
					parent
					
						
							
								e1762e6e44
							
						
					
				
			
			
				commit
				
					
						f5eba67f0d
					
				
			
		
					 1 changed files with 2 additions and 8 deletions
				
			
		|  | @ -490,14 +490,8 @@ std::unique_ptr<UserScript> ParseUserScript( | |||
|       ConvertRegisteredContentScriptToSerializedUserScript( | ||||
|           std::move(content_script)); | ||||
| 
 | ||||
|   std::unique_ptr<UserScript> user_script = | ||||
|       script_serialization::ParseSerializedUserScript( | ||||
|           serialized_script, extension, allowed_in_incognito, error); | ||||
|   if (!user_script) { | ||||
|     return nullptr;  // Parsing failed.
 | ||||
|   } | ||||
| 
 | ||||
|   return user_script; | ||||
|   return script_serialization::ParseSerializedUserScript( | ||||
|       serialized_script, extension, allowed_in_incognito, error); | ||||
| } | ||||
| 
 | ||||
| // Converts a UserScript object to a api::scripting::RegisteredContentScript
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Charles Kerr
				Charles Kerr