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

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

Issue 1994823002: Add !IsArray() check for dictionary conversion in union types (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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/bindings/templates/union_container.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #include "LongOrTestDictionary.h" 7 #include "LongOrTestDictionary.h"
8 8
9 #include "bindings/core/v8/DoubleOrString.h" 9 #include "bindings/core/v8/DoubleOrString.h"
10 #include "bindings/core/v8/TestInterface2OrUint8Array.h" 10 #include "bindings/core/v8/TestInterface2OrUint8Array.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 } 67 }
68 68
69 void V8LongOrTestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v 8Value, LongOrTestDictionary& impl, UnionTypeConversionMode conversionMode, Exce ptionState& exceptionState) 69 void V8LongOrTestDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v 8Value, LongOrTestDictionary& impl, UnionTypeConversionMode conversionMode, Exce ptionState& exceptionState)
70 { 70 {
71 if (v8Value.IsEmpty()) 71 if (v8Value.IsEmpty())
72 return; 72 return;
73 73
74 if (conversionMode == UnionTypeConversionMode::Nullable && isUndefinedOrNull (v8Value)) 74 if (conversionMode == UnionTypeConversionMode::Nullable && isUndefinedOrNull (v8Value))
75 return; 75 return;
76 76
77 if (isUndefinedOrNull(v8Value) || v8Value->IsObject()) { 77 if (isUndefinedOrNull(v8Value) || (v8Value->IsObject() && !v8Value->IsArray( ))) {
78 TestDictionary cppValue; 78 TestDictionary cppValue;
79 V8TestDictionary::toImpl(isolate, v8Value, cppValue, exceptionState); 79 V8TestDictionary::toImpl(isolate, v8Value, cppValue, exceptionState);
80 if (exceptionState.hadException()) 80 if (exceptionState.hadException())
81 return; 81 return;
82 impl.setTestDictionary(cppValue); 82 impl.setTestDictionary(cppValue);
83 return; 83 return;
84 } 84 }
85 85
86 if (v8Value->IsNumber()) { 86 if (v8Value->IsNumber()) {
87 int cppValue = toInt32(isolate, v8Value, NormalConversion, exceptionStat e); 87 int cppValue = toInt32(isolate, v8Value, NormalConversion, exceptionStat e);
(...skipping 29 matching lines...) Expand all
117 } 117 }
118 118
119 LongOrTestDictionary NativeValueTraits<LongOrTestDictionary>::nativeValue(v8::Is olate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) 119 LongOrTestDictionary NativeValueTraits<LongOrTestDictionary>::nativeValue(v8::Is olate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState)
120 { 120 {
121 LongOrTestDictionary impl; 121 LongOrTestDictionary impl;
122 V8LongOrTestDictionary::toImpl(isolate, value, impl, UnionTypeConversionMode ::NotNullable, exceptionState); 122 V8LongOrTestDictionary::toImpl(isolate, value, impl, UnionTypeConversionMode ::NotNullable, exceptionState);
123 return impl; 123 return impl;
124 } 124 }
125 125
126 } // namespace blink 126 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/templates/union_container.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698