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

Side by Side Diff: Source/bindings/tests/results/core/V8TestPermissiveDictionary.cpp

Issue 1051753003: bindings: Add toBoolean() to V8Binding.h (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« no previous file with comments | « Source/bindings/tests/results/core/V8TestObject.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 "config.h" 7 #include "config.h"
8 #include "V8TestPermissiveDictionary.h" 8 #include "V8TestPermissiveDictionary.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 16 matching lines...) Expand all
27 return; 27 return;
28 } 28 }
29 v8::Local<v8::Value> booleanMemberValue = v8Object->Get(v8String(isolate, "b ooleanMember")); 29 v8::Local<v8::Value> booleanMemberValue = v8Object->Get(v8String(isolate, "b ooleanMember"));
30 if (block.HasCaught()) { 30 if (block.HasCaught()) {
31 exceptionState.rethrowV8Exception(block.Exception()); 31 exceptionState.rethrowV8Exception(block.Exception());
32 return; 32 return;
33 } 33 }
34 if (booleanMemberValue.IsEmpty() || booleanMemberValue->IsUndefined()) { 34 if (booleanMemberValue.IsEmpty() || booleanMemberValue->IsUndefined()) {
35 // Do nothing. 35 // Do nothing.
36 } else { 36 } else {
37 bool booleanMember = booleanMemberValue->BooleanValue(); 37 bool booleanMember = toBoolean(isolate, booleanMemberValue, exceptionSta te);
38 if (exceptionState.hadException())
39 return;
38 impl.setBooleanMember(booleanMember); 40 impl.setBooleanMember(booleanMember);
39 } 41 }
40 42
41 } 43 }
42 44
43 v8::Local<v8::Value> toV8(const TestPermissiveDictionary& impl, v8::Local<v8::Ob ject> creationContext, v8::Isolate* isolate) 45 v8::Local<v8::Value> toV8(const TestPermissiveDictionary& impl, v8::Local<v8::Ob ject> creationContext, v8::Isolate* isolate)
44 { 46 {
45 v8::Local<v8::Object> v8Object = v8::Object::New(isolate); 47 v8::Local<v8::Object> v8Object = v8::Object::New(isolate);
46 toV8TestPermissiveDictionary(impl, v8Object, creationContext, isolate); 48 toV8TestPermissiveDictionary(impl, v8Object, creationContext, isolate);
47 return v8Object; 49 return v8Object;
48 } 50 }
49 51
50 void toV8TestPermissiveDictionary(const TestPermissiveDictionary& impl, v8::Loca l<v8::Object> dictionary, v8::Local<v8::Object> creationContext, v8::Isolate* is olate) 52 void toV8TestPermissiveDictionary(const TestPermissiveDictionary& impl, v8::Loca l<v8::Object> dictionary, v8::Local<v8::Object> creationContext, v8::Isolate* is olate)
51 { 53 {
52 if (impl.hasBooleanMember()) { 54 if (impl.hasBooleanMember()) {
53 dictionary->Set(v8String(isolate, "booleanMember"), v8Boolean(impl.boole anMember(), isolate)); 55 dictionary->Set(v8String(isolate, "booleanMember"), v8Boolean(impl.boole anMember(), isolate));
54 } 56 }
55 57
56 } 58 }
57 59
58 TestPermissiveDictionary NativeValueTraits<TestPermissiveDictionary>::nativeValu e(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionSta te) 60 TestPermissiveDictionary NativeValueTraits<TestPermissiveDictionary>::nativeValu e(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionSta te)
59 { 61 {
60 TestPermissiveDictionary impl; 62 TestPermissiveDictionary impl;
61 V8TestPermissiveDictionary::toImpl(isolate, value, impl, exceptionState); 63 V8TestPermissiveDictionary::toImpl(isolate, value, impl, exceptionState);
62 return impl; 64 return impl;
63 } 65 }
64 66
65 } // namespace blink 67 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/core/V8TestObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698