From 135b99861d0d898850754a845f607ec48f0bcccc Mon Sep 17 00:00:00 2001 From: tsepez Date: Fri, 5 Aug 2016 09:32:50 -0700 Subject: Return v8::Date specialization not v8::Value where possible Also get rid of FXJS_ValueCopy() while we're at it. BUG=pdfium:556 Review-Url: https://codereview.chromium.org/2215093002 --- fxjs/fxjs_v8.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'fxjs/fxjs_v8.cpp') diff --git a/fxjs/fxjs_v8.cpp b/fxjs/fxjs_v8.cpp index 65778859a3..d161af6281 100644 --- a/fxjs/fxjs_v8.cpp +++ b/fxjs/fxjs_v8.cpp @@ -758,8 +758,10 @@ v8::Local FXJS_NewNull(v8::Isolate* pIsolate) { return v8::Local(); } -v8::Local FXJS_NewDate(v8::Isolate* pIsolate, double d) { - return v8::Date::New(pIsolate->GetCurrentContext(), d).ToLocalChecked(); +v8::Local FXJS_NewDate(v8::Isolate* pIsolate, double d) { + return v8::Date::New(pIsolate->GetCurrentContext(), d) + .ToLocalChecked() + .As(); } int FXJS_ToInt32(v8::Isolate* pIsolate, v8::Local pValue) { @@ -807,7 +809,3 @@ v8::Local FXJS_ToArray(v8::Isolate* pIsolate, v8::Local context = pIsolate->GetCurrentContext(); return v8::Local::Cast(pValue->ToObject(context).ToLocalChecked()); } - -void FXJS_ValueCopy(v8::Local& pTo, v8::Local pFrom) { - pTo = pFrom; -} -- cgit v1.2.3