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

Unified Diff: fxjs/fxjs_v8.h

Issue 2637503002: Tidy FXJS_V8, backfill tests. (Closed)
Patch Set: rebase Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/javascript/global.cpp ('k') | fxjs/fxjs_v8.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fxjs/fxjs_v8.h
diff --git a/fxjs/fxjs_v8.h b/fxjs/fxjs_v8.h
index ba729626f245a542395cffc9bab624c34c71a244..6cf3ca578e3382ed9c8569ec6d1fef243c97fa40 100644
--- a/fxjs/fxjs_v8.h
+++ b/fxjs/fxjs_v8.h
@@ -176,6 +176,7 @@ class CFXJS_Engine {
v8::Local<v8::Context> NewLocalContext();
v8::Local<v8::Context> GetPersistentContext();
+ v8::Local<v8::Object> GetThisObj();
v8::Local<v8::Value> NewNull();
v8::Local<v8::Array> NewArray();
@@ -183,18 +184,18 @@ class CFXJS_Engine {
v8::Local<v8::Value> NewNumber(double number);
v8::Local<v8::Value> NewNumber(float number);
v8::Local<v8::Value> NewBoolean(bool b);
- v8::Local<v8::Value> NewString(const wchar_t* str);
+ v8::Local<v8::Value> NewString(const CFX_WideString& str);
v8::Local<v8::Date> NewDate(double d);
v8::Local<v8::Object> NewFxDynamicObj(int nObjDefnID, bool bStatic = false);
- v8::Local<v8::Object> GetThisObj();
int ToInt32(v8::Local<v8::Value> pValue);
bool ToBoolean(v8::Local<v8::Value> pValue);
- double ToNumber(v8::Local<v8::Value> pValue);
- CFX_WideString ToString(v8::Local<v8::Value> pValue);
+ double ToDouble(v8::Local<v8::Value> pValue);
+ CFX_WideString ToWideString(v8::Local<v8::Value> pValue);
v8::Local<v8::Object> ToObject(v8::Local<v8::Value> pValue);
v8::Local<v8::Array> ToArray(v8::Local<v8::Value> pValue);
+ // Arrays.
unsigned GetArrayLength(v8::Local<v8::Array> pArray);
v8::Local<v8::Value> GetArrayElement(v8::Local<v8::Array> pArray,
unsigned index);
@@ -202,31 +203,14 @@ class CFXJS_Engine {
unsigned index,
v8::Local<v8::Value> pValue);
+ // Objects.
std::vector<CFX_WideString> GetObjectPropertyNames(
v8::Local<v8::Object> pObj);
v8::Local<v8::Value> GetObjectProperty(v8::Local<v8::Object> pObj,
const CFX_WideString& PropertyName);
-
- void PutObjectString(v8::Local<v8::Object> pObj,
- const CFX_WideString& wsPropertyName,
- const CFX_WideString& wsValue);
- void PutObjectNumber(v8::Local<v8::Object> pObj,
- const CFX_WideString& PropertyName,
- int nValue);
- void PutObjectNumber(v8::Local<v8::Object> pObj,
- const CFX_WideString& PropertyName,
- float fValue);
- void PutObjectNumber(v8::Local<v8::Object> pObj,
- const CFX_WideString& PropertyName,
- double dValue);
- void PutObjectBoolean(v8::Local<v8::Object> pObj,
- const CFX_WideString& PropertyName,
- bool bValue);
- void PutObjectObject(v8::Local<v8::Object> pObj,
- const CFX_WideString& PropertyName,
- v8::Local<v8::Object> pPut);
- void PutObjectNull(v8::Local<v8::Object> pObj,
- const CFX_WideString& PropertyName);
+ void PutObjectProperty(v8::Local<v8::Object> pObj,
+ const CFX_WideString& PropertyName,
+ v8::Local<v8::Value> pValue);
// Native object binding.
void SetObjectPrivate(v8::Local<v8::Object> pObj, void* p);
« no previous file with comments | « fpdfsdk/javascript/global.cpp ('k') | fxjs/fxjs_v8.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698