Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(460)

Unified Diff: fpdfsdk/javascript/JS_Value.cpp

Issue 1883273003: Pass WideStrings without narrowing to c_str in javascript/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Missed one caller. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/javascript/JS_Value.h ('k') | fpdfsdk/javascript/PublicMethods.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/javascript/JS_Value.cpp
diff --git a/fpdfsdk/javascript/JS_Value.cpp b/fpdfsdk/javascript/JS_Value.cpp
index 0b31494b75c5f7da417b8178dbcc1574783979a0..e2c990c51ccb477a72dab424bb3dcdab853e6689 100644
--- a/fpdfsdk/javascript/JS_Value.cpp
+++ b/fpdfsdk/javascript/JS_Value.cpp
@@ -787,7 +787,7 @@ int JS_GetSecFromTime(double dt) {
return (int)_Mod(floor(dt / 1000), 60);
}
-double JS_DateParse(const wchar_t* str) {
+double JS_DateParse(const CFX_WideString& str) {
v8::Isolate* pIsolate = v8::Isolate::GetCurrent();
v8::Isolate::Scope isolate_scope(pIsolate);
v8::HandleScope scope(pIsolate);
@@ -809,7 +809,6 @@ double JS_DateParse(const wchar_t* str) {
.ToLocalChecked();
if (v->IsFunction()) {
v8::Local<v8::Function> funC = v8::Local<v8::Function>::Cast(v);
-
const int argc = 1;
v8::Local<v8::String> timeStr = FXJS_WSToJSString(pIsolate, str);
v8::Local<v8::Value> argv[argc] = {timeStr};
« no previous file with comments | « fpdfsdk/javascript/JS_Value.h ('k') | fpdfsdk/javascript/PublicMethods.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698