summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/JS_Define.h
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-08-10 06:29:29 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-10 06:29:29 -0700
commitf3dc8c6941635e5c4cc20c8388289f6b148dc9eb (patch)
tree2e56d2707bed8383cb7950ea4ccda65f3bc30e71 /fpdfsdk/javascript/JS_Define.h
parent85af2a3cfcdfb2200510d337bfbf5b405858aa3b (diff)
downloadpdfium-f3dc8c6941635e5c4cc20c8388289f6b148dc9eb.tar.xz
Remove backpointer to CJS_Runtime from CJS_Value
Review-Url: https://codereview.chromium.org/2227673005
Diffstat (limited to 'fpdfsdk/javascript/JS_Define.h')
-rw-r--r--fpdfsdk/javascript/JS_Define.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/fpdfsdk/javascript/JS_Define.h b/fpdfsdk/javascript/JS_Define.h
index e120758c60..4c24a4de7b 100644
--- a/fpdfsdk/javascript/JS_Define.h
+++ b/fpdfsdk/javascript/JS_Define.h
@@ -92,7 +92,7 @@ void JSPropGetter(const char* prop_name_string,
sError));
return;
}
- info.GetReturnValue().Set(value.ToV8Value());
+ info.GetReturnValue().Set(value.GetJSValue()->ToV8Value(isolate));
}
template <class C,
@@ -111,7 +111,7 @@ void JSPropSetter(const char* prop_name_string,
CJS_Object* pJSObj = (CJS_Object*)FXJS_GetPrivate(isolate, info.Holder());
C* pObj = reinterpret_cast<C*>(pJSObj->GetEmbedObject());
CFX_WideString sError;
- CJS_PropValue propValue(CJS_Value(pRuntime, value));
+ CJS_PropValue propValue(pRuntime, CJS_Value(pRuntime, value));
propValue.StartSetting();
if (!(pObj->*M)(pContext, propValue, sError)) {
FXJS_Error(isolate, JSFormatErrorString(class_name_string, prop_name_string,
@@ -160,7 +160,7 @@ void JSMethod(const char* method_name_string,
method_name_string, sError));
return;
}
- info.GetReturnValue().Set(valueRes.ToV8Value());
+ info.GetReturnValue().Set(valueRes.ToV8Value(isolate));
}
#define JS_STATIC_METHOD(method_name, class_name) \
@@ -383,7 +383,7 @@ void JSSpecialPropGet(const char* class_name,
FXJS_Error(isolate, JSFormatErrorString(class_name, "GetProperty", sError));
return;
}
- info.GetReturnValue().Set(value.ToV8Value());
+ info.GetReturnValue().Set(value.GetJSValue()->ToV8Value(isolate));
}
template <class Alt>
@@ -404,7 +404,7 @@ void JSSpecialPropPut(const char* class_name,
CFX_WideString propname = CFX_WideString::FromUTF8(
CFX_ByteStringC(*utf8_value, utf8_value.length()));
CFX_WideString sError;
- CJS_PropValue PropValue(CJS_Value(pRuntime, value));
+ CJS_PropValue PropValue(pRuntime, CJS_Value(pRuntime, value));
PropValue.StartSetting();
if (!pObj->DoProperty(pContext, propname.c_str(), PropValue, sError)) {
FXJS_Error(isolate, JSFormatErrorString(class_name, "PutProperty", sError));
@@ -456,7 +456,7 @@ void JSGlobalFunc(const char* func_name_string,
JSFormatErrorString(func_name_string, nullptr, sError));
return;
}
- info.GetReturnValue().Set(valueRes.ToV8Value());
+ info.GetReturnValue().Set(valueRes.ToV8Value(pRuntime->GetIsolate()));
}
#define JS_STATIC_GLOBAL_FUN(fun_name) \