diff options
author | tsepez <tsepez@chromium.org> | 2016-07-15 17:58:02 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-15 17:58:02 -0700 |
commit | 40faa79da0bc902d7f1f5cc43464b94e6dfa5d22 (patch) | |
tree | 3e6ef034906a3cb46eb833b3e2309b34f7549c1d /fxjs/fxjs_v8.cpp | |
parent | 514e8c914c0e6c2c69167d03786a83b1ebd15d70 (diff) | |
download | pdfium-40faa79da0bc902d7f1f5cc43464b94e6dfa5d22.tar.xz |
Remove type info from CJS_Value, interrogate v8 instead
Review-Url: https://codereview.chromium.org/2154503002
Diffstat (limited to 'fxjs/fxjs_v8.cpp')
-rw-r--r-- | fxjs/fxjs_v8.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/fxjs/fxjs_v8.cpp b/fxjs/fxjs_v8.cpp index 8595ac8a71..65778859a3 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) { |