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

Side by Side Diff: fpdfsdk/src/jsapi/fxjs_v8.cpp

Issue 1277043002: XFA: clang-format all pdfium code, again. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 4 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
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 "../../../core/include/fxcrt/fx_basic.h" 7 #include "../../../core/include/fxcrt/fx_basic.h"
8 #include "../../../core/include/fxcrt/fx_ext.h" 8 #include "../../../core/include/fxcrt/fx_ext.h"
9 #include "../../include/jsapi/fxjs_v8.h" 9 #include "../../include/jsapi/fxjs_v8.h"
10 #include "../../include/fsdk_define.h" 10 #include "../../include/fsdk_define.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 LP_CONSTRUCTOR pConstructor, 81 LP_CONSTRUCTOR pConstructor,
82 LP_DESTRUCTOR pDestructor) { 82 LP_DESTRUCTOR pDestructor) {
83 v8::Isolate* isolate = (v8::Isolate*)pJSRuntime; 83 v8::Isolate* isolate = (v8::Isolate*)pJSRuntime;
84 v8::Isolate::Scope isolate_scope(isolate); 84 v8::Isolate::Scope isolate_scope(isolate);
85 v8::HandleScope handle_scope(isolate); 85 v8::HandleScope handle_scope(isolate);
86 CFX_PtrArray* pArray = (CFX_PtrArray*)isolate->GetData(g_embedderDataSlot); 86 CFX_PtrArray* pArray = (CFX_PtrArray*)isolate->GetData(g_embedderDataSlot);
87 if (!pArray) { 87 if (!pArray) {
88 pArray = new CFX_PtrArray(); 88 pArray = new CFX_PtrArray();
89 isolate->SetData(g_embedderDataSlot, pArray); 89 isolate->SetData(g_embedderDataSlot, pArray);
90 } 90 }
91 CJS_ObjDefintion* pObjDef = new CJS_ObjDefintion( 91 CJS_ObjDefintion* pObjDef = new CJS_ObjDefintion(isolate, sObjName, eObjType,
92 isolate, sObjName, eObjType, pConstructor, pDestructor); 92 pConstructor, pDestructor);
93 pArray->Add(pObjDef); 93 pArray->Add(pObjDef);
94 return pArray->GetSize() - 1; 94 return pArray->GetSize() - 1;
95 } 95 }
96 96
97 int JS_DefineObjMethod(IJS_Runtime* pJSRuntime, 97 int JS_DefineObjMethod(IJS_Runtime* pJSRuntime,
98 int nObjDefnID, 98 int nObjDefnID,
99 const wchar_t* sMethodName, 99 const wchar_t* sMethodName,
100 v8::FunctionCallback pMethodCall) { 100 v8::FunctionCallback pMethodCall) {
101 v8::Isolate* isolate = (v8::Isolate*)pJSRuntime; 101 v8::Isolate* isolate = (v8::Isolate*)pJSRuntime;
102 v8::Isolate::Scope isolate_scope(isolate); 102 v8::Isolate::Scope isolate_scope(isolate);
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 1177
1178 bool JS_PortIsNan(double d) { 1178 bool JS_PortIsNan(double d) {
1179 return d != d; 1179 return d != d;
1180 } 1180 }
1181 1181
1182 double JS_LocalTime(double d) { 1182 double JS_LocalTime(double d) {
1183 return JS_GetDateTime() + _getDaylightSavingTA(d); 1183 return JS_GetDateTime() + _getDaylightSavingTA(d);
1184 } 1184 }
1185 1185
1186 // JavaScript time implement End. 1186 // JavaScript time implement End.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698