| OLD | NEW |
| 1 /* | 1 /* |
| 2 This file is part of the Blink open source project. | 2 This file is part of the Blink open source project. |
| 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! | 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! |
| 4 | 4 |
| 5 This library is free software; you can redistribute it and/or | 5 This library is free software; you can redistribute it and/or |
| 6 modify it under the terms of the GNU Library General Public | 6 modify it under the terms of the GNU Library General Public |
| 7 License as published by the Free Software Foundation; either | 7 License as published by the Free Software Foundation; either |
| 8 version 2 of the License, or (at your option) any later version. | 8 version 2 of the License, or (at your option) any later version. |
| 9 | 9 |
| 10 This library is distributed in the hope that it will be useful, | 10 This library is distributed in the hope that it will be useful, |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 // In ScriptWrappable::init, the use of a local function declaration has an issu
e on Windows: | 50 // In ScriptWrappable::init, the use of a local function declaration has an issu
e on Windows: |
| 51 // the local declaration does not pick up the surrounding namespace. Therefore,
we provide this function | 51 // the local declaration does not pick up the surrounding namespace. Therefore,
we provide this function |
| 52 // in the global namespace. | 52 // in the global namespace. |
| 53 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/fe
edback/details/664619/the-namespace-of-local-function-declarations-in-c) | 53 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/fe
edback/details/664619/the-namespace-of-local-function-declarations-in-c) |
| 54 void webCoreInitializeScriptWrappableForInterface(WebCore::TestNamedConstructor*
object) | 54 void webCoreInitializeScriptWrappableForInterface(WebCore::TestNamedConstructor*
object) |
| 55 { | 55 { |
| 56 WebCore::initializeScriptWrappableForInterface(object); | 56 WebCore::initializeScriptWrappableForInterface(object); |
| 57 } | 57 } |
| 58 | 58 |
| 59 namespace WebCore { | 59 namespace WebCore { |
| 60 WrapperTypeInfo V8TestNamedConstructor::info = { V8TestNamedConstructor::GetTemp
late, V8TestNamedConstructor::derefObject, V8TestNamedConstructor::toActiveDOMOb
ject, 0, 0, V8TestNamedConstructor::installPerContextPrototypeProperties, 0, Wra
pperTypeObjectPrototype }; | 60 WrapperTypeInfo V8TestNamedConstructor::info = { V8TestNamedConstructor::GetTemp
late, V8TestNamedConstructor::derefObject, V8TestNamedConstructor::toActiveDOMOb
ject, 0, 0, V8TestNamedConstructor::installPerContextEnabledPrototypeProperties,
0, WrapperTypeObjectPrototype }; |
| 61 | 61 |
| 62 namespace TestNamedConstructorV8Internal { | 62 namespace TestNamedConstructorV8Internal { |
| 63 | 63 |
| 64 template <typename T> void V8_USE(T) { } | 64 template <typename T> void V8_USE(T) { } |
| 65 | 65 |
| 66 } // namespace TestNamedConstructorV8Internal | 66 } // namespace TestNamedConstructorV8Internal |
| 67 | 67 |
| 68 WrapperTypeInfo V8TestNamedConstructorConstructor::info = { V8TestNamedConstruct
orConstructor::GetTemplate, V8TestNamedConstructor::derefObject, V8TestNamedCons
tructor::toActiveDOMObject, 0, 0, V8TestNamedConstructor::installPerContextProto
typeProperties, 0, WrapperTypeObjectPrototype }; | 68 WrapperTypeInfo V8TestNamedConstructorConstructor::info = { V8TestNamedConstruct
orConstructor::GetTemplate, V8TestNamedConstructor::derefObject, V8TestNamedCons
tructor::toActiveDOMObject, 0, 0, V8TestNamedConstructor::installPerContextEnabl
edPrototypeProperties, 0, WrapperTypeObjectPrototype }; |
| 69 | 69 |
| 70 static void V8TestNamedConstructorConstructorCallback(const v8::FunctionCallback
Info<v8::Value>& args) | 70 static void V8TestNamedConstructorConstructorCallback(const v8::FunctionCallback
Info<v8::Value>& args) |
| 71 { | 71 { |
| 72 if (!args.IsConstructCall()) { | 72 if (!args.IsConstructCall()) { |
| 73 throwTypeError(ExceptionMessages::failedToConstruct("TestNamedConstructo
r", "Please use the 'new' operator, this DOM object constructor cannot be called
as a function."), args.GetIsolate()); | 73 throwTypeError(ExceptionMessages::failedToConstruct("TestNamedConstructo
r", "Please use the 'new' operator, this DOM object constructor cannot be called
as a function."), args.GetIsolate()); |
| 74 return; | 74 return; |
| 75 } | 75 } |
| 76 | 76 |
| 77 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { | 77 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { |
| 78 args.GetReturnValue().Set(args.Holder()); | 78 args.GetReturnValue().Set(args.Holder()); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje
ct(impl.get()); | 181 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje
ct(impl.get()); |
| 182 // Might be a XXXConstructor::info instead of an XXX::info. These will b
oth have | 182 // Might be a XXXConstructor::info instead of an XXX::info. These will b
oth have |
| 183 // the same object de-ref functions, though, so use that as the basis of
the check. | 183 // the same object de-ref functions, though, so use that as the basis of
the check. |
| 184 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== info.derefObjectFunction); | 184 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== info.derefObjectFunction); |
| 185 } | 185 } |
| 186 | 186 |
| 187 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &info, toInternalPointer(impl.get()), isolate); | 187 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &info, toInternalPointer(impl.get()), isolate); |
| 188 if (UNLIKELY(wrapper.IsEmpty())) | 188 if (UNLIKELY(wrapper.IsEmpty())) |
| 189 return wrapper; | 189 return wrapper; |
| 190 | 190 |
| 191 installPerContextProperties(wrapper, impl.get(), isolate); | 191 installPerContextEnabledProperties(wrapper, impl.get(), isolate); |
| 192 V8DOMWrapper::associateObjectWithWrapper<V8TestNamedConstructor>(impl, &info
, wrapper, isolate, WrapperConfiguration::Dependent); | 192 V8DOMWrapper::associateObjectWithWrapper<V8TestNamedConstructor>(impl, &info
, wrapper, isolate, WrapperConfiguration::Dependent); |
| 193 return wrapper; | 193 return wrapper; |
| 194 } | 194 } |
| 195 | 195 |
| 196 void V8TestNamedConstructor::derefObject(void* object) | 196 void V8TestNamedConstructor::derefObject(void* object) |
| 197 { | 197 { |
| 198 fromInternalPointer(object)->deref(); | 198 fromInternalPointer(object)->deref(); |
| 199 } | 199 } |
| 200 | 200 |
| 201 } // namespace WebCore | 201 } // namespace WebCore |
| OLD | NEW |