| OLD | NEW |
| 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 "V8TestInterfaceConstructor.h" | 8 #include "V8TestInterfaceConstructor.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/Dictionary.h" | 10 #include "bindings/core/v8/Dictionary.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 { | 37 { |
| 38 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), info.GetIsolate()); | 38 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), info.GetIsolate()); |
| 39 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 39 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 40 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; | 40 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; |
| 41 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(exe
cutionContext, document, exceptionState); | 41 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(exe
cutionContext, document, exceptionState); |
| 42 if (exceptionState.hadException()) { | 42 if (exceptionState.hadException()) { |
| 43 exceptionState.throwIfNeeded(); | 43 exceptionState.throwIfNeeded(); |
| 44 return; | 44 return; |
| 45 } | 45 } |
| 46 v8::Handle<v8::Object> wrapper = info.Holder(); | 46 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 47 impl->associateWithWrapper(&V8TestInterfaceConstructor::wrapperTypeInfo, wra
pper, info.GetIsolate()); | 47 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor::w
rapperTypeInfo, wrapper); |
| 48 v8SetReturnValue(info, wrapper); | 48 v8SetReturnValue(info, wrapper); |
| 49 } | 49 } |
| 50 | 50 |
| 51 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) | 51 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 52 { | 52 { |
| 53 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), info.GetIsolate()); | 53 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), info.GetIsolate()); |
| 54 double doubleArg; | 54 double doubleArg; |
| 55 V8StringResource<> stringArg; | 55 V8StringResource<> stringArg; |
| 56 TestInterfaceEmpty* testInterfaceEmptyArg; | 56 TestInterfaceEmpty* testInterfaceEmptyArg; |
| 57 Dictionary dictionaryArg; | 57 Dictionary dictionaryArg; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 80 optionalTestInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeChec
k(info.GetIsolate(), info[7]); | 80 optionalTestInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeChec
k(info.GetIsolate(), info[7]); |
| 81 } | 81 } |
| 82 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 82 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 83 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; | 83 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; |
| 84 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(exe
cutionContext, document, doubleArg, stringArg, testInterfaceEmptyArg, dictionary
Arg, sequenceStringArg, sequenceDictionaryArg, optionalDictionaryArg, optionalTe
stInterfaceEmptyArg, exceptionState); | 84 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(exe
cutionContext, document, doubleArg, stringArg, testInterfaceEmptyArg, dictionary
Arg, sequenceStringArg, sequenceDictionaryArg, optionalDictionaryArg, optionalTe
stInterfaceEmptyArg, exceptionState); |
| 85 if (exceptionState.hadException()) { | 85 if (exceptionState.hadException()) { |
| 86 exceptionState.throwIfNeeded(); | 86 exceptionState.throwIfNeeded(); |
| 87 return; | 87 return; |
| 88 } | 88 } |
| 89 v8::Handle<v8::Object> wrapper = info.Holder(); | 89 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 90 impl->associateWithWrapper(&V8TestInterfaceConstructor::wrapperTypeInfo, wra
pper, info.GetIsolate()); | 90 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor::w
rapperTypeInfo, wrapper); |
| 91 v8SetReturnValue(info, wrapper); | 91 v8SetReturnValue(info, wrapper); |
| 92 } | 92 } |
| 93 | 93 |
| 94 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info) | 94 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 95 { | 95 { |
| 96 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), info.GetIsolate()); | 96 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), info.GetIsolate()); |
| 97 V8StringResource<> arg; | 97 V8StringResource<> arg; |
| 98 V8StringResource<> optArg; | 98 V8StringResource<> optArg; |
| 99 { | 99 { |
| 100 TOSTRING_VOID_INTERNAL(arg, info[0]); | 100 TOSTRING_VOID_INTERNAL(arg, info[0]); |
| 101 if (UNLIKELY(info.Length() <= 1)) { | 101 if (UNLIKELY(info.Length() <= 1)) { |
| 102 ExecutionContext* executionContext = currentExecutionContext(info.Ge
tIsolate()); | 102 ExecutionContext* executionContext = currentExecutionContext(info.Ge
tIsolate()); |
| 103 Document& document = *toDocument(currentExecutionContext(info.GetIso
late())); | 103 Document& document = *toDocument(currentExecutionContext(info.GetIso
late())); |
| 104 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::cr
eate(executionContext, document, arg, exceptionState); | 104 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::cr
eate(executionContext, document, arg, exceptionState); |
| 105 if (exceptionState.hadException()) { | 105 if (exceptionState.hadException()) { |
| 106 exceptionState.throwIfNeeded(); | 106 exceptionState.throwIfNeeded(); |
| 107 return; | 107 return; |
| 108 } | 108 } |
| 109 v8::Handle<v8::Object> wrapper = info.Holder(); | 109 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 110 impl->associateWithWrapper(&V8TestInterfaceConstructor::wrapperTypeI
nfo, wrapper, info.GetIsolate()); | 110 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstr
uctor::wrapperTypeInfo, wrapper); |
| 111 v8SetReturnValue(info, wrapper); | 111 v8SetReturnValue(info, wrapper); |
| 112 return; | 112 return; |
| 113 } | 113 } |
| 114 TOSTRING_VOID_INTERNAL(optArg, info[1]); | 114 TOSTRING_VOID_INTERNAL(optArg, info[1]); |
| 115 } | 115 } |
| 116 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 116 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 117 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; | 117 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; |
| 118 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(exe
cutionContext, document, arg, optArg, exceptionState); | 118 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(exe
cutionContext, document, arg, optArg, exceptionState); |
| 119 if (exceptionState.hadException()) { | 119 if (exceptionState.hadException()) { |
| 120 exceptionState.throwIfNeeded(); | 120 exceptionState.throwIfNeeded(); |
| 121 return; | 121 return; |
| 122 } | 122 } |
| 123 v8::Handle<v8::Object> wrapper = info.Holder(); | 123 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 124 impl->associateWithWrapper(&V8TestInterfaceConstructor::wrapperTypeInfo, wra
pper, info.GetIsolate()); | 124 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor::w
rapperTypeInfo, wrapper); |
| 125 v8SetReturnValue(info, wrapper); | 125 v8SetReturnValue(info, wrapper); |
| 126 } | 126 } |
| 127 | 127 |
| 128 static void constructor4(const v8::FunctionCallbackInfo<v8::Value>& info) | 128 static void constructor4(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 129 { | 129 { |
| 130 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), info.GetIsolate()); | 130 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), info.GetIsolate()); |
| 131 V8StringResource<> arg; | 131 V8StringResource<> arg; |
| 132 V8StringResource<> arg2; | 132 V8StringResource<> arg2; |
| 133 V8StringResource<> arg3; | 133 V8StringResource<> arg3; |
| 134 { | 134 { |
| 135 TOSTRING_VOID_INTERNAL(arg, info[0]); | 135 TOSTRING_VOID_INTERNAL(arg, info[0]); |
| 136 TOSTRING_VOID_INTERNAL(arg2, info[1]); | 136 TOSTRING_VOID_INTERNAL(arg2, info[1]); |
| 137 TOSTRING_VOID_INTERNAL(arg3, info[2]); | 137 TOSTRING_VOID_INTERNAL(arg3, info[2]); |
| 138 } | 138 } |
| 139 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 139 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 140 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; | 140 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; |
| 141 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(exe
cutionContext, document, arg, arg2, arg3, exceptionState); | 141 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(exe
cutionContext, document, arg, arg2, arg3, exceptionState); |
| 142 if (exceptionState.hadException()) { | 142 if (exceptionState.hadException()) { |
| 143 exceptionState.throwIfNeeded(); | 143 exceptionState.throwIfNeeded(); |
| 144 return; | 144 return; |
| 145 } | 145 } |
| 146 v8::Handle<v8::Object> wrapper = info.Holder(); | 146 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 147 impl->associateWithWrapper(&V8TestInterfaceConstructor::wrapperTypeInfo, wra
pper, info.GetIsolate()); | 147 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructor::w
rapperTypeInfo, wrapper); |
| 148 v8SetReturnValue(info, wrapper); | 148 v8SetReturnValue(info, wrapper); |
| 149 } | 149 } |
| 150 | 150 |
| 151 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 151 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 152 { | 152 { |
| 153 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), info.GetIsolate()); | 153 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), info.GetIsolate()); |
| 154 switch (std::min(8, info.Length())) { | 154 switch (std::min(8, info.Length())) { |
| 155 case 0: | 155 case 0: |
| 156 if (true) { | 156 if (true) { |
| 157 TestInterfaceConstructorV8Internal::constructor1(info); | 157 TestInterfaceConstructorV8Internal::constructor1(info); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 TOSTRING_VOID_INTERNAL(arg, info[0]); | 234 TOSTRING_VOID_INTERNAL(arg, info[0]); |
| 235 if (UNLIKELY(info.Length() <= 1)) { | 235 if (UNLIKELY(info.Length() <= 1)) { |
| 236 ExecutionContext* executionContext = currentExecutionContext(info.Ge
tIsolate()); | 236 ExecutionContext* executionContext = currentExecutionContext(info.Ge
tIsolate()); |
| 237 Document& document = *toDocument(currentExecutionContext(info.GetIso
late())); | 237 Document& document = *toDocument(currentExecutionContext(info.GetIso
late())); |
| 238 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::cr
eateForJSConstructor(executionContext, document, arg, exceptionState); | 238 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::cr
eateForJSConstructor(executionContext, document, arg, exceptionState); |
| 239 if (exceptionState.hadException()) { | 239 if (exceptionState.hadException()) { |
| 240 exceptionState.throwIfNeeded(); | 240 exceptionState.throwIfNeeded(); |
| 241 return; | 241 return; |
| 242 } | 242 } |
| 243 v8::Handle<v8::Object> wrapper = info.Holder(); | 243 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 244 impl->associateWithWrapper(&V8TestInterfaceConstructorConstructor::w
rapperTypeInfo, wrapper, info.GetIsolate()); | 244 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstr
uctorConstructor::wrapperTypeInfo, wrapper); |
| 245 v8SetReturnValue(info, wrapper); | 245 v8SetReturnValue(info, wrapper); |
| 246 return; | 246 return; |
| 247 } | 247 } |
| 248 TOSTRING_VOID_INTERNAL(optArg, info[1]); | 248 TOSTRING_VOID_INTERNAL(optArg, info[1]); |
| 249 } | 249 } |
| 250 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 250 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
| 251 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; | 251 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; |
| 252 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::createForJ
SConstructor(executionContext, document, arg, optArg, exceptionState); | 252 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::createForJ
SConstructor(executionContext, document, arg, optArg, exceptionState); |
| 253 if (exceptionState.hadException()) { | 253 if (exceptionState.hadException()) { |
| 254 exceptionState.throwIfNeeded(); | 254 exceptionState.throwIfNeeded(); |
| 255 return; | 255 return; |
| 256 } | 256 } |
| 257 v8::Handle<v8::Object> wrapper = info.Holder(); | 257 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 258 impl->associateWithWrapper(&V8TestInterfaceConstructorConstructor::wrapperTy
peInfo, wrapper, info.GetIsolate()); | 258 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceConstructorCon
structor::wrapperTypeInfo, wrapper); |
| 259 v8SetReturnValue(info, wrapper); | 259 v8SetReturnValue(info, wrapper); |
| 260 } | 260 } |
| 261 | 261 |
| 262 v8::Handle<v8::FunctionTemplate> V8TestInterfaceConstructorConstructor::domTempl
ate(v8::Isolate* isolate) | 262 v8::Handle<v8::FunctionTemplate> V8TestInterfaceConstructorConstructor::domTempl
ate(v8::Isolate* isolate) |
| 263 { | 263 { |
| 264 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 264 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
| 265 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 265 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
| 266 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl
ateKey); | 266 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl
ateKey); |
| 267 if (!result.IsEmpty()) | 267 if (!result.IsEmpty()) |
| 268 return result; | 268 return result; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 scriptWrappable->toImpl<TestInterfaceConstructor>()->deref(); | 345 scriptWrappable->toImpl<TestInterfaceConstructor>()->deref(); |
| 346 } | 346 } |
| 347 | 347 |
| 348 template<> | 348 template<> |
| 349 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8
::Object> creationContext, v8::Isolate* isolate) | 349 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8
::Object> creationContext, v8::Isolate* isolate) |
| 350 { | 350 { |
| 351 return toV8(impl, creationContext, isolate); | 351 return toV8(impl, creationContext, isolate); |
| 352 } | 352 } |
| 353 | 353 |
| 354 } // namespace blink | 354 } // namespace blink |
| OLD | NEW |