| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 namespace WebCore { | 73 namespace WebCore { |
| 74 const WrapperTypeInfo V8TestInterfacePython2::wrapperTypeInfo = { gin::kEmbedder
Blink, V8TestInterfacePython2::domTemplate, V8TestInterfacePython2::derefObject,
0, 0, V8TestInterfacePython2::visitDOMWrapper, V8TestInterfacePython2::installP
erContextEnabledMethods, 0, WrapperTypeObjectPrototype, false }; | 74 const WrapperTypeInfo V8TestInterfacePython2::wrapperTypeInfo = { gin::kEmbedder
Blink, V8TestInterfacePython2::domTemplate, V8TestInterfacePython2::derefObject,
0, 0, V8TestInterfacePython2::visitDOMWrapper, V8TestInterfacePython2::installP
erContextEnabledMethods, 0, WrapperTypeObjectPrototype, false }; |
| 75 | 75 |
| 76 namespace TestInterfacePython2V8Internal { | 76 namespace TestInterfacePython2V8Internal { |
| 77 | 77 |
| 78 template <typename T> void V8_USE(T) { } | 78 template <typename T> void V8_USE(T) { } |
| 79 | 79 |
| 80 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 80 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 81 { | 81 { |
| 82 RefPtr<TestInterfacePython2> impl = TestInterfacePython2::create(); | 82 RefPtr<TestInterfacePython2> impl = TestInterfacePython2::create(); |
| 83 v8::Handle<v8::Object> wrapper = info.Holder(); | |
| 84 | 83 |
| 85 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfacePython2>(impl.releas
e(), &V8TestInterfacePython2::wrapperTypeInfo, wrapper, info.GetIsolate(), Wrapp
erConfiguration::Dependent); | 84 v8::Handle<v8::Object> wrapper = wrap(impl.get(), info.Holder(), info.GetIso
late()); |
| 86 v8SetReturnValue(info, wrapper); | 85 v8SetReturnValue(info, wrapper); |
| 87 } | 86 } |
| 88 | 87 |
| 89 } // namespace TestInterfacePython2V8Internal | 88 } // namespace TestInterfacePython2V8Internal |
| 90 | 89 |
| 91 void V8TestInterfacePython2::visitDOMWrapper(void* object, const v8::Persistent<
v8::Object>& wrapper, v8::Isolate* isolate) | 90 void V8TestInterfacePython2::visitDOMWrapper(void* object, const v8::Persistent<
v8::Object>& wrapper, v8::Isolate* isolate) |
| 92 { | 91 { |
| 93 TestInterfacePython2* impl = fromInternalPointer(object); | 92 TestInterfacePython2* impl = fromInternalPointer(object); |
| 94 // The ownerNode() method may return a reference or a pointer. | 93 // The ownerNode() method may return a reference or a pointer. |
| 95 if (Node* owner = WTF::getPtr(impl->ownerNode())) { | 94 if (Node* owner = WTF::getPtr(impl->ownerNode())) { |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 fromInternalPointer(object)->deref(); | 199 fromInternalPointer(object)->deref(); |
| 201 } | 200 } |
| 202 | 201 |
| 203 template<> | 202 template<> |
| 204 v8::Handle<v8::Value> toV8NoInline(TestInterfacePython2* impl, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate* isolate) | 203 v8::Handle<v8::Value> toV8NoInline(TestInterfacePython2* impl, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate* isolate) |
| 205 { | 204 { |
| 206 return toV8(impl, creationContext, isolate); | 205 return toV8(impl, creationContext, isolate); |
| 207 } | 206 } |
| 208 | 207 |
| 209 } // namespace WebCore | 208 } // namespace WebCore |
| OLD | NEW |