OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "xfa/fxjse/cfxjse_arguments.h" | 7 #include "xfa/fxjse/cfxjse_arguments.h" |
8 #include "xfa/fxjse/class.h" | 8 #include "xfa/fxjse/class.h" |
9 #include "xfa/fxjse/value.h" | 9 #include "xfa/fxjse/value.h" |
10 | 10 |
11 static void FXJSE_DynPropGetterAdapter_MethodCallback( | 11 static void FXJSE_DynPropGetterAdapter_MethodCallback( |
12 const v8::FunctionCallbackInfo<v8::Value>& info) { | 12 const v8::FunctionCallbackInfo<v8::Value>& info) { |
13 v8::Local<v8::Object> hCallBackInfo = info.Data().As<v8::Object>(); | 13 v8::Local<v8::Object> hCallBackInfo = info.Data().As<v8::Object>(); |
14 FXJSE_CLASS* lpClass = static_cast<FXJSE_CLASS*>( | 14 FXJSE_CLASS_DESCRIPTOR* lpClass = static_cast<FXJSE_CLASS_DESCRIPTOR*>( |
15 hCallBackInfo->GetAlignedPointerFromInternalField(0)); | 15 hCallBackInfo->GetAlignedPointerFromInternalField(0)); |
16 v8::Local<v8::String> hPropName = | 16 v8::Local<v8::String> hPropName = |
17 hCallBackInfo->GetInternalField(1).As<v8::String>(); | 17 hCallBackInfo->GetInternalField(1).As<v8::String>(); |
18 ASSERT(lpClass && !hPropName.IsEmpty()); | 18 ASSERT(lpClass && !hPropName.IsEmpty()); |
19 v8::String::Utf8Value szPropName(hPropName); | 19 v8::String::Utf8Value szPropName(hPropName); |
20 CFX_ByteStringC szFxPropName = *szPropName; | 20 CFX_ByteStringC szFxPropName = *szPropName; |
21 CFXJSE_Value* lpThisValue = CFXJSE_Value::Create(info.GetIsolate()); | 21 CFXJSE_Value* lpThisValue = CFXJSE_Value::Create(info.GetIsolate()); |
22 lpThisValue->ForceSetValue(info.This()); | 22 lpThisValue->ForceSetValue(info.This()); |
23 CFXJSE_Value* lpRetValue = CFXJSE_Value::Create(info.GetIsolate()); | 23 CFXJSE_Value* lpRetValue = CFXJSE_Value::Create(info.GetIsolate()); |
24 CFXJSE_ArgumentsImpl impl = {&info, lpRetValue}; | 24 CFXJSE_ArgumentsImpl impl = {&info, lpRetValue}; |
25 lpClass->dynMethodCall(lpThisValue, szFxPropName, | 25 lpClass->dynMethodCall(lpThisValue, szFxPropName, |
26 reinterpret_cast<CFXJSE_Arguments&>(impl)); | 26 reinterpret_cast<CFXJSE_Arguments&>(impl)); |
27 if (!lpRetValue->DirectGetValue().IsEmpty()) { | 27 if (!lpRetValue->DirectGetValue().IsEmpty()) { |
28 info.GetReturnValue().Set(lpRetValue->DirectGetValue()); | 28 info.GetReturnValue().Set(lpRetValue->DirectGetValue()); |
29 } | 29 } |
30 delete lpRetValue; | 30 delete lpRetValue; |
31 lpRetValue = nullptr; | 31 lpRetValue = nullptr; |
32 delete lpThisValue; | 32 delete lpThisValue; |
33 lpThisValue = nullptr; | 33 lpThisValue = nullptr; |
34 } | 34 } |
35 | 35 |
36 static void FXJSE_DynPropGetterAdapter(const FXJSE_CLASS* lpClass, | 36 static void FXJSE_DynPropGetterAdapter(const FXJSE_CLASS_DESCRIPTOR* lpClass, |
37 CFXJSE_Value* pObject, | 37 CFXJSE_Value* pObject, |
38 const CFX_ByteStringC& szPropName, | 38 const CFX_ByteStringC& szPropName, |
39 CFXJSE_Value* pValue) { | 39 CFXJSE_Value* pValue) { |
40 ASSERT(lpClass); | 40 ASSERT(lpClass); |
41 int32_t nPropType = | 41 int32_t nPropType = |
42 lpClass->dynPropTypeGetter == nullptr | 42 lpClass->dynPropTypeGetter == nullptr |
43 ? FXJSE_ClassPropType_Property | 43 ? FXJSE_ClassPropType_Property |
44 : lpClass->dynPropTypeGetter(pObject, szPropName, FALSE); | 44 : lpClass->dynPropTypeGetter(pObject, szPropName, FALSE); |
45 if (nPropType == FXJSE_ClassPropType_Property) { | 45 if (nPropType == FXJSE_ClassPropType_Property) { |
46 if (lpClass->dynPropGetter) { | 46 if (lpClass->dynPropGetter) { |
47 lpClass->dynPropGetter(pObject, szPropName, pValue); | 47 lpClass->dynPropGetter(pObject, szPropName, pValue); |
48 } | 48 } |
49 } else if (nPropType == FXJSE_ClassPropType_Method) { | 49 } else if (nPropType == FXJSE_ClassPropType_Method) { |
50 if (lpClass->dynMethodCall && pValue) { | 50 if (lpClass->dynMethodCall && pValue) { |
51 v8::Isolate* pIsolate = pValue->GetIsolate(); | 51 v8::Isolate* pIsolate = pValue->GetIsolate(); |
52 v8::HandleScope hscope(pIsolate); | 52 v8::HandleScope hscope(pIsolate); |
53 v8::Local<v8::ObjectTemplate> hCallBackInfoTemplate = | 53 v8::Local<v8::ObjectTemplate> hCallBackInfoTemplate = |
54 v8::ObjectTemplate::New(pIsolate); | 54 v8::ObjectTemplate::New(pIsolate); |
55 hCallBackInfoTemplate->SetInternalFieldCount(2); | 55 hCallBackInfoTemplate->SetInternalFieldCount(2); |
56 v8::Local<v8::Object> hCallBackInfo = | 56 v8::Local<v8::Object> hCallBackInfo = |
57 hCallBackInfoTemplate->NewInstance(); | 57 hCallBackInfoTemplate->NewInstance(); |
58 hCallBackInfo->SetAlignedPointerInInternalField( | 58 hCallBackInfo->SetAlignedPointerInInternalField( |
59 0, const_cast<FXJSE_CLASS*>(lpClass)); | 59 0, const_cast<FXJSE_CLASS_DESCRIPTOR*>(lpClass)); |
60 hCallBackInfo->SetInternalField( | 60 hCallBackInfo->SetInternalField( |
61 1, v8::String::NewFromUtf8( | 61 1, v8::String::NewFromUtf8( |
62 pIsolate, reinterpret_cast<const char*>(szPropName.raw_str()), | 62 pIsolate, reinterpret_cast<const char*>(szPropName.raw_str()), |
63 v8::String::kNormalString, szPropName.GetLength())); | 63 v8::String::kNormalString, szPropName.GetLength())); |
64 pValue->ForceSetValue(v8::Function::New( | 64 pValue->ForceSetValue(v8::Function::New( |
65 pValue->GetIsolate(), FXJSE_DynPropGetterAdapter_MethodCallback, | 65 pValue->GetIsolate(), FXJSE_DynPropGetterAdapter_MethodCallback, |
66 hCallBackInfo)); | 66 hCallBackInfo)); |
67 } | 67 } |
68 } | 68 } |
69 } | 69 } |
70 | 70 |
71 static void FXJSE_DynPropSetterAdapter(const FXJSE_CLASS* lpClass, | 71 static void FXJSE_DynPropSetterAdapter(const FXJSE_CLASS_DESCRIPTOR* lpClass, |
72 CFXJSE_Value* pObject, | 72 CFXJSE_Value* pObject, |
73 const CFX_ByteStringC& szPropName, | 73 const CFX_ByteStringC& szPropName, |
74 CFXJSE_Value* pValue) { | 74 CFXJSE_Value* pValue) { |
75 ASSERT(lpClass); | 75 ASSERT(lpClass); |
76 int32_t nPropType = | 76 int32_t nPropType = |
77 lpClass->dynPropTypeGetter == nullptr | 77 lpClass->dynPropTypeGetter == nullptr |
78 ? FXJSE_ClassPropType_Property | 78 ? FXJSE_ClassPropType_Property |
79 : lpClass->dynPropTypeGetter(pObject, szPropName, FALSE); | 79 : lpClass->dynPropTypeGetter(pObject, szPropName, FALSE); |
80 if (nPropType != FXJSE_ClassPropType_Method) { | 80 if (nPropType != FXJSE_ClassPropType_Method) { |
81 if (lpClass->dynPropSetter) { | 81 if (lpClass->dynPropSetter) { |
82 lpClass->dynPropSetter(pObject, szPropName, pValue); | 82 lpClass->dynPropSetter(pObject, szPropName, pValue); |
83 } | 83 } |
84 } | 84 } |
85 } | 85 } |
86 | 86 |
87 static FX_BOOL FXJSE_DynPropQueryAdapter(const FXJSE_CLASS* lpClass, | 87 static FX_BOOL FXJSE_DynPropQueryAdapter(const FXJSE_CLASS_DESCRIPTOR* lpClass, |
88 CFXJSE_Value* pObject, | 88 CFXJSE_Value* pObject, |
89 const CFX_ByteStringC& szPropName) { | 89 const CFX_ByteStringC& szPropName) { |
90 ASSERT(lpClass); | 90 ASSERT(lpClass); |
91 int32_t nPropType = | 91 int32_t nPropType = |
92 lpClass->dynPropTypeGetter == nullptr | 92 lpClass->dynPropTypeGetter == nullptr |
93 ? FXJSE_ClassPropType_Property | 93 ? FXJSE_ClassPropType_Property |
94 : lpClass->dynPropTypeGetter(pObject, szPropName, TRUE); | 94 : lpClass->dynPropTypeGetter(pObject, szPropName, TRUE); |
95 return nPropType != FXJSE_ClassPropType_None; | 95 return nPropType != FXJSE_ClassPropType_None; |
96 } | 96 } |
97 | 97 |
98 static FX_BOOL FXJSE_DynPropDeleterAdapter(const FXJSE_CLASS* lpClass, | 98 static FX_BOOL FXJSE_DynPropDeleterAdapter( |
99 CFXJSE_Value* pObject, | 99 const FXJSE_CLASS_DESCRIPTOR* lpClass, |
100 const CFX_ByteStringC& szPropName) { | 100 CFXJSE_Value* pObject, |
| 101 const CFX_ByteStringC& szPropName) { |
101 ASSERT(lpClass); | 102 ASSERT(lpClass); |
102 int32_t nPropType = | 103 int32_t nPropType = |
103 lpClass->dynPropTypeGetter == nullptr | 104 lpClass->dynPropTypeGetter == nullptr |
104 ? FXJSE_ClassPropType_Property | 105 ? FXJSE_ClassPropType_Property |
105 : lpClass->dynPropTypeGetter(pObject, szPropName, FALSE); | 106 : lpClass->dynPropTypeGetter(pObject, szPropName, FALSE); |
106 if (nPropType != FXJSE_ClassPropType_Method) { | 107 if (nPropType != FXJSE_ClassPropType_Method) { |
107 if (lpClass->dynPropDeleter) { | 108 if (lpClass->dynPropDeleter) { |
108 return lpClass->dynPropDeleter(pObject, szPropName); | 109 return lpClass->dynPropDeleter(pObject, szPropName); |
109 } else { | 110 } else { |
110 return nPropType == FXJSE_ClassPropType_Property ? FALSE : TRUE; | 111 return nPropType == FXJSE_ClassPropType_Property ? FALSE : TRUE; |
111 } | 112 } |
112 } | 113 } |
113 return FALSE; | 114 return FALSE; |
114 } | 115 } |
115 | 116 |
116 static void FXJSE_V8_GenericNamedPropertyQueryCallback( | 117 static void FXJSE_V8_GenericNamedPropertyQueryCallback( |
117 v8::Local<v8::Name> property, | 118 v8::Local<v8::Name> property, |
118 const v8::PropertyCallbackInfo<v8::Integer>& info) { | 119 const v8::PropertyCallbackInfo<v8::Integer>& info) { |
119 v8::Local<v8::Object> thisObject = info.This(); | 120 v8::Local<v8::Object> thisObject = info.This(); |
120 const FXJSE_CLASS* lpClass = | 121 const FXJSE_CLASS_DESCRIPTOR* lpClass = static_cast<FXJSE_CLASS_DESCRIPTOR*>( |
121 static_cast<FXJSE_CLASS*>(info.Data().As<v8::External>()->Value()); | 122 info.Data().As<v8::External>()->Value()); |
122 v8::Isolate* pIsolate = info.GetIsolate(); | 123 v8::Isolate* pIsolate = info.GetIsolate(); |
123 v8::HandleScope scope(pIsolate); | 124 v8::HandleScope scope(pIsolate); |
124 v8::String::Utf8Value szPropName(property); | 125 v8::String::Utf8Value szPropName(property); |
125 CFX_ByteStringC szFxPropName(*szPropName, szPropName.length()); | 126 CFX_ByteStringC szFxPropName(*szPropName, szPropName.length()); |
126 CFXJSE_Value* lpThisValue = CFXJSE_Value::Create(info.GetIsolate()); | 127 CFXJSE_Value* lpThisValue = CFXJSE_Value::Create(info.GetIsolate()); |
127 lpThisValue->ForceSetValue(thisObject); | 128 lpThisValue->ForceSetValue(thisObject); |
128 if (FXJSE_DynPropQueryAdapter(lpClass, lpThisValue, szFxPropName)) { | 129 if (FXJSE_DynPropQueryAdapter(lpClass, lpThisValue, szFxPropName)) { |
129 info.GetReturnValue().Set(v8::DontDelete); | 130 info.GetReturnValue().Set(v8::DontDelete); |
130 } else { | 131 } else { |
131 const int32_t iV8Absent = 64; | 132 const int32_t iV8Absent = 64; |
132 info.GetReturnValue().Set(iV8Absent); | 133 info.GetReturnValue().Set(iV8Absent); |
133 } | 134 } |
134 delete lpThisValue; | 135 delete lpThisValue; |
135 lpThisValue = nullptr; | 136 lpThisValue = nullptr; |
136 } | 137 } |
137 | 138 |
138 static void FXJSE_V8_GenericNamedPropertyDeleterCallback( | 139 static void FXJSE_V8_GenericNamedPropertyDeleterCallback( |
139 v8::Local<v8::Name> property, | 140 v8::Local<v8::Name> property, |
140 const v8::PropertyCallbackInfo<v8::Boolean>& info) { | 141 const v8::PropertyCallbackInfo<v8::Boolean>& info) { |
141 v8::Local<v8::Object> thisObject = info.This(); | 142 v8::Local<v8::Object> thisObject = info.This(); |
142 const FXJSE_CLASS* lpClass = | 143 const FXJSE_CLASS_DESCRIPTOR* lpClass = static_cast<FXJSE_CLASS_DESCRIPTOR*>( |
143 static_cast<FXJSE_CLASS*>(info.Data().As<v8::External>()->Value()); | 144 info.Data().As<v8::External>()->Value()); |
144 v8::Isolate* pIsolate = info.GetIsolate(); | 145 v8::Isolate* pIsolate = info.GetIsolate(); |
145 v8::HandleScope scope(pIsolate); | 146 v8::HandleScope scope(pIsolate); |
146 v8::String::Utf8Value szPropName(property); | 147 v8::String::Utf8Value szPropName(property); |
147 CFX_ByteStringC szFxPropName(*szPropName, szPropName.length()); | 148 CFX_ByteStringC szFxPropName(*szPropName, szPropName.length()); |
148 CFXJSE_Value* lpThisValue = CFXJSE_Value::Create(info.GetIsolate()); | 149 CFXJSE_Value* lpThisValue = CFXJSE_Value::Create(info.GetIsolate()); |
149 lpThisValue->ForceSetValue(thisObject); | 150 lpThisValue->ForceSetValue(thisObject); |
150 info.GetReturnValue().Set( | 151 info.GetReturnValue().Set( |
151 !!FXJSE_DynPropDeleterAdapter(lpClass, lpThisValue, szFxPropName)); | 152 !!FXJSE_DynPropDeleterAdapter(lpClass, lpThisValue, szFxPropName)); |
152 delete lpThisValue; | 153 delete lpThisValue; |
153 lpThisValue = nullptr; | 154 lpThisValue = nullptr; |
154 } | 155 } |
155 | 156 |
156 static void FXJSE_V8_GenericNamedPropertyGetterCallback( | 157 static void FXJSE_V8_GenericNamedPropertyGetterCallback( |
157 v8::Local<v8::Name> property, | 158 v8::Local<v8::Name> property, |
158 const v8::PropertyCallbackInfo<v8::Value>& info) { | 159 const v8::PropertyCallbackInfo<v8::Value>& info) { |
159 v8::Local<v8::Object> thisObject = info.This(); | 160 v8::Local<v8::Object> thisObject = info.This(); |
160 const FXJSE_CLASS* lpClass = | 161 const FXJSE_CLASS_DESCRIPTOR* lpClass = static_cast<FXJSE_CLASS_DESCRIPTOR*>( |
161 static_cast<FXJSE_CLASS*>(info.Data().As<v8::External>()->Value()); | 162 info.Data().As<v8::External>()->Value()); |
162 v8::String::Utf8Value szPropName(property); | 163 v8::String::Utf8Value szPropName(property); |
163 CFX_ByteStringC szFxPropName(*szPropName, szPropName.length()); | 164 CFX_ByteStringC szFxPropName(*szPropName, szPropName.length()); |
164 CFXJSE_Value* lpThisValue = CFXJSE_Value::Create(info.GetIsolate()); | 165 CFXJSE_Value* lpThisValue = CFXJSE_Value::Create(info.GetIsolate()); |
165 lpThisValue->ForceSetValue(thisObject); | 166 lpThisValue->ForceSetValue(thisObject); |
166 CFXJSE_Value* lpNewValue = CFXJSE_Value::Create(info.GetIsolate()); | 167 CFXJSE_Value* lpNewValue = CFXJSE_Value::Create(info.GetIsolate()); |
167 FXJSE_DynPropGetterAdapter(lpClass, lpThisValue, szFxPropName, lpNewValue); | 168 FXJSE_DynPropGetterAdapter(lpClass, lpThisValue, szFxPropName, lpNewValue); |
168 info.GetReturnValue().Set(lpNewValue->DirectGetValue()); | 169 info.GetReturnValue().Set(lpNewValue->DirectGetValue()); |
169 delete lpThisValue; | 170 delete lpThisValue; |
170 lpThisValue = nullptr; | 171 lpThisValue = nullptr; |
171 } | 172 } |
172 | 173 |
173 static void FXJSE_V8_GenericNamedPropertySetterCallback( | 174 static void FXJSE_V8_GenericNamedPropertySetterCallback( |
174 v8::Local<v8::Name> property, | 175 v8::Local<v8::Name> property, |
175 v8::Local<v8::Value> value, | 176 v8::Local<v8::Value> value, |
176 const v8::PropertyCallbackInfo<v8::Value>& info) { | 177 const v8::PropertyCallbackInfo<v8::Value>& info) { |
177 v8::Local<v8::Object> thisObject = info.This(); | 178 v8::Local<v8::Object> thisObject = info.This(); |
178 const FXJSE_CLASS* lpClass = | 179 const FXJSE_CLASS_DESCRIPTOR* lpClass = static_cast<FXJSE_CLASS_DESCRIPTOR*>( |
179 static_cast<FXJSE_CLASS*>(info.Data().As<v8::External>()->Value()); | 180 info.Data().As<v8::External>()->Value()); |
180 v8::String::Utf8Value szPropName(property); | 181 v8::String::Utf8Value szPropName(property); |
181 CFX_ByteStringC szFxPropName(*szPropName, szPropName.length()); | 182 CFX_ByteStringC szFxPropName(*szPropName, szPropName.length()); |
182 CFXJSE_Value* lpThisValue = CFXJSE_Value::Create(info.GetIsolate()); | 183 CFXJSE_Value* lpThisValue = CFXJSE_Value::Create(info.GetIsolate()); |
183 lpThisValue->ForceSetValue(thisObject); | 184 lpThisValue->ForceSetValue(thisObject); |
184 CFXJSE_Value* lpNewValue = CFXJSE_Value::Create(info.GetIsolate()); | 185 CFXJSE_Value* lpNewValue = CFXJSE_Value::Create(info.GetIsolate()); |
185 lpNewValue->ForceSetValue(value); | 186 lpNewValue->ForceSetValue(value); |
186 FXJSE_DynPropSetterAdapter(lpClass, lpThisValue, szFxPropName, lpNewValue); | 187 FXJSE_DynPropSetterAdapter(lpClass, lpThisValue, szFxPropName, lpNewValue); |
187 info.GetReturnValue().Set(value); | 188 info.GetReturnValue().Set(value); |
188 delete lpThisValue; | 189 delete lpThisValue; |
189 lpThisValue = nullptr; | 190 lpThisValue = nullptr; |
190 } | 191 } |
191 | 192 |
192 static void FXJSE_V8_GenericNamedPropertyEnumeratorCallback( | 193 static void FXJSE_V8_GenericNamedPropertyEnumeratorCallback( |
193 const v8::PropertyCallbackInfo<v8::Array>& info) { | 194 const v8::PropertyCallbackInfo<v8::Array>& info) { |
194 const FXJSE_CLASS* lpClass = | 195 const FXJSE_CLASS_DESCRIPTOR* lpClass = static_cast<FXJSE_CLASS_DESCRIPTOR*>( |
195 static_cast<FXJSE_CLASS*>(info.Data().As<v8::External>()->Value()); | 196 info.Data().As<v8::External>()->Value()); |
196 v8::Isolate* pIsolate = info.GetIsolate(); | 197 v8::Isolate* pIsolate = info.GetIsolate(); |
197 v8::Local<v8::Array> newArray = v8::Array::New(pIsolate, lpClass->propNum); | 198 v8::Local<v8::Array> newArray = v8::Array::New(pIsolate, lpClass->propNum); |
198 for (int i = 0; i < lpClass->propNum; i++) { | 199 for (int i = 0; i < lpClass->propNum; i++) { |
199 newArray->Set( | 200 newArray->Set( |
200 i, v8::String::NewFromUtf8(pIsolate, lpClass->properties[i].name)); | 201 i, v8::String::NewFromUtf8(pIsolate, lpClass->properties[i].name)); |
201 } | 202 } |
202 info.GetReturnValue().Set(newArray); | 203 info.GetReturnValue().Set(newArray); |
203 } | 204 } |
204 | 205 |
205 void CFXJSE_Class::SetUpNamedPropHandler( | 206 void CFXJSE_Class::SetUpNamedPropHandler( |
206 v8::Isolate* pIsolate, | 207 v8::Isolate* pIsolate, |
207 v8::Local<v8::ObjectTemplate>& hObjectTemplate, | 208 v8::Local<v8::ObjectTemplate>& hObjectTemplate, |
208 const FXJSE_CLASS* lpClassDefinition) { | 209 const FXJSE_CLASS_DESCRIPTOR* lpClassDefinition) { |
209 v8::NamedPropertyHandlerConfiguration configuration( | 210 v8::NamedPropertyHandlerConfiguration configuration( |
210 lpClassDefinition->dynPropGetter | 211 lpClassDefinition->dynPropGetter |
211 ? FXJSE_V8_GenericNamedPropertyGetterCallback | 212 ? FXJSE_V8_GenericNamedPropertyGetterCallback |
212 : 0, | 213 : 0, |
213 lpClassDefinition->dynPropSetter | 214 lpClassDefinition->dynPropSetter |
214 ? FXJSE_V8_GenericNamedPropertySetterCallback | 215 ? FXJSE_V8_GenericNamedPropertySetterCallback |
215 : 0, | 216 : 0, |
216 lpClassDefinition->dynPropTypeGetter | 217 lpClassDefinition->dynPropTypeGetter |
217 ? FXJSE_V8_GenericNamedPropertyQueryCallback | 218 ? FXJSE_V8_GenericNamedPropertyQueryCallback |
218 : 0, | 219 : 0, |
219 lpClassDefinition->dynPropDeleter | 220 lpClassDefinition->dynPropDeleter |
220 ? FXJSE_V8_GenericNamedPropertyDeleterCallback | 221 ? FXJSE_V8_GenericNamedPropertyDeleterCallback |
221 : 0, | 222 : 0, |
222 FXJSE_V8_GenericNamedPropertyEnumeratorCallback, | 223 FXJSE_V8_GenericNamedPropertyEnumeratorCallback, |
223 v8::External::New(pIsolate, const_cast<FXJSE_CLASS*>(lpClassDefinition)), | 224 v8::External::New(pIsolate, |
| 225 const_cast<FXJSE_CLASS_DESCRIPTOR*>(lpClassDefinition)), |
224 v8::PropertyHandlerFlags::kNonMasking); | 226 v8::PropertyHandlerFlags::kNonMasking); |
225 hObjectTemplate->SetHandler(configuration); | 227 hObjectTemplate->SetHandler(configuration); |
226 } | 228 } |
OLD | NEW |