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/src/fxjse/class.h" | 7 #include "xfa/fxjse/class.h" |
8 #include "xfa/src/fxjse/value.h" | 8 #include "xfa/fxjse/value.h" |
9 | 9 |
10 static void FXJSE_DynPropGetterAdapter_MethodCallback( | 10 static void FXJSE_DynPropGetterAdapter_MethodCallback( |
11 const v8::FunctionCallbackInfo<v8::Value>& info) { | 11 const v8::FunctionCallbackInfo<v8::Value>& info) { |
12 v8::Local<v8::Object> hCallBackInfo = info.Data().As<v8::Object>(); | 12 v8::Local<v8::Object> hCallBackInfo = info.Data().As<v8::Object>(); |
13 FXJSE_CLASS* lpClass = static_cast<FXJSE_CLASS*>( | 13 FXJSE_CLASS* lpClass = static_cast<FXJSE_CLASS*>( |
14 hCallBackInfo->GetAlignedPointerFromInternalField(0)); | 14 hCallBackInfo->GetAlignedPointerFromInternalField(0)); |
15 v8::Local<v8::String> hPropName = | 15 v8::Local<v8::String> hPropName = |
16 hCallBackInfo->GetInternalField(1).As<v8::String>(); | 16 hCallBackInfo->GetInternalField(1).As<v8::String>(); |
17 ASSERT(lpClass && !hPropName.IsEmpty()); | 17 ASSERT(lpClass && !hPropName.IsEmpty()); |
18 v8::String::Utf8Value szPropName(hPropName); | 18 v8::String::Utf8Value szPropName(hPropName); |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 ? FXJSE_V8_GenericNamedPropertyQueryCallback | 227 ? FXJSE_V8_GenericNamedPropertyQueryCallback |
228 : 0, | 228 : 0, |
229 lpClassDefinition->dynPropDeleter | 229 lpClassDefinition->dynPropDeleter |
230 ? FXJSE_V8_GenericNamedPropertyDeleterCallback | 230 ? FXJSE_V8_GenericNamedPropertyDeleterCallback |
231 : 0, | 231 : 0, |
232 FXJSE_V8_GenericNamedPropertyEnumeratorCallback, | 232 FXJSE_V8_GenericNamedPropertyEnumeratorCallback, |
233 v8::External::New(pIsolate, const_cast<FXJSE_CLASS*>(lpClassDefinition)), | 233 v8::External::New(pIsolate, const_cast<FXJSE_CLASS*>(lpClassDefinition)), |
234 v8::PropertyHandlerFlags::kNonMasking); | 234 v8::PropertyHandlerFlags::kNonMasking); |
235 hObjectTemplate->SetHandler(configuration); | 235 hObjectTemplate->SetHandler(configuration); |
236 } | 236 } |
OLD | NEW |