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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 class WrapperTypeTraits<TestObj > { | 61 class WrapperTypeTraits<TestObj > { |
62 public: | 62 public: |
63 static WrapperTypeInfo* info() { return &V8TestObj::info; } | 63 static WrapperTypeInfo* info() { return &V8TestObj::info; } |
64 }; | 64 }; |
65 | 65 |
66 | 66 |
67 inline v8::Handle<v8::Object> wrap(TestObj* impl, v8::Handle<v8::Object> creatio
nContext, v8::Isolate* isolate) | 67 inline v8::Handle<v8::Object> wrap(TestObj* impl, v8::Handle<v8::Object> creatio
nContext, v8::Isolate* isolate) |
68 { | 68 { |
69 ASSERT(impl); | 69 ASSERT(impl); |
70 ASSERT(DOMDataStore::getWrapper(impl, isolate).IsEmpty()); | 70 ASSERT(DOMDataStore::getWrapper(impl, isolate).IsEmpty()); |
| 71 if (ScriptWrappable::wrapperCanBeStoredInObject(impl)) { |
| 72 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje
ct(impl); |
| 73 // Might be a XXXConstructor::info instead of an XXX::info. These will b
oth have |
| 74 // the same object de-ref functions, though, so use that as the basis of
the check. |
| 75 RELEASE_ASSERT(actualInfo->derefObjectFunction == V8TestObj::info.derefO
bjectFunction); |
| 76 } |
71 return V8TestObj::createWrapper(impl, creationContext, isolate); | 77 return V8TestObj::createWrapper(impl, creationContext, isolate); |
72 } | 78 } |
73 | 79 |
74 inline v8::Handle<v8::Value> toV8(TestObj* impl, v8::Handle<v8::Object> creation
Context, v8::Isolate* isolate) | 80 inline v8::Handle<v8::Value> toV8(TestObj* impl, v8::Handle<v8::Object> creation
Context, v8::Isolate* isolate) |
75 { | 81 { |
76 if (UNLIKELY(!impl)) | 82 if (UNLIKELY(!impl)) |
77 return v8NullWithCheck(isolate); | 83 return v8NullWithCheck(isolate); |
78 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper(impl, isolate); | 84 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper(impl, isolate); |
79 if (!wrapper.IsEmpty()) | 85 if (!wrapper.IsEmpty()) |
80 return wrapper; | 86 return wrapper; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 } | 135 } |
130 | 136 |
131 inline v8::Handle<v8::Value> toV8(PassRefPtr< TestObj > impl, v8::Handle<v8::Obj
ect> creationContext, v8::Isolate* isolate) | 137 inline v8::Handle<v8::Value> toV8(PassRefPtr< TestObj > impl, v8::Handle<v8::Obj
ect> creationContext, v8::Isolate* isolate) |
132 { | 138 { |
133 return toV8(impl.get(), creationContext, isolate); | 139 return toV8(impl.get(), creationContext, isolate); |
134 } | 140 } |
135 | 141 |
136 } | 142 } |
137 | 143 |
138 #endif // V8TestObj_h | 144 #endif // V8TestObj_h |
OLD | NEW |