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

Unified Diff: fxjs/fxjs_v8.cpp

Issue 2215093002: Return v8::Date specialization not v8::Value where possible (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: remove fxjs_valuecopy Created 4 years, 4 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
Index: fxjs/fxjs_v8.cpp
diff --git a/fxjs/fxjs_v8.cpp b/fxjs/fxjs_v8.cpp
index 65778859a308612e6ba4dbb0501efd5d5a13882d..d161af62819c68fe5b69d556c8e9457dfb6afa25 100644
--- a/fxjs/fxjs_v8.cpp
+++ b/fxjs/fxjs_v8.cpp
@@ -758,8 +758,10 @@ v8::Local<v8::Value> FXJS_NewNull(v8::Isolate* pIsolate) {
return v8::Local<v8::Value>();
}
-v8::Local<v8::Value> FXJS_NewDate(v8::Isolate* pIsolate, double d) {
- return v8::Date::New(pIsolate->GetCurrentContext(), d).ToLocalChecked();
+v8::Local<v8::Date> FXJS_NewDate(v8::Isolate* pIsolate, double d) {
+ return v8::Date::New(pIsolate->GetCurrentContext(), d)
+ .ToLocalChecked()
+ .As<v8::Date>();
}
int FXJS_ToInt32(v8::Isolate* pIsolate, v8::Local<v8::Value> pValue) {
@@ -807,7 +809,3 @@ v8::Local<v8::Array> FXJS_ToArray(v8::Isolate* pIsolate,
v8::Local<v8::Context> context = pIsolate->GetCurrentContext();
return v8::Local<v8::Array>::Cast(pValue->ToObject(context).ToLocalChecked());
}
-
-void FXJS_ValueCopy(v8::Local<v8::Value>& pTo, v8::Local<v8::Value> pFrom) {
- pTo = pFrom;
-}

Powered by Google App Engine
This is Rietveld 408576698