summaryrefslogtreecommitdiff
path: root/fpdfsdk/include
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-04-23 11:31:31 -0700
committerTom Sepez <tsepez@chromium.org>2015-04-23 11:31:31 -0700
commitf4ef3f92eb89a460a0715df758122ba662aadc39 (patch)
tree7b3d3533929299c587bb2ab52382430ea34960e6 /fpdfsdk/include
parentf99882e726d4a78e1b8fecad8b478276fbdf9c86 (diff)
downloadpdfium-f4ef3f92eb89a460a0715df758122ba662aadc39.tar.xz
Merge to XFA: Kill overloaded cast operators in CJS_Value.
Original Review URL: https://codereview.chromium.org/1096813008 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1106663002
Diffstat (limited to 'fpdfsdk/include')
-rw-r--r--fpdfsdk/include/javascript/JS_Define.h6
-rw-r--r--fpdfsdk/include/javascript/JS_Value.h20
2 files changed, 13 insertions, 13 deletions
diff --git a/fpdfsdk/include/javascript/JS_Define.h b/fpdfsdk/include/javascript/JS_Define.h
index 7175ece367..0c2574d26d 100644
--- a/fpdfsdk/include/javascript/JS_Define.h
+++ b/fpdfsdk/include/javascript/JS_Define.h
@@ -128,7 +128,7 @@ void JSMethod(const char* method_name_string,
JS_Error(isolate, JSFormatErrorString(class_name_string, method_name_string, sError));
return;
}
- info.GetReturnValue().Set(valueRes.ToJSValue());
+ info.GetReturnValue().Set(valueRes.ToV8Value());
}
#define JS_STATIC_METHOD(method_name, class_name) \
@@ -385,7 +385,7 @@ void JSGlobalFunc(const char *func_name_string,
JS_Error(isolate, JSFormatErrorString(func_name_string, nullptr, sError));
return;
}
- info.GetReturnValue().Set(valueRes.ToJSValue());
+ info.GetReturnValue().Set(valueRes.ToV8Value());
}
#define JS_STATIC_GLOBAL_FUN(fun_name) \
@@ -433,7 +433,7 @@ for (int i=0; i<size; i++) array.SetElement(i,CJS_Value(pRuntime,ArrayContent[i]
\
CJS_PropValue prop(pRuntime);\
prop << array;\
-if (JS_DefineGlobalConst(pRuntime, (const wchar_t*)ArrayName, prop.ToJSValue()) < 0)\
+if (JS_DefineGlobalConst(pRuntime, (const wchar_t*)ArrayName, prop.ToV8Value()) < 0)\
return -1
/* ============================================================ */
diff --git a/fpdfsdk/include/javascript/JS_Value.h b/fpdfsdk/include/javascript/JS_Value.h
index 1431349552..ecd0f832d4 100644
--- a/fpdfsdk/include/javascript/JS_Value.h
+++ b/fpdfsdk/include/javascript/JS_Value.h
@@ -39,16 +39,16 @@ public:
void Detach();
- operator int() const;
- operator bool() const;
- operator double() const;
- operator float() const;
- operator CJS_Object*() const;
- operator v8::Handle<v8::Object>() const;
- operator v8::Handle<v8::Array>() const;
- operator CFX_WideString() const;
- operator CFX_ByteString() const;
- v8::Handle<v8::Value> ToJSValue();
+ int ToInt() const;
+ bool ToBool() const;
+ double ToDouble() const;
+ float ToFloat() const;
+ CJS_Object* ToCJSObject() const;
+ CFX_WideString ToCFXWideString() const;
+ CFX_ByteString ToCFXByteString() const;
+ v8::Handle<v8::Object> ToV8Object() const;
+ v8::Handle<v8::Array> ToV8Array() const;
+ v8::Handle<v8::Value> ToV8Value() const;
void operator = (int iValue);
void operator = (bool bValue);