| 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 "bindings/v8/ScriptController.h" | |
| 39 #include "bindings/v8/V8Binding.h" | 38 #include "bindings/v8/V8Binding.h" |
| 40 #include "bindings/v8/V8DOMConfiguration.h" | 39 #include "bindings/v8/V8DOMConfiguration.h" |
| 41 #include "bindings/v8/V8DOMWrapper.h" | 40 #include "bindings/v8/V8DOMWrapper.h" |
| 42 #include "bindings/v8/V8GCController.h" | 41 #include "bindings/v8/V8GCController.h" |
| 43 #include "core/dom/ContextFeatures.h" | 42 #include "core/dom/ContextFeatures.h" |
| 44 #include "core/dom/Document.h" | 43 #include "core/dom/Document.h" |
| 45 #include "core/dom/Element.h" | 44 #include "core/dom/Element.h" |
| 46 #include "platform/TraceEvent.h" | 45 #include "platform/TraceEvent.h" |
| 47 #include "wtf/UnusedParam.h" | 46 #include "wtf/UnusedParam.h" |
| 48 | 47 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e, MainWorld) | 132 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e, MainWorld) |
| 134 || V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e, IsolatedWorld) | 133 || V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e, IsolatedWorld) |
| 135 || V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e, WorkerWorld); | 134 || V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e, WorkerWorld); |
| 136 } | 135 } |
| 137 | 136 |
| 138 ActiveDOMObject* V8TestInterfacePython::toActiveDOMObject(v8::Handle<v8::Object>
wrapper) | 137 ActiveDOMObject* V8TestInterfacePython::toActiveDOMObject(v8::Handle<v8::Object>
wrapper) |
| 139 { | 138 { |
| 140 return toNative(wrapper); | 139 return toNative(wrapper); |
| 141 } | 140 } |
| 142 | 141 |
| 143 v8::Handle<v8::Object> V8TestInterfacePython::createWrapper(PassRefPtr<TestInter
facePythonImplementation> impl, v8::Handle<v8::Object> creationContext, v8::Isol
ate* isolate) | |
| 144 { | |
| 145 ASSERT(impl); | |
| 146 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfacePython>(impl.get(), iso
late)); | |
| 147 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { | |
| 148 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje
ct(impl.get()); | |
| 149 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have | |
| 150 // the same object de-ref functions, though, so use that as the basis of
the check. | |
| 151 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== wrapperTypeInfo.derefObjectFunction); | |
| 152 } | |
| 153 | |
| 154 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); | |
| 155 if (UNLIKELY(wrapper.IsEmpty())) | |
| 156 return wrapper; | |
| 157 | |
| 158 installPerContextEnabledProperties(wrapper, impl.get(), isolate); | |
| 159 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfacePython>(impl, &wrapp
erTypeInfo, wrapper, isolate, WrapperConfiguration::Dependent); | |
| 160 return wrapper; | |
| 161 } | |
| 162 | |
| 163 void V8TestInterfacePython::derefObject(void* object) | 142 void V8TestInterfacePython::derefObject(void* object) |
| 164 { | 143 { |
| 165 fromInternalPointer(object)->deref(); | 144 fromInternalPointer(object)->deref(); |
| 166 } | 145 } |
| 167 | 146 |
| 168 template<> | 147 template<> |
| 169 v8::Handle<v8::Value> toV8NoInline(TestInterfacePythonImplementation* impl, v8::
Handle<v8::Object> creationContext, v8::Isolate* isolate) | 148 v8::Handle<v8::Value> toV8NoInline(TestInterfacePythonImplementation* impl, v8::
Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| 170 { | 149 { |
| 171 return toV8(impl, creationContext, isolate); | 150 return toV8(impl, creationContext, isolate); |
| 172 } | 151 } |
| 173 | 152 |
| 174 } // namespace WebCore | 153 } // namespace WebCore |
| 175 #endif // ENABLE(CONDITION) | 154 #endif // ENABLE(CONDITION) |
| OLD | NEW |