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

Side by Side Diff: xfa/fxjse/value.h

Issue 1857713003: Rename GetCStr and GetPtr to match CFX_ByteString (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 8 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 | « xfa/fxjse/dynprop.cpp ('k') | xfa/fxjse/value.cpp » ('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 #ifndef XFA_FXJSE_VALUE_H_ 7 #ifndef XFA_FXJSE_VALUE_H_
8 #define XFA_FXJSE_VALUE_H_ 8 #define XFA_FXJSE_VALUE_H_
9 9
10 #include "xfa/fxjse/scope_inline.h" 10 #include "xfa/fxjse/scope_inline.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 m_hValue.Reset(m_pIsolate, hValue); 173 m_hValue.Reset(m_pIsolate, hValue);
174 } 174 }
175 V8_INLINE void SetDouble(double dDouble) { 175 V8_INLINE void SetDouble(double dDouble) {
176 CFXJSE_ScopeUtil_IsolateHandle scope(m_pIsolate); 176 CFXJSE_ScopeUtil_IsolateHandle scope(m_pIsolate);
177 v8::Local<v8::Value> hValue = v8::Number::New(m_pIsolate, dDouble); 177 v8::Local<v8::Value> hValue = v8::Number::New(m_pIsolate, dDouble);
178 m_hValue.Reset(m_pIsolate, hValue); 178 m_hValue.Reset(m_pIsolate, hValue);
179 } 179 }
180 V8_INLINE void SetString(const CFX_ByteStringC& szString) { 180 V8_INLINE void SetString(const CFX_ByteStringC& szString) {
181 CFXJSE_ScopeUtil_IsolateHandle scope(m_pIsolate); 181 CFXJSE_ScopeUtil_IsolateHandle scope(m_pIsolate);
182 v8::Local<v8::Value> hValue = v8::String::NewFromUtf8( 182 v8::Local<v8::Value> hValue = v8::String::NewFromUtf8(
183 m_pIsolate, reinterpret_cast<const char*>(szString.GetPtr()), 183 m_pIsolate, reinterpret_cast<const char*>(szString.raw_str()),
184 v8::String::kNormalString, szString.GetLength()); 184 v8::String::kNormalString, szString.GetLength());
185 m_hValue.Reset(m_pIsolate, hValue); 185 m_hValue.Reset(m_pIsolate, hValue);
186 } 186 }
187 V8_INLINE void SetFloat(FX_FLOAT fFloat); 187 V8_INLINE void SetFloat(FX_FLOAT fFloat);
188 V8_INLINE void SetJSObject() { 188 V8_INLINE void SetJSObject() {
189 CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate); 189 CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate);
190 v8::Local<v8::Value> hValue = v8::Object::New(m_pIsolate); 190 v8::Local<v8::Value> hValue = v8::Object::New(m_pIsolate);
191 m_hValue.Reset(m_pIsolate, hValue); 191 m_hValue.Reset(m_pIsolate, hValue);
192 } 192 }
193 void SetHostObject(void* lpObject, CFXJSE_Class* lpClass); 193 void SetHostObject(void* lpObject, CFXJSE_Class* lpClass);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 static CFXJSE_Value* Create(v8::Isolate* pIsolate); 232 static CFXJSE_Value* Create(v8::Isolate* pIsolate);
233 233
234 protected: 234 protected:
235 v8::Isolate* m_pIsolate; 235 v8::Isolate* m_pIsolate;
236 v8::Global<v8::Value> m_hValue; 236 v8::Global<v8::Value> m_hValue;
237 friend class CFXJSE_Context; 237 friend class CFXJSE_Context;
238 friend class CFXJSE_Class; 238 friend class CFXJSE_Class;
239 }; 239 };
240 240
241 #endif // XFA_FXJSE_VALUE_H_ 241 #endif // XFA_FXJSE_VALUE_H_
OLDNEW
« no previous file with comments | « xfa/fxjse/dynprop.cpp ('k') | xfa/fxjse/value.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698