Disable overriding built-in protocols with protocol.registerProtocol.
This commit is contained in:
		
					parent
					
						
							
								72c604f741
							
						
					
				
			
			
				commit
				
					
						11221979e5
					
				
			
		
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -291,7 +291,7 @@ class AdapterProtocolHandler | ||||||
| // static
 | // static
 | ||||||
| v8::Handle<v8::Value> Protocol::RegisterProtocol(const v8::Arguments& args) { | v8::Handle<v8::Value> Protocol::RegisterProtocol(const v8::Arguments& args) { | ||||||
|   std::string scheme(*v8::String::Utf8Value(args[0])); |   std::string scheme(*v8::String::Utf8Value(args[0])); | ||||||
|   if (g_handlers.find(scheme) != g_handlers.end()) |   if (net::URLRequest::IsHandledProtocol(scheme)) | ||||||
|     return node::ThrowError("The scheme is already registered"); |     return node::ThrowError("The scheme is already registered"); | ||||||
| 
 | 
 | ||||||
|   // Store the handler in a map.
 |   // Store the handler in a map.
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Cheng Zhao
				Cheng Zhao