summaryrefslogtreecommitdiff
path: root/xfa/fxjse
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxjse')
-rw-r--r--xfa/fxjse/cfxjse_arguments.h2
-rw-r--r--xfa/fxjse/class.cpp5
-rw-r--r--xfa/fxjse/include/fxjse.h2
-rw-r--r--xfa/fxjse/util_inline.h11
-rw-r--r--xfa/fxjse/value.cpp9
-rw-r--r--xfa/fxjse/value.h2
6 files changed, 10 insertions, 21 deletions
diff --git a/xfa/fxjse/cfxjse_arguments.h b/xfa/fxjse/cfxjse_arguments.h
index 423e22d888..d7b6734e14 100644
--- a/xfa/fxjse/cfxjse_arguments.h
+++ b/xfa/fxjse/cfxjse_arguments.h
@@ -18,7 +18,7 @@ class CFXJSE_Arguments {
int32_t GetInt32(int32_t index) const;
FX_FLOAT GetFloat(int32_t index) const;
CFX_ByteString GetUTF8String(int32_t index) const;
- void* GetObject(int32_t index, FXJSE_HCLASS hClass = nullptr) const;
+ void* GetObject(int32_t index) const;
FXJSE_HVALUE GetReturnValue();
};
diff --git a/xfa/fxjse/class.cpp b/xfa/fxjse/class.cpp
index ff5990aa85..18c542a65e 100644
--- a/xfa/fxjse/class.cpp
+++ b/xfa/fxjse/class.cpp
@@ -183,7 +183,7 @@ CFX_ByteString CFXJSE_Arguments::GetUTF8String(int32_t index) const {
return CFX_ByteString(*szStringVal);
}
-void* CFXJSE_Arguments::GetObject(int32_t index, FXJSE_HCLASS hClass) const {
+void* CFXJSE_Arguments::GetObject(int32_t index) const {
const CFXJSE_ArgumentsImpl* lpArguments =
reinterpret_cast<const CFXJSE_ArgumentsImpl* const>(this);
v8::Local<v8::Value> hValue = (*lpArguments->m_pInfo)[index];
@@ -191,8 +191,7 @@ void* CFXJSE_Arguments::GetObject(int32_t index, FXJSE_HCLASS hClass) const {
if (!hValue->IsObject()) {
return NULL;
}
- CFXJSE_Class* lpClass = reinterpret_cast<CFXJSE_Class*>(hClass);
- return FXJSE_RetrieveObjectBinding(hValue.As<v8::Object>(), lpClass);
+ return FXJSE_RetrieveObjectBinding(hValue.As<v8::Object>());
}
FXJSE_HVALUE CFXJSE_Arguments::GetReturnValue() {
diff --git a/xfa/fxjse/include/fxjse.h b/xfa/fxjse/include/fxjse.h
index d009372c54..fce1b969fb 100644
--- a/xfa/fxjse/include/fxjse.h
+++ b/xfa/fxjse/include/fxjse.h
@@ -103,7 +103,7 @@ FX_FLOAT FXJSE_Value_ToFloat(FXJSE_HVALUE hValue);
double FXJSE_Value_ToDouble(FXJSE_HVALUE hValue);
int32_t FXJSE_Value_ToInteger(FXJSE_HVALUE hValue);
void FXJSE_Value_ToUTF8String(FXJSE_HVALUE hValue, CFX_ByteString& szStrOutput);
-void* FXJSE_Value_ToObject(FXJSE_HVALUE hValue, FXJSE_HCLASS hClass);
+void* FXJSE_Value_ToObject(FXJSE_HVALUE hValue);
void FXJSE_Value_SetUndefined(FXJSE_HVALUE hValue);
void FXJSE_Value_SetNull(FXJSE_HVALUE hValue);
diff --git a/xfa/fxjse/util_inline.h b/xfa/fxjse/util_inline.h
index e61dc6aa80..336886b666 100644
--- a/xfa/fxjse/util_inline.h
+++ b/xfa/fxjse/util_inline.h
@@ -20,8 +20,7 @@ static V8_INLINE void FXJSE_UpdateObjectBinding(v8::Local<v8::Object>& hObject,
hObject->SetAlignedPointerInInternalField(0, lpNewBinding);
}
static V8_INLINE void* FXJSE_RetrieveObjectBinding(
- const v8::Local<v8::Object>& hJSObject,
- CFXJSE_Class* lpClass = NULL) {
+ const v8::Local<v8::Object>& hJSObject) {
ASSERT(!hJSObject.IsEmpty());
if (!hJSObject->IsObject()) {
return NULL;
@@ -37,14 +36,6 @@ static V8_INLINE void* FXJSE_RetrieveObjectBinding(
return NULL;
}
}
- if (lpClass) {
- v8::Local<v8::FunctionTemplate> hClass =
- v8::Local<v8::FunctionTemplate>::New(
- lpClass->GetContext()->GetRuntime(), lpClass->GetTemplate());
- if (!hClass->HasInstance(hObject)) {
- return NULL;
- }
- }
return hObject->GetAlignedPointerFromInternalField(0);
}
diff --git a/xfa/fxjse/value.cpp b/xfa/fxjse/value.cpp
index c23e12c32f..d3366cf08e 100644
--- a/xfa/fxjse/value.cpp
+++ b/xfa/fxjse/value.cpp
@@ -72,9 +72,8 @@ int32_t FXJSE_Value_ToInteger(FXJSE_HVALUE hValue) {
return reinterpret_cast<CFXJSE_Value*>(hValue)->ToInteger();
}
-void* FXJSE_Value_ToObject(FXJSE_HVALUE hValue, FXJSE_HCLASS hClass) {
- CFXJSE_Class* lpClass = reinterpret_cast<CFXJSE_Class*>(hClass);
- return reinterpret_cast<CFXJSE_Value*>(hValue)->ToObject(lpClass);
+void* FXJSE_Value_ToObject(FXJSE_HVALUE hValue) {
+ return reinterpret_cast<CFXJSE_Value*>(hValue)->ToObject();
}
void FXJSE_Value_SetUndefined(FXJSE_HVALUE hValue) {
@@ -238,7 +237,7 @@ CFXJSE_Value* CFXJSE_Value::Create(v8::Isolate* pIsolate) {
return new CFXJSE_Value(pIsolate);
}
-void* CFXJSE_Value::ToObject(CFXJSE_Class* lpClass) const {
+void* CFXJSE_Value::ToObject() const {
ASSERT(!m_hValue.IsEmpty());
CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate);
@@ -248,7 +247,7 @@ void* CFXJSE_Value::ToObject(CFXJSE_Class* lpClass) const {
if (!hValue->IsObject())
return nullptr;
- return FXJSE_RetrieveObjectBinding(hValue.As<v8::Object>(), lpClass);
+ return FXJSE_RetrieveObjectBinding(hValue.As<v8::Object>());
}
V8_INLINE static double FXJSE_ftod(FX_FLOAT fNumber) {
diff --git a/xfa/fxjse/value.h b/xfa/fxjse/value.h
index 2939ac34f7..12db5883cf 100644
--- a/xfa/fxjse/value.h
+++ b/xfa/fxjse/value.h
@@ -148,7 +148,7 @@ class CFXJSE_Value {
v8::String::Utf8Value hStringVal(hString);
szStrOutput = *hStringVal;
}
- void* ToObject(CFXJSE_Class* lpClass) const;
+ void* ToObject() const;
public:
V8_INLINE void SetUndefined() {