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

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

Issue 2707243006: [SharedArrayBuffer] Prevent SharedArrayBuffer being used in Web APIs (Closed)
Patch Set: remove unused checks Created 3 years, 8 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.tmpl
diff --git a/third_party/WebKit/Source/bindings/templates/union_container.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/union_container.cpp.tmpl
index ff2eca5b997b4c4d09d6452eb651bab2a68b005a..0fff9866890271dc3a40fb72aae0cc44207b0b0e 100644
--- a/third_party/WebKit/Source/bindings/templates/union_container.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/union_container.cpp.tmpl
@@ -7,7 +7,13 @@ if (v8Value->Is{{member.type_name}}()) {
{% else %}
if (V8{{member.type_name}}::hasInstance(v8Value, isolate)) {
{% endif %}
+{% if member.is_array_buffer_view_or_typed_array %}
+ {{member.cpp_local_type}} cppValue = toNotShared<{{member.cpp_local_type}}>(isolate, v8Value, exceptionState);
+ if (exceptionState.hadException())
+ return;
+{% else %}
{{member.cpp_local_type}} cppValue = V8{{member.type_name}}::toImpl(v8::Local<v8::Object>::Cast(v8Value));
+{% endif %}
impl.set{{member.type_name}}(cppValue);
return;
}

Powered by Google App Engine
This is Rietveld 408576698