Get rid of manually converting to base::Value when possible.

This commit is contained in:
Cheng Zhao 2013-12-05 23:47:07 +08:00
parent e5afa72b4d
commit 4a1ee39156
8 changed files with 13 additions and 37 deletions

View file

@ -15,6 +15,7 @@
#include "base/values.h"
#include "browser/api/atom_api_window.h"
#include "common/swap_or_assign.h"
#include "common/v8_value_converter_impl.h"
#include "content/public/renderer/v8_value_converter.h"
#include "googleurl/src/gurl.h"
#include "ui/gfx/rect.h"
@ -66,7 +67,7 @@ struct FromV8Value {
operator scoped_ptr<base::Value>() {
scoped_ptr<content::V8ValueConverter> converter(
content::V8ValueConverter::create());
new atom::V8ValueConverterImpl);
return scoped_ptr<base::Value>(
converter->FromV8Value(value_, v8::Context::GetCurrent()));
}