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 "V8TestInterface.h" | 7 #include "V8TestInterface.h" |
8 | 8 |
9 #include "bindings/core/v8/ExceptionState.h" | 9 #include "bindings/core/v8/ExceptionState.h" |
10 #include "bindings/core/v8/PrivateScriptRunner.h" | 10 #include "bindings/core/v8/PrivateScriptRunner.h" |
(...skipping 1858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1869 return v8SetReturnValueBool(info, result == DeleteSuccess); | 1869 return v8SetReturnValueBool(info, result == DeleteSuccess); |
1870 } | 1870 } |
1871 | 1871 |
1872 static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCal
lbackInfo<v8::Boolean>& info) | 1872 static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCal
lbackInfo<v8::Boolean>& info) |
1873 { | 1873 { |
1874 TestInterfaceImplementationV8Internal::indexedPropertyDeleter(index, info); | 1874 TestInterfaceImplementationV8Internal::indexedPropertyDeleter(index, info); |
1875 } | 1875 } |
1876 | 1876 |
1877 static void namedPropertyGetter(v8::Local<v8::Name> name, const v8::PropertyCall
backInfo<v8::Value>& info) | 1877 static void namedPropertyGetter(v8::Local<v8::Name> name, const v8::PropertyCall
backInfo<v8::Value>& info) |
1878 { | 1878 { |
| 1879 if (!name->IsString()) |
| 1880 return; |
1879 auto nameString = name.As<v8::String>(); | 1881 auto nameString = name.As<v8::String>(); |
1880 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1882 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1881 AtomicString propertyName = toCoreAtomicString(nameString); | 1883 AtomicString propertyName = toCoreAtomicString(nameString); |
1882 String result = impl->anonymousNamedGetter(propertyName); | 1884 String result = impl->anonymousNamedGetter(propertyName); |
1883 if (result.isNull()) | 1885 if (result.isNull()) |
1884 return; | 1886 return; |
1885 v8SetReturnValueString(info, result, info.GetIsolate()); | 1887 v8SetReturnValueString(info, result, info.GetIsolate()); |
1886 } | 1888 } |
1887 | 1889 |
1888 static void namedPropertyGetterCallback(v8::Local<v8::Name> name, const v8::Prop
ertyCallbackInfo<v8::Value>& info) | 1890 static void namedPropertyGetterCallback(v8::Local<v8::Name> name, const v8::Prop
ertyCallbackInfo<v8::Value>& info) |
1889 { | 1891 { |
1890 TestInterfaceImplementationV8Internal::namedPropertyGetter(name, info); | 1892 TestInterfaceImplementationV8Internal::namedPropertyGetter(name, info); |
1891 } | 1893 } |
1892 | 1894 |
1893 static void namedPropertySetter(v8::Local<v8::Name> name, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<v8::Value>& info) | 1895 static void namedPropertySetter(v8::Local<v8::Name> name, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<v8::Value>& info) |
1894 { | 1896 { |
| 1897 if (!name->IsString()) |
| 1898 return; |
1895 auto nameString = name.As<v8::String>(); | 1899 auto nameString = name.As<v8::String>(); |
1896 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1900 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1897 V8StringResource<> propertyName(nameString); | 1901 V8StringResource<> propertyName(nameString); |
1898 if (!propertyName.prepare()) | 1902 if (!propertyName.prepare()) |
1899 return; | 1903 return; |
1900 V8StringResource<> propertyValue = v8Value; | 1904 V8StringResource<> propertyValue = v8Value; |
1901 if (!propertyValue.prepare()) | 1905 if (!propertyValue.prepare()) |
1902 return; | 1906 return; |
1903 bool result = impl->anonymousNamedSetter(propertyName, propertyValue); | 1907 bool result = impl->anonymousNamedSetter(propertyName, propertyValue); |
1904 if (!result) | 1908 if (!result) |
1905 return; | 1909 return; |
1906 v8SetReturnValue(info, v8Value); | 1910 v8SetReturnValue(info, v8Value); |
1907 } | 1911 } |
1908 | 1912 |
1909 static void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) | 1913 static void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) |
1910 { | 1914 { |
1911 TestInterfaceImplementationV8Internal::namedPropertySetter(name, v8Value, in
fo); | 1915 TestInterfaceImplementationV8Internal::namedPropertySetter(name, v8Value, in
fo); |
1912 } | 1916 } |
1913 | 1917 |
1914 static void namedPropertyQuery(v8::Local<v8::Name> name, const v8::PropertyCallb
ackInfo<v8::Integer>& info) | 1918 static void namedPropertyQuery(v8::Local<v8::Name> name, const v8::PropertyCallb
ackInfo<v8::Integer>& info) |
1915 { | 1919 { |
| 1920 if (!name->IsString()) |
| 1921 return; |
1916 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1922 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1917 AtomicString propertyName = toCoreAtomicString(name.As<v8::String>()); | 1923 AtomicString propertyName = toCoreAtomicString(name.As<v8::String>()); |
1918 v8::String::Utf8Value namedProperty(name); | 1924 v8::String::Utf8Value namedProperty(name); |
1919 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty,
"TestInterface", info.Holder(), info.GetIsolate()); | 1925 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty,
"TestInterface", info.Holder(), info.GetIsolate()); |
1920 bool result = impl->namedPropertyQuery(propertyName, exceptionState); | 1926 bool result = impl->namedPropertyQuery(propertyName, exceptionState); |
1921 if (exceptionState.throwIfNeeded()) | 1927 if (exceptionState.throwIfNeeded()) |
1922 return; | 1928 return; |
1923 if (!result) | 1929 if (!result) |
1924 return; | 1930 return; |
1925 v8SetReturnValueInt(info, v8::None); | 1931 v8SetReturnValueInt(info, v8::None); |
1926 } | 1932 } |
1927 | 1933 |
1928 static void namedPropertyQueryCallback(v8::Local<v8::Name> name, const v8::Prope
rtyCallbackInfo<v8::Integer>& info) | 1934 static void namedPropertyQueryCallback(v8::Local<v8::Name> name, const v8::Prope
rtyCallbackInfo<v8::Integer>& info) |
1929 { | 1935 { |
1930 TestInterfaceImplementationV8Internal::namedPropertyQuery(name, info); | 1936 TestInterfaceImplementationV8Internal::namedPropertyQuery(name, info); |
1931 } | 1937 } |
1932 | 1938 |
1933 static void namedPropertyDeleter(v8::Local<v8::Name> name, const v8::PropertyCal
lbackInfo<v8::Boolean>& info) | 1939 static void namedPropertyDeleter(v8::Local<v8::Name> name, const v8::PropertyCal
lbackInfo<v8::Boolean>& info) |
1934 { | 1940 { |
| 1941 if (!name->IsString()) |
| 1942 return; |
1935 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1943 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
1936 AtomicString propertyName = toCoreAtomicString(name.As<v8::String>()); | 1944 AtomicString propertyName = toCoreAtomicString(name.As<v8::String>()); |
1937 DeleteResult result = impl->anonymousNamedDeleter(propertyName); | 1945 DeleteResult result = impl->anonymousNamedDeleter(propertyName); |
1938 if (result != DeleteUnknownProperty) | 1946 if (result != DeleteUnknownProperty) |
1939 return v8SetReturnValueBool(info, result == DeleteSuccess); | 1947 return v8SetReturnValueBool(info, result == DeleteSuccess); |
1940 } | 1948 } |
1941 | 1949 |
1942 static void namedPropertyDeleterCallback(v8::Local<v8::Name> name, const v8::Pro
pertyCallbackInfo<v8::Boolean>& info) | 1950 static void namedPropertyDeleterCallback(v8::Local<v8::Name> name, const v8::Pro
pertyCallbackInfo<v8::Boolean>& info) |
1943 { | 1951 { |
1944 TestInterfaceImplementationV8Internal::namedPropertyDeleter(name, info); | 1952 TestInterfaceImplementationV8Internal::namedPropertyDeleter(name, info); |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2361 { | 2369 { |
2362 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt
erface = method; | 2370 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt
erface = method; |
2363 } | 2371 } |
2364 | 2372 |
2365 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(
void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) | 2373 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(
void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) |
2366 { | 2374 { |
2367 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart
ialInterface = method; | 2375 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart
ialInterface = method; |
2368 } | 2376 } |
2369 | 2377 |
2370 } // namespace blink | 2378 } // namespace blink |
OLD | NEW |