| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! | 31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! |
| 32 | 32 |
| 33 #include "config.h" | 33 #include "config.h" |
| 34 #include "V8TestInterfaceConstructor.h" | 34 #include "V8TestInterfaceConstructor2.h" |
| 35 | 35 |
| 36 #include "RuntimeEnabledFeatures.h" | 36 #include "RuntimeEnabledFeatures.h" |
| 37 #include "V8TestInterfaceEmpty.h" | 37 #include "V8TestInterfaceEmpty.h" |
| 38 #include "bindings/v8/Dictionary.h" | |
| 39 #include "bindings/v8/ExceptionMessages.h" | 38 #include "bindings/v8/ExceptionMessages.h" |
| 40 #include "bindings/v8/V8DOMConfiguration.h" | 39 #include "bindings/v8/V8DOMConfiguration.h" |
| 41 #include "bindings/v8/V8ObjectConstructor.h" | 40 #include "bindings/v8/V8ObjectConstructor.h" |
| 42 #include "core/dom/ContextFeatures.h" | 41 #include "core/dom/ContextFeatures.h" |
| 43 #include "core/dom/Document.h" | 42 #include "core/dom/Document.h" |
| 44 #include "core/frame/UseCounter.h" | |
| 45 #include "platform/TraceEvent.h" | 43 #include "platform/TraceEvent.h" |
| 46 | 44 |
| 47 namespace WebCore { | 45 namespace WebCore { |
| 48 | 46 |
| 49 static void initializeScriptWrappableForInterface(TestInterfaceConstructor* obje
ct) | 47 static void initializeScriptWrappableForInterface(TestInterfaceConstructor2* obj
ect) |
| 50 { | 48 { |
| 51 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) | 49 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) |
| 52 ScriptWrappable::setTypeInfoInObject(object, &V8TestInterfaceConstructor
::wrapperTypeInfo); | 50 ScriptWrappable::setTypeInfoInObject(object, &V8TestInterfaceConstructor
2::wrapperTypeInfo); |
| 53 else | 51 else |
| 54 ASSERT_NOT_REACHED(); | 52 ASSERT_NOT_REACHED(); |
| 55 } | 53 } |
| 56 | 54 |
| 57 } // namespace WebCore | 55 } // namespace WebCore |
| 58 | 56 |
| 59 // In ScriptWrappable::init, the use of a local function declaration has an issu
e on Windows: | 57 // In ScriptWrappable::init, the use of a local function declaration has an issu
e on Windows: |
| 60 // the local declaration does not pick up the surrounding namespace. Therefore,
we provide this function | 58 // the local declaration does not pick up the surrounding namespace. Therefore,
we provide this function |
| 61 // in the global namespace. | 59 // in the global namespace. |
| 62 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/fe
edback/details/664619/the-namespace-of-local-function-declarations-in-c) | 60 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/fe
edback/details/664619/the-namespace-of-local-function-declarations-in-c) |
| 63 void webCoreInitializeScriptWrappableForInterface(WebCore::TestInterfaceConstruc
tor* object) | 61 void webCoreInitializeScriptWrappableForInterface(WebCore::TestInterfaceConstruc
tor2* object) |
| 64 { | 62 { |
| 65 WebCore::initializeScriptWrappableForInterface(object); | 63 WebCore::initializeScriptWrappableForInterface(object); |
| 66 } | 64 } |
| 67 | 65 |
| 68 namespace WebCore { | 66 namespace WebCore { |
| 69 const WrapperTypeInfo V8TestInterfaceConstructor::wrapperTypeInfo = { gin::kEmbe
dderBlink, V8TestInterfaceConstructor::domTemplate, V8TestInterfaceConstructor::
derefObject, 0, 0, 0, V8TestInterfaceConstructor::installPerContextEnabledMethod
s, 0, WrapperTypeObjectPrototype }; | 67 const WrapperTypeInfo V8TestInterfaceConstructor2::wrapperTypeInfo = { gin::kEmb
edderBlink, V8TestInterfaceConstructor2::domTemplate, V8TestInterfaceConstructor
2::derefObject, 0, 0, 0, V8TestInterfaceConstructor2::installPerContextEnabledMe
thods, 0, WrapperTypeObjectPrototype }; |
| 70 | 68 |
| 71 namespace TestInterfaceConstructorV8Internal { | 69 namespace TestInterfaceConstructor2V8Internal { |
| 72 | 70 |
| 73 template <typename T> void V8_USE(T) { } | 71 template <typename T> void V8_USE(T) { } |
| 74 | 72 |
| 75 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 73 static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 76 { | 74 { |
| 77 if (UNLIKELY(info.Length() < 5)) { | 75 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, stringArg, info[0])
; |
| 78 throwTypeError(ExceptionMessages::failedToExecute("Constructor", "TestIn
terfaceConstructor", ExceptionMessages::notEnoughArguments(5, info.Length())), i
nfo.GetIsolate()); | 76 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(s
tringArg); |
| 79 return; | |
| 80 } | |
| 81 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor", info.Holder(), info.GetIsolate()); | |
| 82 V8TRYCATCH_VOID(double, doubleArg, static_cast<double>(info[0]->NumberValue(
))); | |
| 83 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, stringArg, info[1])
; | |
| 84 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE
mpty::hasInstance(info[2], info.GetIsolate(), worldType(info.GetIsolate())) ? V8
TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[2])) : 0); | |
| 85 V8TRYCATCH_VOID(Dictionary, dictionaryArg, Dictionary(info[3], info.GetIsola
te())); | |
| 86 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) { | |
| 87 throwTypeError(ExceptionMessages::failedToConstruct("TestInterfaceConstr
uctor", "parameter 4 ('dictionaryArg') is not an object."), info.GetIsolate()); | |
| 88 return; | |
| 89 } | |
| 90 V8TRYCATCH_VOID(Vector<String>, sequenceStringArg, toNativeArray<String>(inf
o[4], 5, info.GetIsolate())); | |
| 91 V8TRYCATCH_VOID(Dictionary, optionalDictionaryArg, Dictionary(info[5], info.
GetIsolate())); | |
| 92 if (!optionalDictionaryArg.isUndefinedOrNull() && !optionalDictionaryArg.isO
bject()) { | |
| 93 throwTypeError(ExceptionMessages::failedToConstruct("TestInterfaceConstr
uctor", "parameter 6 ('optionalDictionaryArg') is not an object."), info.GetIsol
ate()); | |
| 94 return; | |
| 95 } | |
| 96 ExecutionContext* context = getExecutionContext(); | |
| 97 Document& document = *toDocument(getExecutionContext()); | |
| 98 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(con
text, document, doubleArg, stringArg, testInterfaceEmptyArg, dictionaryArg, sequ
enceStringArg, optionalDictionaryArg, exceptionState); | |
| 99 v8::Handle<v8::Object> wrapper = info.Holder(); | 77 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 100 if (exceptionState.throwIfNeeded()) | |
| 101 return; | |
| 102 | 78 |
| 103 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl.re
lease(), &V8TestInterfaceConstructor::wrapperTypeInfo, wrapper, info.GetIsolate(
), WrapperConfiguration::Dependent); | 79 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r
elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, info.GetIsolat
e(), WrapperConfiguration::Dependent); |
| 104 v8SetReturnValue(info, wrapper); | 80 v8SetReturnValue(info, wrapper); |
| 105 } | 81 } |
| 106 | 82 |
| 107 } // namespace TestInterfaceConstructorV8Internal | 83 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 84 { |
| 85 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE
mpty::hasInstance(info[0], info.GetIsolate(), worldType(info.GetIsolate())) ? V8
TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[0])) : 0); |
| 86 RefPtr<TestInterfaceConstructor2> impl = TestInterfaceConstructor2::create(t
estInterfaceEmptyArg); |
| 87 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 108 | 88 |
| 109 void V8TestInterfaceConstructor::constructorCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 89 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl.r
elease(), &V8TestInterfaceConstructor2::wrapperTypeInfo, wrapper, info.GetIsolat
e(), WrapperConfiguration::Dependent); |
| 90 v8SetReturnValue(info, wrapper); |
| 91 } |
| 92 |
| 93 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 94 { |
| 95 if (((info.Length() == 1))) { |
| 96 TestInterfaceConstructor2V8Internal::constructor1(info); |
| 97 return; |
| 98 } |
| 99 if (((info.Length() == 1) && (V8TestInterfaceEmpty::hasInstance(info[0], inf
o.GetIsolate(), worldType(info.GetIsolate()))))) { |
| 100 TestInterfaceConstructor2V8Internal::constructor2(info); |
| 101 return; |
| 102 } |
| 103 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); |
| 104 if (UNLIKELY(info.Length() < 1)) { |
| 105 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 106 exceptionState.throwIfNeeded(); |
| 107 return; |
| 108 } |
| 109 exceptionState.throwTypeError("No matching constructor signature."); |
| 110 exceptionState.throwIfNeeded(); |
| 111 } |
| 112 |
| 113 } // namespace TestInterfaceConstructor2V8Internal |
| 114 |
| 115 void V8TestInterfaceConstructor2::constructorCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
| 110 { | 116 { |
| 111 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor"); | 117 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor"); |
| 112 UseCounter::count(activeDOMWindow(), UseCounter::TestFeature); | |
| 113 if (!info.IsConstructCall()) { | 118 if (!info.IsConstructCall()) { |
| 114 throwTypeError(ExceptionMessages::failedToConstruct("TestInterfaceConstr
uctor", "Please use the 'new' operator, this DOM object constructor cannot be ca
lled as a function."), info.GetIsolate()); | 119 throwTypeError(ExceptionMessages::failedToConstruct("TestInterfaceConstr
uctor2", "Please use the 'new' operator, this DOM object constructor cannot be c
alled as a function."), info.GetIsolate()); |
| 115 return; | 120 return; |
| 116 } | 121 } |
| 117 | 122 |
| 118 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { | 123 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { |
| 119 v8SetReturnValue(info, info.Holder()); | 124 v8SetReturnValue(info, info.Holder()); |
| 120 return; | 125 return; |
| 121 } | 126 } |
| 122 | 127 |
| 123 TestInterfaceConstructorV8Internal::constructor(info); | 128 TestInterfaceConstructor2V8Internal::constructor(info); |
| 124 } | 129 } |
| 125 | 130 |
| 126 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestInterfaceConstructorTempl
ate(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, Wra
pperWorldType currentWorldType) | 131 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestInterfaceConstructor2Temp
late(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate, Wr
apperWorldType currentWorldType) |
| 127 { | 132 { |
| 128 functionTemplate->ReadOnlyPrototype(); | 133 functionTemplate->ReadOnlyPrototype(); |
| 129 | 134 |
| 130 v8::Local<v8::Signature> defaultSignature; | 135 v8::Local<v8::Signature> defaultSignature; |
| 131 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl
ate, "TestInterfaceConstructor", v8::Local<v8::FunctionTemplate>(), V8TestInterf
aceConstructor::internalFieldCount, | 136 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl
ate, "TestInterfaceConstructor2", v8::Local<v8::FunctionTemplate>(), V8TestInter
faceConstructor2::internalFieldCount, |
| 132 0, 0, | 137 0, 0, |
| 133 0, 0, | 138 0, 0, |
| 134 0, 0, | 139 0, 0, |
| 135 isolate, currentWorldType); | 140 isolate, currentWorldType); |
| 136 functionTemplate->SetCallHandler(V8TestInterfaceConstructor::constructorCall
back); | 141 functionTemplate->SetCallHandler(V8TestInterfaceConstructor2::constructorCal
lback); |
| 137 functionTemplate->SetLength(5); | 142 functionTemplate->SetLength(1); |
| 138 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTempla
te->InstanceTemplate(); | 143 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTempla
te->InstanceTemplate(); |
| 139 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTempl
ate->PrototypeTemplate(); | 144 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTempl
ate->PrototypeTemplate(); |
| 140 | 145 |
| 141 // Custom toString template | 146 // Custom toString template |
| 142 functionTemplate->Set(v8::String::NewFromUtf8(isolate, "toString", v8::Strin
g::kInternalizedString), V8PerIsolateData::current()->toStringTemplate()); | 147 functionTemplate->Set(v8::String::NewFromUtf8(isolate, "toString", v8::Strin
g::kInternalizedString), V8PerIsolateData::current()->toStringTemplate()); |
| 143 return functionTemplate; | 148 return functionTemplate; |
| 144 } | 149 } |
| 145 | 150 |
| 146 v8::Handle<v8::FunctionTemplate> V8TestInterfaceConstructor::domTemplate(v8::Iso
late* isolate, WrapperWorldType currentWorldType) | 151 v8::Handle<v8::FunctionTemplate> V8TestInterfaceConstructor2::domTemplate(v8::Is
olate* isolate, WrapperWorldType currentWorldType) |
| 147 { | 152 { |
| 148 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 153 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
| 149 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo
rldType).find(&wrapperTypeInfo); | 154 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo
rldType).find(&wrapperTypeInfo); |
| 150 if (result != data->templateMap(currentWorldType).end()) | 155 if (result != data->templateMap(currentWorldType).end()) |
| 151 return result->value.newLocal(isolate); | 156 return result->value.newLocal(isolate); |
| 152 | 157 |
| 153 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); | 158 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); |
| 154 v8::EscapableHandleScope handleScope(isolate); | 159 v8::EscapableHandleScope handleScope(isolate); |
| 155 v8::Local<v8::FunctionTemplate> templ = | 160 v8::Local<v8::FunctionTemplate> templ = |
| 156 ConfigureV8TestInterfaceConstructorTemplate(data->rawDOMTemplate(&wrappe
rTypeInfo, currentWorldType), isolate, currentWorldType); | 161 ConfigureV8TestInterfaceConstructor2Template(data->rawDOMTemplate(&wrapp
erTypeInfo, currentWorldType), isolate, currentWorldType); |
| 157 data->templateMap(currentWorldType).add(&wrapperTypeInfo, UnsafePersistent<v
8::FunctionTemplate>(isolate, templ)); | 162 data->templateMap(currentWorldType).add(&wrapperTypeInfo, UnsafePersistent<v
8::FunctionTemplate>(isolate, templ)); |
| 158 return handleScope.Escape(templ); | 163 return handleScope.Escape(templ); |
| 159 } | 164 } |
| 160 | 165 |
| 161 bool V8TestInterfaceConstructor::hasInstance(v8::Handle<v8::Value> jsValue, v8::
Isolate* isolate, WrapperWorldType currentWorldType) | 166 bool V8TestInterfaceConstructor2::hasInstance(v8::Handle<v8::Value> jsValue, v8:
:Isolate* isolate, WrapperWorldType currentWorldType) |
| 162 { | 167 { |
| 163 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e, currentWorldType); | 168 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e, currentWorldType); |
| 164 } | 169 } |
| 165 | 170 |
| 166 bool V8TestInterfaceConstructor::hasInstanceInAnyWorld(v8::Handle<v8::Value> jsV
alue, v8::Isolate* isolate) | 171 bool V8TestInterfaceConstructor2::hasInstanceInAnyWorld(v8::Handle<v8::Value> js
Value, v8::Isolate* isolate) |
| 167 { | 172 { |
| 168 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e, MainWorld) | 173 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e, MainWorld) |
| 169 || V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e, IsolatedWorld) | 174 || V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e, IsolatedWorld) |
| 170 || V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e, WorkerWorld); | 175 || V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e, WorkerWorld); |
| 171 } | 176 } |
| 172 | 177 |
| 173 v8::Handle<v8::Object> V8TestInterfaceConstructor::createWrapper(PassRefPtr<Test
InterfaceConstructor> impl, v8::Handle<v8::Object> creationContext, v8::Isolate*
isolate) | 178 v8::Handle<v8::Object> V8TestInterfaceConstructor2::createWrapper(PassRefPtr<Tes
tInterfaceConstructor2> impl, v8::Handle<v8::Object> creationContext, v8::Isolat
e* isolate) |
| 174 { | 179 { |
| 175 ASSERT(impl); | 180 ASSERT(impl); |
| 176 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceConstructor>(impl.get()
, isolate)); | 181 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceConstructor2>(impl.get(
), isolate)); |
| 177 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { | 182 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { |
| 178 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje
ct(impl.get()); | 183 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje
ct(impl.get()); |
| 179 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have | 184 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have |
| 180 // the same object de-ref functions, though, so use that as the basis of
the check. | 185 // the same object de-ref functions, though, so use that as the basis of
the check. |
| 181 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== wrapperTypeInfo.derefObjectFunction); | 186 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== wrapperTypeInfo.derefObjectFunction); |
| 182 } | 187 } |
| 183 | 188 |
| 184 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); | 189 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); |
| 185 if (UNLIKELY(wrapper.IsEmpty())) | 190 if (UNLIKELY(wrapper.IsEmpty())) |
| 186 return wrapper; | 191 return wrapper; |
| 187 | 192 |
| 188 installPerContextEnabledProperties(wrapper, impl.get(), isolate); | 193 installPerContextEnabledProperties(wrapper, impl.get(), isolate); |
| 189 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl, &
wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent); | 194 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor2>(impl,
&wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent); |
| 190 return wrapper; | 195 return wrapper; |
| 191 } | 196 } |
| 192 | 197 |
| 193 void V8TestInterfaceConstructor::derefObject(void* object) | 198 void V8TestInterfaceConstructor2::derefObject(void* object) |
| 194 { | 199 { |
| 195 fromInternalPointer(object)->deref(); | 200 fromInternalPointer(object)->deref(); |
| 196 } | 201 } |
| 197 | 202 |
| 198 template<> | 203 template<> |
| 199 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8
::Object> creationContext, v8::Isolate* isolate) | 204 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) |
| 200 { | 205 { |
| 201 return toV8(impl, creationContext, isolate); | 206 return toV8(impl, creationContext, isolate); |
| 202 } | 207 } |
| 203 | 208 |
| 204 } // namespace WebCore | 209 } // namespace WebCore |
| OLD | NEW |