OLD | NEW |
1 /* | 1 /* |
2 This file is part of the Blink open source project. | 2 This file is part of the Blink open source project. |
3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! | 3 This file has been auto-generated by CodeGeneratorV8.pm. 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, |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 class WrapperTypeTraits<TestNode > { | 57 class WrapperTypeTraits<TestNode > { |
58 public: | 58 public: |
59 static WrapperTypeInfo* info() { return &V8TestNode::info; } | 59 static WrapperTypeInfo* info() { return &V8TestNode::info; } |
60 }; | 60 }; |
61 | 61 |
62 | 62 |
63 inline v8::Handle<v8::Object> wrap(TestNode* impl, v8::Handle<v8::Object> creati
onContext, v8::Isolate* isolate) | 63 inline v8::Handle<v8::Object> wrap(TestNode* impl, v8::Handle<v8::Object> creati
onContext, v8::Isolate* isolate) |
64 { | 64 { |
65 ASSERT(impl); | 65 ASSERT(impl); |
66 ASSERT(DOMDataStore::getWrapper(impl, isolate).IsEmpty()); | 66 ASSERT(DOMDataStore::getWrapper(impl, isolate).IsEmpty()); |
| 67 if (ScriptWrappable::wrapperCanBeStoredInObject(impl)) { |
| 68 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje
ct(impl); |
| 69 // Might be a XXXConstructor::info instead of an XXX::info. These will b
oth have |
| 70 // the same object de-ref functions, though, so use that as the basis of
the check. |
| 71 RELEASE_ASSERT(actualInfo->derefObjectFunction == V8TestNode::info.deref
ObjectFunction); |
| 72 } |
67 return V8TestNode::createWrapper(impl, creationContext, isolate); | 73 return V8TestNode::createWrapper(impl, creationContext, isolate); |
68 } | 74 } |
69 | 75 |
70 inline v8::Handle<v8::Value> toV8(TestNode* impl, v8::Handle<v8::Object> creatio
nContext, v8::Isolate* isolate) | 76 inline v8::Handle<v8::Value> toV8(TestNode* impl, v8::Handle<v8::Object> creatio
nContext, v8::Isolate* isolate) |
71 { | 77 { |
72 if (UNLIKELY(!impl)) | 78 if (UNLIKELY(!impl)) |
73 return v8NullWithCheck(isolate); | 79 return v8NullWithCheck(isolate); |
74 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper(impl, isolate); | 80 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper(impl, isolate); |
75 if (!wrapper.IsEmpty()) | 81 if (!wrapper.IsEmpty()) |
76 return wrapper; | 82 return wrapper; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 } | 131 } |
126 | 132 |
127 inline v8::Handle<v8::Value> toV8(PassRefPtr< TestNode > impl, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate* isolate) | 133 inline v8::Handle<v8::Value> toV8(PassRefPtr< TestNode > impl, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate* isolate) |
128 { | 134 { |
129 return toV8(impl.get(), creationContext, isolate); | 135 return toV8(impl.get(), creationContext, isolate); |
130 } | 136 } |
131 | 137 |
132 } | 138 } |
133 | 139 |
134 #endif // V8TestNode_h | 140 #endif // V8TestNode_h |
OLD | NEW |