Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: fxjse/class.cpp

Issue 2072803002: Make code compile with clang_use_chrome_plugin (final) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « BUILD.gn ('k') | fxjse/include/cfxjse_class.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "fxjse/include/cfxjse_class.h" 7 #include "fxjse/include/cfxjse_class.h"
8 8
9 #include "fxjse/context.h" 9 #include "fxjse/context.h"
10 #include "fxjse/include/cfxjse_arguments.h" 10 #include "fxjse/include/cfxjse_arguments.h"
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 v8::FunctionTemplate::New( 265 v8::FunctionTemplate::New(
266 pIsolate, FXJSE_Context_GlobalObjToString, 266 pIsolate, FXJSE_Context_GlobalObjToString,
267 v8::External::New(pIsolate, const_cast<FXJSE_CLASS_DESCRIPTOR*>( 267 v8::External::New(pIsolate, const_cast<FXJSE_CLASS_DESCRIPTOR*>(
268 lpClassDefinition)))); 268 lpClassDefinition))));
269 } 269 }
270 pClass->m_hTemplate.Reset(lpContext->m_pIsolate, hFunctionTemplate); 270 pClass->m_hTemplate.Reset(lpContext->m_pIsolate, hFunctionTemplate);
271 lpContext->m_rgClasses.push_back(std::unique_ptr<CFXJSE_Class>(pClass)); 271 lpContext->m_rgClasses.push_back(std::unique_ptr<CFXJSE_Class>(pClass));
272 return pClass; 272 return pClass;
273 } 273 }
274 274
275 CFXJSE_Class::CFXJSE_Class(CFXJSE_Context* lpContext)
276 : m_lpClassDefinition(nullptr), m_pContext(lpContext) {}
277
278 CFXJSE_Class::~CFXJSE_Class() {}
279
275 CFXJSE_Class* CFXJSE_Class::GetClassFromContext(CFXJSE_Context* pContext, 280 CFXJSE_Class* CFXJSE_Class::GetClassFromContext(CFXJSE_Context* pContext,
276 const CFX_ByteStringC& szName) { 281 const CFX_ByteStringC& szName) {
277 for (const auto& pClass : pContext->m_rgClasses) { 282 for (const auto& pClass : pContext->m_rgClasses) {
278 if (pClass->m_szClassName == szName) 283 if (pClass->m_szClassName == szName)
279 return pClass.get(); 284 return pClass.get();
280 } 285 }
281 return nullptr; 286 return nullptr;
282 } 287 }
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | fxjse/include/cfxjse_class.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698