From 5daf07afe5b76e702d053aaca648b977ec3bb663 Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Tue, 24 Oct 2017 21:46:57 -0400 Subject: Make NewNull return an actual Null This CL updates the CFXJS_Engine::NewNull method to return a real v8::Null instead of an empty v8::Local. This also adds a NewUndefined and returns undefined in most of the places null was returned previously. Change-Id: If1a96bf253057892a3b709cbc72f8825c52503c3 Reviewed-on: https://pdfium-review.googlesource.com/16730 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- fxjs/fxjs_v8.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'fxjs/fxjs_v8.cpp') diff --git a/fxjs/fxjs_v8.cpp b/fxjs/fxjs_v8.cpp index 4c6398870d..441848205f 100644 --- a/fxjs/fxjs_v8.cpp +++ b/fxjs/fxjs_v8.cpp @@ -664,7 +664,11 @@ v8::Local CFXJS_Engine::NewString(const WideStringView& str) { } v8::Local CFXJS_Engine::NewNull() { - return v8::Local(); + return v8::Null(m_isolate); +} + +v8::Local CFXJS_Engine::NewUndefined() { + return v8::Undefined(m_isolate); } v8::Local CFXJS_Engine::NewDate(double d) { -- cgit v1.2.3