Commit faf48064 authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa Committed by Commit Bot

bindings: Remove duplicate check in ToByteString()

Remove one of the identical copies of the same check from the code, added in
e5bbbb17 ("Bindings: Add ScalarValueString support"). The original check
was added a few days before in 65d50ad9 ("Add ByteString support to IDL
bindings").

R=haraken, jbroman, yukishiino

Change-Id: Ic7cb436200a7c3e15ebd7bd1183c54d16eeae595
Reviewed-on: https://chromium-review.googlesource.com/899183Reviewed-by: default avatarJeremy Roman <jbroman@chromium.org>
Reviewed-by: default avatarYuki Shiino <yukishiino@chromium.org>
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#534054}
parent f7dcb7e8
...@@ -503,6 +503,7 @@ double ToRestrictedDouble(v8::Isolate* isolate, ...@@ -503,6 +503,7 @@ double ToRestrictedDouble(v8::Isolate* isolate,
return number_value; return number_value;
} }
// http://heycam.github.io/webidl/#es-ByteString
String ToByteString(v8::Isolate* isolate, String ToByteString(v8::Isolate* isolate,
v8::Local<v8::Value> value, v8::Local<v8::Value> value,
ExceptionState& exception_state) { ExceptionState& exception_state) {
...@@ -510,10 +511,6 @@ String ToByteString(v8::Isolate* isolate, ...@@ -510,10 +511,6 @@ String ToByteString(v8::Isolate* isolate,
if (value.IsEmpty()) if (value.IsEmpty())
return String(); return String();
// From the Web IDL spec: http://heycam.github.io/webidl/#es-ByteString
if (value.IsEmpty())
return String();
// 1. Let x be ToString(v) // 1. Let x be ToString(v)
v8::Local<v8::String> string_object; v8::Local<v8::String> string_object;
if (value->IsString()) { if (value->IsString()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment