Just return the type directly

This commit is contained in:
Paul Betts 2016-05-13 10:43:08 -07:00
parent 19cba3ff85
commit 652913f8d6
2 changed files with 3 additions and 3 deletions

View file

@ -171,11 +171,11 @@ mate::Handle<WebFrame> WebFrame::Create(v8::Isolate* isolate) {
return mate::CreateHandle(isolate, new WebFrame(isolate));
}
v8::Local<v8::Value> WebFrame::GetResourceUsage(v8::Isolate* isolate) {
blink::WebCache::ResourceTypeStats WebFrame::GetResourceUsage(v8::Isolate* isolate) {
blink::WebCache::ResourceTypeStats stats;
blink::WebCache::getResourceTypeStats(&stats);
return mate::Converter<blink::WebCache::ResourceTypeStats>::ToV8(isolate, stats);
return stats;
}
void WebFrame::PurgeCaches(v8::Isolate* isolate) {

View file

@ -71,7 +71,7 @@ class WebFrame : public mate::Wrappable<WebFrame> {
void ExecuteJavaScript(const base::string16& code, mate::Arguments* args);
// Resource related methods
v8::Local<v8::Value> GetResourceUsage(v8::Isolate* isolate);
blink::WebCache::ResourceTypeStats GetResourceUsage(v8::Isolate* isolate);
void PurgeCaches(v8::Isolate* isolate);
scoped_ptr<SpellCheckClient> spell_check_client_;