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

Side by Side Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp

Issue 2707243006: [SharedArrayBuffer] Prevent SharedArrayBuffer being used in Web APIs (Closed)
Patch Set: update comment, add TODO 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by code_generator_v8.py. 5 // This file has been auto-generated by code_generator_v8.py.
6 // DO NOT MODIFY! 6 // DO NOT MODIFY!
7 7
8 // This file has been generated from the Jinja2 template in 8 // This file has been generated from the Jinja2 template in
9 // third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl 9 // third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl
10 10
11 // clang-format off 11 // clang-format off
12 #include "V8TestDictionary.h" 12 #include "V8TestDictionary.h"
13 13
14 #include "bindings/core/v8/Dictionary.h" 14 #include "bindings/core/v8/Dictionary.h"
15 #include "bindings/core/v8/ExceptionState.h" 15 #include "bindings/core/v8/ExceptionState.h"
16 #include "bindings/core/v8/IDLTypes.h" 16 #include "bindings/core/v8/IDLTypes.h"
17 #include "bindings/core/v8/NativeValueTraitsImpl.h" 17 #include "bindings/core/v8/NativeValueTraitsImpl.h"
18 #include "bindings/core/v8/ScriptValue.h" 18 #include "bindings/core/v8/ScriptValue.h"
19 #include "bindings/core/v8/V8ArrayBufferView.h" 19 #include "bindings/core/v8/V8ArrayBufferView.h"
20 #include "bindings/core/v8/V8Element.h" 20 #include "bindings/core/v8/V8Element.h"
21 #include "bindings/core/v8/V8EventTarget.h" 21 #include "bindings/core/v8/V8EventTarget.h"
22 #include "bindings/core/v8/V8InternalDictionary.h" 22 #include "bindings/core/v8/V8InternalDictionary.h"
23 #include "bindings/core/v8/V8TestInterface.h" 23 #include "bindings/core/v8/V8TestInterface.h"
24 #include "bindings/core/v8/V8TestInterface2.h" 24 #include "bindings/core/v8/V8TestInterface2.h"
25 #include "bindings/core/v8/V8TestInterfaceGarbageCollected.h" 25 #include "bindings/core/v8/V8TestInterfaceGarbageCollected.h"
26 #include "bindings/core/v8/V8TestObject.h" 26 #include "bindings/core/v8/V8TestObject.h"
27 #include "bindings/core/v8/V8Uint8Array.h" 27 #include "bindings/core/v8/V8Uint8Array.h"
28 #include "core/dom/FlexibleArrayBufferView.h" 28 #include "core/dom/FlexibleArrayBufferView.h"
29 #include "core/dom/NotShared.h"
29 #include "core/frame/Deprecation.h" 30 #include "core/frame/Deprecation.h"
30 #include "platform/RuntimeEnabledFeatures.h" 31 #include "platform/RuntimeEnabledFeatures.h"
31 32
32 namespace blink { 33 namespace blink {
33 34
34 static const v8::Eternal<v8::Name>* eternalV8TestDictionaryKeys(v8::Isolate* iso late) { 35 static const v8::Eternal<v8::Name>* eternalV8TestDictionaryKeys(v8::Isolate* iso late) {
35 static const char* const kKeys[] = { 36 static const char* const kKeys[] = {
36 "anyInRecordMember", 37 "anyInRecordMember",
37 "anyMember", 38 "anyMember",
38 "booleanMember", 39 "booleanMember",
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 } 637 }
637 638
638 v8::Local<v8::Value> uint8ArrayMemberValue; 639 v8::Local<v8::Value> uint8ArrayMemberValue;
639 if (!v8Object->Get(context, keys[35].Get(isolate)).ToLocal(&uint8ArrayMemberVa lue)) { 640 if (!v8Object->Get(context, keys[35].Get(isolate)).ToLocal(&uint8ArrayMemberVa lue)) {
640 exceptionState.RethrowV8Exception(block.Exception()); 641 exceptionState.RethrowV8Exception(block.Exception());
641 return; 642 return;
642 } 643 }
643 if (uint8ArrayMemberValue.IsEmpty() || uint8ArrayMemberValue->IsUndefined()) { 644 if (uint8ArrayMemberValue.IsEmpty() || uint8ArrayMemberValue->IsUndefined()) {
644 // Do nothing. 645 // Do nothing.
645 } else { 646 } else {
646 DOMUint8Array* uint8ArrayMember = uint8ArrayMemberValue->IsUint8Array() ? V8 Uint8Array::toImpl(v8::Local<v8::Uint8Array>::Cast(uint8ArrayMemberValue)) : 0; 647 NotShared<DOMUint8Array> uint8ArrayMember = ToNotShared<NotShared<DOMUint8Ar ray>>(isolate, uint8ArrayMemberValue, exceptionState);
648 if (exceptionState.HadException())
649 return;
647 if (!uint8ArrayMember) { 650 if (!uint8ArrayMember) {
648 exceptionState.ThrowTypeError("member uint8ArrayMember is not of type Uint 8Array."); 651 exceptionState.ThrowTypeError("member uint8ArrayMember is not of type Uint 8Array.");
649 return; 652 return;
650 } 653 }
651 impl.setUint8ArrayMember(uint8ArrayMember); 654 impl.setUint8ArrayMember(uint8ArrayMember);
652 } 655 }
653 656
654 v8::Local<v8::Value> unionInRecordMemberValue; 657 v8::Local<v8::Value> unionInRecordMemberValue;
655 if (!v8Object->Get(context, keys[36].Get(isolate)).ToLocal(&unionInRecordMembe rValue)) { 658 if (!v8Object->Get(context, keys[36].Get(isolate)).ToLocal(&unionInRecordMembe rValue)) {
656 exceptionState.RethrowV8Exception(block.Exception()); 659 exceptionState.RethrowV8Exception(block.Exception());
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 return true; 1192 return true;
1190 } 1193 }
1191 1194
1192 TestDictionary NativeValueTraits<TestDictionary>::NativeValue(v8::Isolate* isola te, v8::Local<v8::Value> value, ExceptionState& exceptionState) { 1195 TestDictionary NativeValueTraits<TestDictionary>::NativeValue(v8::Isolate* isola te, v8::Local<v8::Value> value, ExceptionState& exceptionState) {
1193 TestDictionary impl; 1196 TestDictionary impl;
1194 V8TestDictionary::toImpl(isolate, value, impl, exceptionState); 1197 V8TestDictionary::toImpl(isolate, value, impl, exceptionState);
1195 return impl; 1198 return impl;
1196 } 1199 }
1197 1200
1198 } // namespace blink 1201 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698