| 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 17 matching lines...) Expand all Loading... |
| 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 #if ENABLE(CONDITION) | 34 #if ENABLE(CONDITION) |
| 35 #include "V8TestInterfacePython.h" | 35 #include "V8TestInterfacePython.h" |
| 36 | 36 |
| 37 #include "RuntimeEnabledFeatures.h" | 37 #include "RuntimeEnabledFeatures.h" |
| 38 #include "V8ReferencedType.h" |
| 38 #include "bindings/v8/ExceptionState.h" | 39 #include "bindings/v8/ExceptionState.h" |
| 39 #include "bindings/v8/V8DOMConfiguration.h" | 40 #include "bindings/v8/V8DOMConfiguration.h" |
| 40 #include "bindings/v8/V8GCController.h" | |
| 41 #include "core/dom/ContextFeatures.h" | 41 #include "core/dom/ContextFeatures.h" |
| 42 #include "core/dom/Document.h" | 42 #include "core/dom/Document.h" |
| 43 #include "core/dom/Element.h" | |
| 44 #include "platform/TraceEvent.h" | 43 #include "platform/TraceEvent.h" |
| 45 | 44 |
| 46 namespace WebCore { | 45 namespace WebCore { |
| 47 | 46 |
| 48 static void initializeScriptWrappableForInterface(TestInterfacePythonImplementat
ion* object) | 47 static void initializeScriptWrappableForInterface(TestInterfacePythonImplementat
ion* object) |
| 49 { | 48 { |
| 50 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) | 49 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) |
| 51 ScriptWrappable::setTypeInfoInObject(object, &V8TestInterfacePython::wra
pperTypeInfo); | 50 ScriptWrappable::setTypeInfoInObject(object, &V8TestInterfacePython::wra
pperTypeInfo); |
| 52 else | 51 else |
| 53 ASSERT_NOT_REACHED(); | 52 ASSERT_NOT_REACHED(); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 148 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 150 TestInterfacePythonImplementationV8Internal::voidMethodMethodForMainWorld(in
fo); | 149 TestInterfacePythonImplementationV8Internal::voidMethodMethodForMainWorld(in
fo); |
| 151 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 150 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 152 } | 151 } |
| 153 | 152 |
| 154 } // namespace TestInterfacePythonImplementationV8Internal | 153 } // namespace TestInterfacePythonImplementationV8Internal |
| 155 | 154 |
| 156 void V8TestInterfacePython::visitDOMWrapper(void* object, const v8::Persistent<v
8::Object>& wrapper, v8::Isolate* isolate) | 155 void V8TestInterfacePython::visitDOMWrapper(void* object, const v8::Persistent<v
8::Object>& wrapper, v8::Isolate* isolate) |
| 157 { | 156 { |
| 158 TestInterfacePythonImplementation* impl = fromInternalPointer(object); | 157 TestInterfacePythonImplementation* impl = fromInternalPointer(object); |
| 159 if (Node* owner = impl->ownerNode()) { | 158 v8::Local<v8::Object> creationContext = v8::Local<v8::Object>::New(isolate,
wrapper); |
| 160 setObjectGroup(V8GCController::opaqueRootForGC(owner, isolate), wrapper,
isolate); | 159 V8WrapperInstantiationScope scope(creationContext, isolate); |
| 161 return; | 160 ReferencedType* referencedName = impl->referencedName(); |
| 161 if (referencedName) { |
| 162 if (!DOMDataStore::containsWrapper<V8ReferencedType>(referencedName, iso
late)) |
| 163 wrap(referencedName, creationContext, isolate); |
| 164 DOMDataStore::setWrapperReference<V8ReferencedType>(wrapper, referencedN
ame, isolate); |
| 162 } | 165 } |
| 163 setObjectGroup(object, wrapper, isolate); | 166 setObjectGroup(object, wrapper, isolate); |
| 164 } | 167 } |
| 165 | 168 |
| 166 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfacePythonAtt
ributes[] = { | 169 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfacePythonAtt
ributes[] = { |
| 167 {"perWorldBindingsStringAttribute", TestInterfacePythonImplementationV8Inter
nal::perWorldBindingsStringAttributeAttributeGetterCallback, TestInterfacePython
ImplementationV8Internal::perWorldBindingsStringAttributeAttributeSetterCallback
, TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttributeAt
tributeGetterCallbackForMainWorld, TestInterfacePythonImplementationV8Internal::
perWorldBindingsStringAttributeAttributeSetterCallbackForMainWorld, 0, static_ca
st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None)
, 0 /* on instance */}, | 170 {"perWorldBindingsStringAttribute", TestInterfacePythonImplementationV8Inter
nal::perWorldBindingsStringAttributeAttributeGetterCallback, TestInterfacePython
ImplementationV8Internal::perWorldBindingsStringAttributeAttributeSetterCallback
, TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttributeAt
tributeGetterCallbackForMainWorld, TestInterfacePythonImplementationV8Internal::
perWorldBindingsStringAttributeAttributeSetterCallbackForMainWorld, 0, static_ca
st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None)
, 0 /* on instance */}, |
| 168 }; | 171 }; |
| 169 | 172 |
| 170 static const V8DOMConfiguration::MethodConfiguration V8TestInterfacePythonMethod
s[] = { | 173 static const V8DOMConfiguration::MethodConfiguration V8TestInterfacePythonMethod
s[] = { |
| 171 {"voidMethod", TestInterfacePythonImplementationV8Internal::voidMethodMethod
Callback, TestInterfacePythonImplementationV8Internal::voidMethodMethodCallbackF
orMainWorld, 0}, | 174 {"voidMethod", TestInterfacePythonImplementationV8Internal::voidMethodMethod
Callback, TestInterfacePythonImplementationV8Internal::voidMethodMethodCallbackF
orMainWorld, 0}, |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 } | 234 } |
| 232 | 235 |
| 233 template<> | 236 template<> |
| 234 v8::Handle<v8::Value> toV8NoInline(TestInterfacePythonImplementation* impl, v8::
Handle<v8::Object> creationContext, v8::Isolate* isolate) | 237 v8::Handle<v8::Value> toV8NoInline(TestInterfacePythonImplementation* impl, v8::
Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| 235 { | 238 { |
| 236 return toV8(impl, creationContext, isolate); | 239 return toV8(impl, creationContext, isolate); |
| 237 } | 240 } |
| 238 | 241 |
| 239 } // namespace WebCore | 242 } // namespace WebCore |
| 240 #endif // ENABLE(CONDITION) | 243 #endif // ENABLE(CONDITION) |
| OLD | NEW |