Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Unified Diff: extensions/renderer/blob_native_handler.cc

Issue 1167423002: Use V8 Maybe APIs in extensions/renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/renderer/binding_generating_native_handler.cc ('k') | extensions/renderer/console.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/blob_native_handler.cc
diff --git a/extensions/renderer/blob_native_handler.cc b/extensions/renderer/blob_native_handler.cc
index b8b2e5189091fa230e95834c0583e4011f2c32ea..7abee96ee8cbdf9b4f0a1374327ce85b6e0384ac 100644
--- a/extensions/renderer/blob_native_handler.cc
+++ b/extensions/renderer/blob_native_handler.cc
@@ -5,6 +5,7 @@
#include "extensions/renderer/blob_native_handler.h"
#include "base/bind.h"
+#include "extensions/renderer/v8_maybe_helpers.h"
#include "third_party/WebKit/public/platform/WebCString.h"
#include "third_party/WebKit/public/platform/WebURL.h"
#include "third_party/WebKit/public/web/WebBlob.h"
@@ -16,7 +17,7 @@ void GetBlobUuid(const v8::FunctionCallbackInfo<v8::Value>& args) {
DCHECK_EQ(1, args.Length());
blink::WebBlob blob = blink::WebBlob::fromV8Value(args[0]);
args.GetReturnValue().Set(
- v8::String::NewFromUtf8(args.GetIsolate(), blob.uuid().utf8().data()));
+ extensions::ToV8String(args.GetIsolate(), blob.uuid().utf8().data()));
}
// Take ownership of a Blob created on the browser process. Expects the Blob's
@@ -33,7 +34,7 @@ void TakeBrowserProcessBlob(const v8::FunctionCallbackInfo<v8::Value>& args) {
blink::WebBlob blob =
blink::WebBlob::createFromUUID(blink::WebString::fromUTF8(uuid),
blink::WebString::fromUTF8(type),
- args[2]->Int32Value());
+ args[2].As<v8::Int32>()->Value());
args.GetReturnValue().Set(blob.toV8Value(args.Holder(), args.GetIsolate()));
}
« no previous file with comments | « extensions/renderer/binding_generating_native_handler.cc ('k') | extensions/renderer/console.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698