summaryrefslogtreecommitdiff
path: root/xfa/fxjse
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-04-05 11:02:18 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-05 11:02:18 -0700
commit179bebb9a14dfd3ba91e9e068d4d436657a7c780 (patch)
tree895a59bfcf85a4730badfb2a6df71cf8679a2249 /xfa/fxjse
parent4cd49e1c6076bd9ef2d18480d893038822668262 (diff)
downloadpdfium-179bebb9a14dfd3ba91e9e068d4d436657a7c780.tar.xz
Rename GetCStr and GetPtr to match CFX_ByteString.
This CL updates CFX_ByteStringC to use the more common c_str and raw_str instead of GetCStr and GetPtr. Review URL: https://codereview.chromium.org/1857713003
Diffstat (limited to 'xfa/fxjse')
-rw-r--r--xfa/fxjse/dynprop.cpp2
-rw-r--r--xfa/fxjse/value.cpp14
-rw-r--r--xfa/fxjse/value.h2
3 files changed, 9 insertions, 9 deletions
diff --git a/xfa/fxjse/dynprop.cpp b/xfa/fxjse/dynprop.cpp
index fc408ac000..498c6608cf 100644
--- a/xfa/fxjse/dynprop.cpp
+++ b/xfa/fxjse/dynprop.cpp
@@ -61,7 +61,7 @@ static void FXJSE_DynPropGetterAdapter(const FXJSE_CLASS* lpClass,
0, const_cast<FXJSE_CLASS*>(lpClass));
hCallBackInfo->SetInternalField(
1, v8::String::NewFromUtf8(
- pIsolate, reinterpret_cast<const char*>(szPropName.GetPtr()),
+ pIsolate, reinterpret_cast<const char*>(szPropName.raw_str()),
v8::String::kNormalString, szPropName.GetLength()));
lpValue->ForceSetValue(v8::Function::New(
lpValue->GetIsolate(), FXJSE_DynPropGetterAdapter_MethodCallback,
diff --git a/xfa/fxjse/value.cpp b/xfa/fxjse/value.cpp
index f9214813c2..cd3220a17a 100644
--- a/xfa/fxjse/value.cpp
+++ b/xfa/fxjse/value.cpp
@@ -249,7 +249,7 @@ void FXJSE_ThrowMessage(const CFX_ByteStringC& utf8Name,
CFXJSE_ScopeUtil_IsolateHandleRootContext scope(pIsolate);
v8::Local<v8::String> hMessage = v8::String::NewFromUtf8(
- pIsolate, utf8Message.GetCStr(), v8::String::kNormalString,
+ pIsolate, utf8Message.c_str(), v8::String::kNormalString,
utf8Message.GetLength());
v8::Local<v8::Value> hError;
@@ -266,7 +266,7 @@ void FXJSE_ThrowMessage(const CFX_ByteStringC& utf8Name,
if (utf8Name != "Error" && !utf8Name.IsEmpty()) {
hError.As<v8::Object>()->Set(
v8::String::NewFromUtf8(pIsolate, "name"),
- v8::String::NewFromUtf8(pIsolate, utf8Name.GetCStr(),
+ v8::String::NewFromUtf8(pIsolate, utf8Name.c_str(),
v8::String::kNormalString,
utf8Name.GetLength()));
}
@@ -378,7 +378,7 @@ FX_BOOL CFXJSE_Value::SetObjectProperty(const CFX_ByteStringC& szPropName,
v8::Local<v8::Value> hPropValue =
v8::Local<v8::Value>::New(m_pIsolate, lpPropValue->DirectGetValue());
return (FX_BOOL)hObject.As<v8::Object>()->Set(
- v8::String::NewFromUtf8(m_pIsolate, szPropName.GetCStr(),
+ v8::String::NewFromUtf8(m_pIsolate, szPropName.c_str(),
v8::String::kNormalString,
szPropName.GetLength()),
hPropValue);
@@ -394,7 +394,7 @@ FX_BOOL CFXJSE_Value::GetObjectProperty(const CFX_ByteStringC& szPropName,
v8::Local<v8::Value> hPropValue =
hObject.As<v8::Object>()->Get(v8::String::NewFromUtf8(
- m_pIsolate, szPropName.GetCStr(), v8::String::kNormalString,
+ m_pIsolate, szPropName.c_str(), v8::String::kNormalString,
szPropName.GetLength()));
lpPropValue->ForceSetValue(hPropValue);
return TRUE;
@@ -434,7 +434,7 @@ FX_BOOL CFXJSE_Value::DeleteObjectProperty(const CFX_ByteStringC& szPropName) {
return FALSE;
hObject.As<v8::Object>()->Delete(v8::String::NewFromUtf8(
- m_pIsolate, szPropName.GetCStr(), v8::String::kNormalString,
+ m_pIsolate, szPropName.c_str(), v8::String::kNormalString,
szPropName.GetLength()));
return TRUE;
}
@@ -448,7 +448,7 @@ FX_BOOL CFXJSE_Value::HasObjectOwnProperty(const CFX_ByteStringC& szPropName,
return FALSE;
v8::Local<v8::String> hKey = v8::String::NewFromUtf8(
- m_pIsolate, szPropName.GetCStr(), v8::String::kNormalString,
+ m_pIsolate, szPropName.c_str(), v8::String::kNormalString,
szPropName.GetLength());
return hObject.As<v8::Object>()->HasRealNamedProperty(hKey) ||
(bUseTypeGetter &&
@@ -470,7 +470,7 @@ FX_BOOL CFXJSE_Value::SetObjectOwnProperty(const CFX_ByteStringC& szPropName,
return hObject.As<v8::Object>()
->DefineOwnProperty(
m_pIsolate->GetCurrentContext(),
- v8::String::NewFromUtf8(m_pIsolate, szPropName.GetCStr(),
+ v8::String::NewFromUtf8(m_pIsolate, szPropName.c_str(),
v8::String::kNormalString,
szPropName.GetLength()),
hValue)
diff --git a/xfa/fxjse/value.h b/xfa/fxjse/value.h
index e728b8d857..2939ac34f7 100644
--- a/xfa/fxjse/value.h
+++ b/xfa/fxjse/value.h
@@ -180,7 +180,7 @@ class CFXJSE_Value {
V8_INLINE void SetString(const CFX_ByteStringC& szString) {
CFXJSE_ScopeUtil_IsolateHandle scope(m_pIsolate);
v8::Local<v8::Value> hValue = v8::String::NewFromUtf8(
- m_pIsolate, reinterpret_cast<const char*>(szString.GetPtr()),
+ m_pIsolate, reinterpret_cast<const char*>(szString.raw_str()),
v8::String::kNormalString, szString.GetLength());
m_hValue.Reset(m_pIsolate, hValue);
}