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 "V8TestSpecialOperations.h" | 8 #include "V8TestSpecialOperations.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 { | 52 { |
53 if (UNLIKELY(info.Length() < 1)) { | 53 if (UNLIKELY(info.Length() < 1)) { |
54 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("n
amedItem", "TestSpecialOperations", 1, info.Length(), info.GetIsolate()), info.G
etIsolate()); | 54 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("n
amedItem", "TestSpecialOperations", 1, info.Length(), info.GetIsolate()), info.G
etIsolate()); |
55 return; | 55 return; |
56 } | 56 } |
57 TestSpecialOperations* impl = V8TestSpecialOperations::toNative(info.Holder(
)); | 57 TestSpecialOperations* impl = V8TestSpecialOperations::toNative(info.Holder(
)); |
58 V8StringResource<> name; | 58 V8StringResource<> name; |
59 { | 59 { |
60 TOSTRING_VOID_INTERNAL(name, info[0]); | 60 TOSTRING_VOID_INTERNAL(name, info[0]); |
61 } | 61 } |
62 RefPtrWillBeRawPtr<Node> result0; | 62 RefPtrWillBeRawPtr<Node> result0 = nullptr; |
63 RefPtrWillBeRawPtr<NodeList> result1; | 63 RefPtrWillBeRawPtr<NodeList> result1 = nullptr; |
64 impl->getItem(name, result0, result1); | 64 impl->getItem(name, result0, result1); |
65 if (result0) { | 65 if (result0) { |
66 v8SetReturnValue(info, result0.release()); | 66 v8SetReturnValue(info, result0.release()); |
67 return; | 67 return; |
68 } | 68 } |
69 if (result1) { | 69 if (result1) { |
70 v8SetReturnValue(info, result1.release()); | 70 v8SetReturnValue(info, result1.release()); |
71 return; | 71 return; |
72 } | 72 } |
73 v8SetReturnValueNull(info); | 73 v8SetReturnValueNull(info); |
74 } | 74 } |
75 | 75 |
76 static void namedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 76 static void namedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
77 { | 77 { |
78 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 78 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
79 TestSpecialOperationsV8Internal::namedItemMethod(info); | 79 TestSpecialOperationsV8Internal::namedItemMethod(info); |
80 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 80 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
81 } | 81 } |
82 | 82 |
83 static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCa
llbackInfo<v8::Value>& info) | 83 static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCa
llbackInfo<v8::Value>& info) |
84 { | 84 { |
85 TestSpecialOperations* impl = V8TestSpecialOperations::toNative(info.Holder(
)); | 85 TestSpecialOperations* impl = V8TestSpecialOperations::toNative(info.Holder(
)); |
86 AtomicString propertyName = toCoreAtomicString(name); | 86 AtomicString propertyName = toCoreAtomicString(name); |
87 RefPtrWillBeRawPtr<Node> result0; | 87 RefPtrWillBeRawPtr<Node> result0 = nullptr; |
88 RefPtrWillBeRawPtr<NodeList> result1; | 88 RefPtrWillBeRawPtr<NodeList> result1 = nullptr; |
89 impl->getItem(propertyName, result0, result1); | 89 impl->getItem(propertyName, result0, result1); |
90 if (!(result0 || result1)) | 90 if (!(result0 || result1)) |
91 return; | 91 return; |
92 if (result0) { | 92 if (result0) { |
93 v8SetReturnValue(info, result0.release()); | 93 v8SetReturnValue(info, result0.release()); |
94 return; | 94 return; |
95 } | 95 } |
96 if (result1) { | 96 if (result1) { |
97 v8SetReturnValue(info, result1.release()); | 97 v8SetReturnValue(info, result1.release()); |
98 return; | 98 return; |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 fromInternalPointer(internalPointer)->deref(); | 243 fromInternalPointer(internalPointer)->deref(); |
244 } | 244 } |
245 | 245 |
246 template<> | 246 template<> |
247 v8::Handle<v8::Value> toV8NoInline(TestSpecialOperations* impl, v8::Handle<v8::O
bject> creationContext, v8::Isolate* isolate) | 247 v8::Handle<v8::Value> toV8NoInline(TestSpecialOperations* impl, v8::Handle<v8::O
bject> creationContext, v8::Isolate* isolate) |
248 { | 248 { |
249 return toV8(impl, creationContext, isolate); | 249 return toV8(impl, creationContext, isolate); |
250 } | 250 } |
251 | 251 |
252 } // namespace blink | 252 } // namespace blink |
OLD | NEW |