| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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 "fxjs/include/cfxjse_class.h" | 7 #include "fxjs/cfxjse_class.h" |
| 8 | 8 |
| 9 #include "fxjs/include/cfxjse_context.h" | 9 #include "fxjs/cfxjse_context.h" |
| 10 #include "fxjs/include/cfxjse_value.h" | 10 #include "fxjs/cfxjse_value.h" |
| 11 | 11 |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 void V8FunctionCallback_Wrapper( | 14 void V8FunctionCallback_Wrapper( |
| 15 const v8::FunctionCallbackInfo<v8::Value>& info) { | 15 const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 16 const FXJSE_FUNCTION_DESCRIPTOR* lpFunctionInfo = | 16 const FXJSE_FUNCTION_DESCRIPTOR* lpFunctionInfo = |
| 17 static_cast<FXJSE_FUNCTION_DESCRIPTOR*>( | 17 static_cast<FXJSE_FUNCTION_DESCRIPTOR*>( |
| 18 info.Data().As<v8::External>()->Value()); | 18 info.Data().As<v8::External>()->Value()); |
| 19 if (!lpFunctionInfo) | 19 if (!lpFunctionInfo) |
| 20 return; | 20 return; |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 v8::External::New(pIsolate, | 425 v8::External::New(pIsolate, |
| 426 const_cast<FXJSE_CLASS_DESCRIPTOR*>(lpClassDefinition)), | 426 const_cast<FXJSE_CLASS_DESCRIPTOR*>(lpClassDefinition)), |
| 427 v8::PropertyHandlerFlags::kNonMasking); | 427 v8::PropertyHandlerFlags::kNonMasking); |
| 428 hObjectTemplate->SetHandler(configuration); | 428 hObjectTemplate->SetHandler(configuration); |
| 429 } | 429 } |
| 430 | 430 |
| 431 CFXJSE_Class::CFXJSE_Class(CFXJSE_Context* lpContext) | 431 CFXJSE_Class::CFXJSE_Class(CFXJSE_Context* lpContext) |
| 432 : m_lpClassDefinition(nullptr), m_pContext(lpContext) {} | 432 : m_lpClassDefinition(nullptr), m_pContext(lpContext) {} |
| 433 | 433 |
| 434 CFXJSE_Class::~CFXJSE_Class() {} | 434 CFXJSE_Class::~CFXJSE_Class() {} |
| OLD | NEW |