Use the convient V8 wrapper in all files.

This commit is contained in:
Cheng Zhao 2013-09-24 09:41:54 +08:00
parent a824c88352
commit 11ca836afc
15 changed files with 198 additions and 193 deletions

View file

@ -6,7 +6,7 @@
#include "base/values.h"
#include "common/api/api_messages.h"
#include "common/string16_conversions.h"
#include "common/v8_conversions.h"
#include "common/v8_value_converter_impl.h"
#include "content/public/browser/render_view_host.h"
#include "vendor/node/src/node.h"
@ -23,13 +23,11 @@ namespace api {
v8::Handle<v8::Value> BrowserIPC::Send(const v8::Arguments &args) {
v8::HandleScope scope;
if (!args[0]->IsString() || !args[1]->IsNumber() || !args[2]->IsNumber())
string16 channel;
int process_id, routing_id;
if (!FromV8Arguments(args, &channel, &process_id, &routing_id))
return node::ThrowTypeError("Bad argument");
string16 channel(FromV8Value(args[0]));
int process_id = args[1]->IntegerValue();
int routing_id = args[2]->IntegerValue();
RenderViewHost* render_view_host(RenderViewHost::FromID(
process_id, routing_id));
if (!render_view_host)