Implement protocol.registerHttpProtocol

This commit is contained in:
Cheng Zhao 2015-08-12 21:09:44 +08:00
parent 1f2d7d1cd8
commit f493eb34ae
6 changed files with 52 additions and 38 deletions

View file

@ -47,7 +47,9 @@ void HandlerCallback(v8::Isolate* isolate,
V8ValueConverter converter;
v8::Local<v8::Context> context = args->isolate()->GetCurrentContext();
scoped_ptr<base::Value> options(converter.FromV8Value(value, context));
holder->callback.Run(true, options.Pass());
content::BrowserThread::PostTask(
content::BrowserThread::IO, FROM_HERE,
base::Bind(holder->callback, true, base::Passed(&options)));
}
// func.bind(func, ...).