mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
💄 Fix protocol specs.
This commit is contained in:
@@ -291,7 +291,8 @@ class AdapterProtocolHandler
|
||||
// static
|
||||
v8::Handle<v8::Value> Protocol::RegisterProtocol(const v8::Arguments& args) {
|
||||
std::string scheme(*v8::String::Utf8Value(args[0]));
|
||||
if (net::URLRequest::IsHandledProtocol(scheme))
|
||||
if (g_handlers.find(scheme) != g_handlers.end() ||
|
||||
net::URLRequest::IsHandledProtocol(scheme))
|
||||
return node::ThrowError("The scheme is already registered");
|
||||
|
||||
// Store the handler in a map.
|
||||
|
||||
Reference in New Issue
Block a user