| 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 bool result0Enabled = false; | |
| 63 RefPtrWillBeRawPtr<Node> result0; | 62 RefPtrWillBeRawPtr<Node> result0; |
| 64 bool result1Enabled = false; | |
| 65 RefPtrWillBeRawPtr<NodeList> result1; | 63 RefPtrWillBeRawPtr<NodeList> result1; |
| 66 impl->getItem(name, result0Enabled, result0, result1Enabled, result1); | 64 impl->getItem(name, result0, result1); |
| 67 if (result0Enabled) { | 65 if (result0) { |
| 68 v8SetReturnValue(info, result0.release()); | 66 v8SetReturnValue(info, result0.release()); |
| 69 return; | 67 return; |
| 70 } | 68 } |
| 71 if (result1Enabled) { | 69 if (result1) { |
| 72 v8SetReturnValue(info, result1.release()); | 70 v8SetReturnValue(info, result1.release()); |
| 73 return; | 71 return; |
| 74 } | 72 } |
| 75 v8SetReturnValueNull(info); | 73 v8SetReturnValueNull(info); |
| 76 } | 74 } |
| 77 | 75 |
| 78 static void namedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 76 static void namedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 79 { | 77 { |
| 80 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 78 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 81 TestSpecialOperationsV8Internal::namedItemMethod(info); | 79 TestSpecialOperationsV8Internal::namedItemMethod(info); |
| 82 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 80 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 83 } | 81 } |
| 84 | 82 |
| 85 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) |
| 86 { | 84 { |
| 87 TestSpecialOperations* impl = V8TestSpecialOperations::toNative(info.Holder(
)); | 85 TestSpecialOperations* impl = V8TestSpecialOperations::toNative(info.Holder(
)); |
| 88 AtomicString propertyName = toCoreAtomicString(name); | 86 AtomicString propertyName = toCoreAtomicString(name); |
| 89 bool result0Enabled = false; | |
| 90 RefPtrWillBeRawPtr<Node> result0; | 87 RefPtrWillBeRawPtr<Node> result0; |
| 91 bool result1Enabled = false; | |
| 92 RefPtrWillBeRawPtr<NodeList> result1; | 88 RefPtrWillBeRawPtr<NodeList> result1; |
| 93 impl->getItem(propertyName, result0Enabled, result0, result1Enabled, result1
); | 89 impl->getItem(propertyName, result0, result1); |
| 94 if (!result0Enabled && !result1Enabled) | 90 if (!(result0 || result1)) |
| 95 return; | 91 return; |
| 96 if (result0Enabled) { | 92 if (result0) { |
| 97 v8SetReturnValueFast(info, WTF::getPtr(result0.release()), impl); | 93 v8SetReturnValue(info, result0.release()); |
| 98 return; | 94 return; |
| 99 } | 95 } |
| 100 if (result1Enabled) { | 96 if (result1) { |
| 101 v8SetReturnValueFast(info, WTF::getPtr(result1.release()), impl); | 97 v8SetReturnValue(info, result1.release()); |
| 102 return; | 98 return; |
| 103 } | 99 } |
| 104 v8SetReturnValueNull(info); | 100 ASSERT_NOT_REACHED(); |
| 105 } | 101 } |
| 106 | 102 |
| 107 static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 103 static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
| 108 { | 104 { |
| 109 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty"); | 105 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty"); |
| 110 TestSpecialOperationsV8Internal::namedPropertyGetter(name, info); | 106 TestSpecialOperationsV8Internal::namedPropertyGetter(name, info); |
| 111 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 107 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 112 } | 108 } |
| 113 | 109 |
| 114 static void namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) | 110 static void namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value>
v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 fromInternalPointer(internalPointer)->deref(); | 243 fromInternalPointer(internalPointer)->deref(); |
| 248 } | 244 } |
| 249 | 245 |
| 250 template<> | 246 template<> |
| 251 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) |
| 252 { | 248 { |
| 253 return toV8(impl, creationContext, isolate); | 249 return toV8(impl, creationContext, isolate); |
| 254 } | 250 } |
| 255 | 251 |
| 256 } // namespace blink | 252 } // namespace blink |
| OLD | NEW |