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

Unified Diff: third_party/WebKit/Source/bindings/templates/union_container.cpp

Issue 1996903002: [Binding] Delete hasInstance() from ArrayBuffer related interfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
Index: third_party/WebKit/Source/bindings/templates/union_container.cpp
diff --git a/third_party/WebKit/Source/bindings/templates/union_container.cpp b/third_party/WebKit/Source/bindings/templates/union_container.cpp
index 920d223c1e320bd9f7dc59047cdf5313b882cdd8..cda4010e3cbb023997d36af100cc7056b9d1e40a 100644
--- a/third_party/WebKit/Source/bindings/templates/union_container.cpp
+++ b/third_party/WebKit/Source/bindings/templates/union_container.cpp
@@ -4,7 +4,11 @@
{% from 'utilities.cpp' import v8_value_to_local_cpp_value %}
{% macro assign_and_return_if_hasinstance(member) %}
+{% if member.is_array_buffer_or_view_type %}
+if (v8Value->Is{{member.type_name}}()) {
+{% else %}
if (V8{{member.type_name}}::hasInstance(v8Value, isolate)) {
+{% endif %}
{{member.cpp_local_type}} cppValue = V8{{member.type_name}}::toImpl(v8::Local<v8::Object>::Cast(v8Value));
impl.set{{member.type_name}}(cppValue);
return;

Powered by Google App Engine
This is Rietveld 408576698