summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/global.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-04-27 11:31:26 -0700
committerTom Sepez <tsepez@chromium.org>2015-04-27 11:31:26 -0700
commitf7a7d7e07396c3a0fae617ed8f15f29fd491bc3a (patch)
tree53e22c58375eb36abe97f5b8f2631b4eba111fbc /fpdfsdk/src/javascript/global.cpp
parent15a62973b9b89c3e229cc0ab501c45967f91b325 (diff)
downloadpdfium-f7a7d7e07396c3a0fae617ed8f15f29fd491bc3a.tar.xz
Revert "Kill operator LPCWSTR from CFX_WideString()."
This reverts commit 15a62973b9b89c3e229cc0ab501c45967f91b325. Reason for revert: broke build on windows, mac. I must have missed some platform-specific conversions. TBR=brucedawson@chromium.org Review URL: https://codereview.chromium.org/1108883002
Diffstat (limited to 'fpdfsdk/src/javascript/global.cpp')
-rw-r--r--fpdfsdk/src/javascript/global.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/fpdfsdk/src/javascript/global.cpp b/fpdfsdk/src/javascript/global.cpp
index 418508f89e..c3d11b0a84 100644
--- a/fpdfsdk/src/javascript/global.cpp
+++ b/fpdfsdk/src/javascript/global.cpp
@@ -297,18 +297,18 @@ void global_alternate::UpdateGlobalPersistentVariables()
case JS_GLOBALDATA_TYPE_NUMBER:
this->SetGlobalVariables(pData->data.sKey, JS_GLOBALDATA_TYPE_NUMBER, pData->data.dData, false, "", v8::Handle<v8::Object>(), pData->bPersistent == 1);
JS_PutObjectNumber(NULL,(JSFXObject)(*m_pJSObject),
- pData->data.sKey.UTF8Decode().c_str(), pData->data.dData);
+ pData->data.sKey.UTF8Decode(), pData->data.dData);
break;
case JS_GLOBALDATA_TYPE_BOOLEAN:
this->SetGlobalVariables(pData->data.sKey, JS_GLOBALDATA_TYPE_BOOLEAN, 0, (bool)(pData->data.bData == 1), "", v8::Handle<v8::Object>(), pData->bPersistent == 1);
JS_PutObjectBoolean(NULL,(JSFXObject)(*m_pJSObject),
- pData->data.sKey.UTF8Decode().c_str(), (bool)(pData->data.bData == 1));
+ pData->data.sKey.UTF8Decode(), (bool)(pData->data.bData == 1));
break;
case JS_GLOBALDATA_TYPE_STRING:
this->SetGlobalVariables(pData->data.sKey, JS_GLOBALDATA_TYPE_STRING, 0, false, pData->data.sData, v8::Handle<v8::Object>(), pData->bPersistent == 1);
- JS_PutObjectString(NULL, (JSFXObject)(*m_pJSObject),
- pData->data.sKey.UTF8Decode().c_str(),
- pData->data.sData.UTF8Decode().c_str());
+ JS_PutObjectString(NULL,(JSFXObject)(*m_pJSObject),
+ pData->data.sKey.UTF8Decode(),
+ pData->data.sData.UTF8Decode());
break;
case JS_GLOBALDATA_TYPE_OBJECT:
{
@@ -320,13 +320,13 @@ void global_alternate::UpdateGlobalPersistentVariables()
this->SetGlobalVariables(pData->data.sKey, JS_GLOBALDATA_TYPE_OBJECT, 0, false, "",
(JSObject)pObj, pData->bPersistent == 1);
JS_PutObjectObject(NULL,(JSFXObject)(*m_pJSObject),
- pData->data.sKey.UTF8Decode().c_str(), (JSObject)pObj);
+ pData->data.sKey.UTF8Decode(), (JSObject)pObj);
}
break;
case JS_GLOBALDATA_TYPE_NULL:
this->SetGlobalVariables(pData->data.sKey, JS_GLOBALDATA_TYPE_NULL, 0, false, "", v8::Handle<v8::Object>(), pData->bPersistent == 1);
JS_PutObjectNull(NULL,(JSFXObject)(*m_pJSObject),
- pData->data.sKey.UTF8Decode().c_str());
+ pData->data.sKey.UTF8Decode());
break;
}
}
@@ -466,24 +466,24 @@ void global_alternate::PutObjectProperty(v8::Handle<v8::Object> pObj, CJS_KeyVal
switch (pObjData->nType)
{
case JS_GLOBALDATA_TYPE_NUMBER:
- JS_PutObjectNumber(NULL,(JSObject)pObj, pObjData->sKey.UTF8Decode().c_str(), pObjData->dData);
+ JS_PutObjectNumber(NULL,(JSObject)pObj, pObjData->sKey.UTF8Decode(), pObjData->dData);
break;
case JS_GLOBALDATA_TYPE_BOOLEAN:
- JS_PutObjectBoolean(NULL,(JSObject)pObj, pObjData->sKey.UTF8Decode().c_str(), (bool)(pObjData->bData == 1));
+ JS_PutObjectBoolean(NULL,(JSObject)pObj, pObjData->sKey.UTF8Decode(), (bool)(pObjData->bData == 1));
break;
case JS_GLOBALDATA_TYPE_STRING:
- JS_PutObjectString(NULL,(JSObject)pObj, pObjData->sKey.UTF8Decode().c_str(), pObjData->sData.UTF8Decode().c_str());
+ JS_PutObjectString(NULL,(JSObject)pObj, pObjData->sKey.UTF8Decode(), pObjData->sData.UTF8Decode());
break;
case JS_GLOBALDATA_TYPE_OBJECT:
{
IJS_Runtime* pRuntime = JS_GetRuntime((JSFXObject)(*m_pJSObject));
v8::Handle<v8::Object> pNewObj = JS_NewFxDynamicObj(pRuntime, NULL, -1);
PutObjectProperty(pNewObj, pObjData);
- JS_PutObjectObject(NULL, (JSObject)pObj, pObjData->sKey.UTF8Decode().c_str(), (JSObject)pNewObj);
+ JS_PutObjectObject(NULL, (JSObject)pObj, pObjData->sKey.UTF8Decode(), (JSObject)pNewObj);
}
break;
case JS_GLOBALDATA_TYPE_NULL:
- JS_PutObjectNull(NULL,(JSObject)pObj, pObjData->sKey.UTF8Decode().c_str());
+ JS_PutObjectNull(NULL,(JSObject)pObj, pObjData->sKey.UTF8Decode());
break;
}
}