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

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

Issue 2014863002: Revert of Remove parameters which are always null (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: 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 | « xfa/fxjse/util_inline.h ('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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 } 141 }
142 V8_INLINE void ToString(CFX_ByteString& szStrOutput) const { 142 V8_INLINE void ToString(CFX_ByteString& szStrOutput) const {
143 ASSERT(!m_hValue.IsEmpty()); 143 ASSERT(!m_hValue.IsEmpty());
144 CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate); 144 CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate);
145 v8::Local<v8::Value> hValue = 145 v8::Local<v8::Value> hValue =
146 v8::Local<v8::Value>::New(m_pIsolate, m_hValue); 146 v8::Local<v8::Value>::New(m_pIsolate, m_hValue);
147 v8::Local<v8::String> hString = hValue->ToString(); 147 v8::Local<v8::String> hString = hValue->ToString();
148 v8::String::Utf8Value hStringVal(hString); 148 v8::String::Utf8Value hStringVal(hString);
149 szStrOutput = *hStringVal; 149 szStrOutput = *hStringVal;
150 } 150 }
151 void* ToObject() const; 151 void* ToObject(CFXJSE_Class* lpClass) const;
152 152
153 public: 153 public:
154 V8_INLINE void SetUndefined() { 154 V8_INLINE void SetUndefined() {
155 CFXJSE_ScopeUtil_IsolateHandle scope(m_pIsolate); 155 CFXJSE_ScopeUtil_IsolateHandle scope(m_pIsolate);
156 v8::Local<v8::Value> hValue = v8::Undefined(m_pIsolate); 156 v8::Local<v8::Value> hValue = v8::Undefined(m_pIsolate);
157 m_hValue.Reset(m_pIsolate, hValue); 157 m_hValue.Reset(m_pIsolate, hValue);
158 } 158 }
159 V8_INLINE void SetNull() { 159 V8_INLINE void SetNull() {
160 CFXJSE_ScopeUtil_IsolateHandle scope(m_pIsolate); 160 CFXJSE_ScopeUtil_IsolateHandle scope(m_pIsolate);
161 v8::Local<v8::Value> hValue = v8::Null(m_pIsolate); 161 v8::Local<v8::Value> hValue = v8::Null(m_pIsolate);
(...skipping 70 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/util_inline.h ('k') | xfa/fxjse/value.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698