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

Unified Diff: fxjs/fxjs_v8.cpp

Issue 2154503002: Remove type info from CJS_Value, interrogate v8 instead (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: nit Created 4 years, 5 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/global.cpp ('k') | fxjs/include/fxjs_v8.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fxjs/fxjs_v8.cpp
diff --git a/fxjs/fxjs_v8.cpp b/fxjs/fxjs_v8.cpp
index 8595ac8a71bfe955e35ba7f7877bbef7276c0493..65778859a308612e6ba4dbb0501efd5d5a13882d 100644
--- a/fxjs/fxjs_v8.cpp
+++ b/fxjs/fxjs_v8.cpp
@@ -10,15 +10,6 @@
#include "core/fxcrt/include/fx_basic.h"
-const wchar_t kFXJSValueNameString[] = L"string";
-const wchar_t kFXJSValueNameNumber[] = L"number";
-const wchar_t kFXJSValueNameBoolean[] = L"boolean";
-const wchar_t kFXJSValueNameDate[] = L"date";
-const wchar_t kFXJSValueNameObject[] = L"object";
-const wchar_t kFXJSValueNameFxobj[] = L"fxobj";
-const wchar_t kFXJSValueNameNull[] = L"null";
-const wchar_t kFXJSValueNameUndefined[] = L"undefined";
-
// Keep this consistent with the values defined in gin/public/context_holder.h
// (without actually requiring a dependency on gin itself for the standalone
// embedders of PDFIum). The value we want to use is:
@@ -551,26 +542,6 @@ void FXJS_Error(v8::Isolate* pIsolate, const CFX_WideString& message) {
.ToLocalChecked());
}
-const wchar_t* FXJS_GetTypeof(v8::Local<v8::Value> pObj) {
- if (pObj.IsEmpty())
- return nullptr;
- if (pObj->IsString())
- return kFXJSValueNameString;
- if (pObj->IsNumber())
- return kFXJSValueNameNumber;
- if (pObj->IsBoolean())
- return kFXJSValueNameBoolean;
- if (pObj->IsDate())
- return kFXJSValueNameDate;
- if (pObj->IsObject())
- return kFXJSValueNameObject;
- if (pObj->IsNull())
- return kFXJSValueNameNull;
- if (pObj->IsUndefined())
- return kFXJSValueNameUndefined;
- return nullptr;
-}
-
void FXJS_SetPrivate(v8::Isolate* pIsolate,
v8::Local<v8::Object> pObj,
void* p) {
« no previous file with comments | « fpdfsdk/javascript/global.cpp ('k') | fxjs/include/fxjs_v8.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698