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

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

Issue 2301993002: binding: Introduces ExceptionToPromiseScope. (Closed)
Patch Set: Addressed review comments (rename, empty line). Created 4 years, 3 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. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #include "V8TestInterfaceNamedConstructor2.h" 7 #include "V8TestInterfaceNamedConstructor2.h"
8 8
9 #include "bindings/core/v8/ExceptionState.h" 9 #include "bindings/core/v8/ExceptionState.h"
10 #include "bindings/core/v8/GeneratedCodeHelper.h" 10 #include "bindings/core/v8/GeneratedCodeHelper.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 { 65 {
66 if (!info.IsConstructCall()) { 66 if (!info.IsConstructCall()) {
67 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c onstructorNotCallableAsFunction("Audio")); 67 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c onstructorNotCallableAsFunction("Audio"));
68 return; 68 return;
69 } 69 }
70 70
71 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis tingObject) { 71 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis tingObject) {
72 v8SetReturnValue(info, info.Holder()); 72 v8SetReturnValue(info, info.Holder());
73 return; 73 return;
74 } 74 }
75
75 if (UNLIKELY(info.Length() < 1)) { 76 if (UNLIKELY(info.Length() < 1)) {
76 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr eateTypeError(info.GetIsolate(), ExceptionMessages::failedToConstruct("TestInter faceNamedConstructor2", ExceptionMessages::notEnoughArguments(1, info.Length())) )); 77 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f ailedToConstruct("TestInterfaceNamedConstructor2", ExceptionMessages::notEnoughA rguments(1, info.Length())));
77 return; 78 return;
78 } 79 }
80
79 V8StringResource<> stringArg; 81 V8StringResource<> stringArg;
80 { 82 stringArg = info[0];
81 stringArg = info[0]; 83 if (!stringArg.prepare())
82 if (!stringArg.prepare()) 84 return;
83 return; 85
84 }
85 TestInterfaceNamedConstructor2* impl = TestInterfaceNamedConstructor2::creat eForJSConstructor(stringArg); 86 TestInterfaceNamedConstructor2* impl = TestInterfaceNamedConstructor2::creat eForJSConstructor(stringArg);
86 v8::Local<v8::Object> wrapper = info.Holder(); 87 v8::Local<v8::Object> wrapper = info.Holder();
87 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceName dConstructor2Constructor::wrapperTypeInfo, wrapper); 88 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceName dConstructor2Constructor::wrapperTypeInfo, wrapper);
88 v8SetReturnValue(info, wrapper); 89 v8SetReturnValue(info, wrapper);
89 } 90 }
90 91
91 v8::Local<v8::FunctionTemplate> V8TestInterfaceNamedConstructor2Constructor::dom Template(v8::Isolate* isolate, const DOMWrapperWorld& world) 92 v8::Local<v8::FunctionTemplate> V8TestInterfaceNamedConstructor2Constructor::dom Template(v8::Isolate* isolate, const DOMWrapperWorld& world)
92 { 93 {
93 static int domTemplateKey; // This address is used for a key to look up the dom template. 94 static int domTemplateKey; // This address is used for a key to look up the dom template.
94 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 95 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 { 133 {
133 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value); 134 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
134 } 135 }
135 136
136 TestInterfaceNamedConstructor2* V8TestInterfaceNamedConstructor2::toImplWithType Check(v8::Isolate* isolate, v8::Local<v8::Value> value) 137 TestInterfaceNamedConstructor2* V8TestInterfaceNamedConstructor2::toImplWithType Check(v8::Isolate* isolate, v8::Local<v8::Value> value)
137 { 138 {
138 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : nullptr; 139 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu e)) : nullptr;
139 } 140 }
140 141
141 } // namespace blink 142 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698