OLD | NEW |
1 /* | 1 /* |
2 This file is part of the WebKit open source project. | 2 This file is part of the WebKit open source project. |
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY! | 3 This file has been generated by generate-bindings.pl. 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, |
11 but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 Library General Public License for more details. | 13 Library General Public License for more details. |
14 | 14 |
15 You should have received a copy of the GNU Library General Public License | 15 You should have received a copy of the GNU Library General Public License |
16 along with this library; see the file COPYING.LIB. If not, write to | 16 along with this library; see the file COPYING.LIB. If not, write to |
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 Boston, MA 02111-1307, USA. | 18 Boston, MA 02111-1307, USA. |
19 */ | 19 */ |
20 | 20 |
21 #ifndef V8TestCustomNamedGetter_h | 21 #ifndef V8TestCustomNamedGetter_h |
22 #define V8TestCustomNamedGetter_h | 22 #define V8TestCustomNamedGetter_h |
23 | 23 |
24 #include <v8.h> | 24 #include "bindings/bindings/tests/idls/TestCustomNamedGetter.h" |
25 #include "TestCustomNamedGetter.h" | |
26 #include "bindings/v8/V8Binding.h" | 25 #include "bindings/v8/V8Binding.h" |
27 #include "bindings/v8/V8DOMWrapper.h" | 26 #include "bindings/v8/V8DOMWrapper.h" |
28 #include "bindings/v8/WrapperTypeInfo.h" | 27 #include "bindings/v8/WrapperTypeInfo.h" |
| 28 #include <v8.h> |
29 #include <wtf/HashMap.h> | 29 #include <wtf/HashMap.h> |
30 #include <wtf/text/StringHash.h> | 30 #include <wtf/text/StringHash.h> |
31 | 31 |
32 namespace WebCore { | 32 namespace WebCore { |
33 | 33 |
34 class V8TestCustomNamedGetter { | 34 class V8TestCustomNamedGetter { |
35 public: | 35 public: |
36 static const bool hasDependentLifetime = false; | 36 static const bool hasDependentLifetime = false; |
37 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldTyp
e); | 37 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldTyp
e); |
38 static bool HasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*); | 38 static bool HasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*); |
(...skipping 17 matching lines...) Expand all Loading... |
56 class WrapperTypeTraits<TestCustomNamedGetter > { | 56 class WrapperTypeTraits<TestCustomNamedGetter > { |
57 public: | 57 public: |
58 static WrapperTypeInfo* info() { return &V8TestCustomNamedGetter::info; } | 58 static WrapperTypeInfo* info() { return &V8TestCustomNamedGetter::info; } |
59 }; | 59 }; |
60 | 60 |
61 | 61 |
62 inline v8::Handle<v8::Object> wrap(TestCustomNamedGetter* impl, v8::Handle<v8::O
bject> creationContext, v8::Isolate* isolate) | 62 inline v8::Handle<v8::Object> wrap(TestCustomNamedGetter* impl, v8::Handle<v8::O
bject> creationContext, v8::Isolate* isolate) |
63 { | 63 { |
64 ASSERT(impl); | 64 ASSERT(impl); |
65 ASSERT(DOMDataStore::getWrapper(impl, isolate).IsEmpty()); | 65 ASSERT(DOMDataStore::getWrapper(impl, isolate).IsEmpty()); |
| 66 if (ScriptWrappable::wrapperCanBeStoredInObject(impl)) { |
| 67 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje
ct(impl); |
| 68 // Might be a XXXConstructor::info instead of an XXX::info. These will
both have |
| 69 // the same object de-ref functions, though, so use that as the basis of
the check. |
| 70 RELEASE_ASSERT(actualInfo->derefObjectFunction == V8TestCustomNamedGette
r::info.derefObjectFunction); |
| 71 } |
66 return V8TestCustomNamedGetter::createWrapper(impl, creationContext, isolate
); | 72 return V8TestCustomNamedGetter::createWrapper(impl, creationContext, isolate
); |
67 } | 73 } |
68 | 74 |
69 inline v8::Handle<v8::Value> toV8(TestCustomNamedGetter* impl, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate* isolate) | 75 inline v8::Handle<v8::Value> toV8(TestCustomNamedGetter* impl, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate* isolate) |
70 { | 76 { |
71 if (UNLIKELY(!impl)) | 77 if (UNLIKELY(!impl)) |
72 return v8NullWithCheck(isolate); | 78 return v8NullWithCheck(isolate); |
73 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper(impl, isolate); | 79 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper(impl, isolate); |
74 if (!wrapper.IsEmpty()) | 80 if (!wrapper.IsEmpty()) |
75 return wrapper; | 81 return wrapper; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 } | 130 } |
125 | 131 |
126 inline v8::Handle<v8::Value> toV8(PassRefPtr< TestCustomNamedGetter > impl, v8::
Handle<v8::Object> creationContext, v8::Isolate* isolate) | 132 inline v8::Handle<v8::Value> toV8(PassRefPtr< TestCustomNamedGetter > impl, v8::
Handle<v8::Object> creationContext, v8::Isolate* isolate) |
127 { | 133 { |
128 return toV8(impl.get(), creationContext, isolate); | 134 return toV8(impl.get(), creationContext, isolate); |
129 } | 135 } |
130 | 136 |
131 } | 137 } |
132 | 138 |
133 #endif // V8TestCustomNamedGetter_h | 139 #endif // V8TestCustomNamedGetter_h |
OLD | NEW |