diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-03-02 12:18:50 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-03-02 12:18:50 -0800 |
commit | b720d0a14601f1496ef15297bc46d401f5a2a890 (patch) | |
tree | d19c5604c1528646d992ffcd1beabe8279d5d4b3 /fpdfsdk/include/jsapi | |
parent | 944ccad72d028ed5e37f53c5c8c0888866905bc3 (diff) | |
download | pdfium-b720d0a14601f1496ef15297bc46d401f5a2a890.tar.xz |
Return error information from pdfium to JS.
This implements the previously unimplemented JS_Error() function.
Along the way:
- fix some IWYU when the include order in global.cpp was perturbed.
- remove some uses of JS_ErrorString, to increase transparency.
- use vp.IsSetting() in place of !vp.IsGetting() for clarity.
- specify an error string on several error return paths.
- add an error string for writing readonly properties.
- rename an error string constant to reflect the actual message.
- replace calls to variadic Format() with a function doing string appends.
- remove unused JS_GetClassName()
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/963193003
Diffstat (limited to 'fpdfsdk/include/jsapi')
-rw-r--r-- | fpdfsdk/include/jsapi/fxjs_v8.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fpdfsdk/include/jsapi/fxjs_v8.h b/fpdfsdk/include/jsapi/fxjs_v8.h index b6ea60be13..c7fdf87747 100644 --- a/fpdfsdk/include/jsapi/fxjs_v8.h +++ b/fpdfsdk/include/jsapi/fxjs_v8.h @@ -8,6 +8,7 @@ #define FXJSAPI_H #include <v8.h> +#include "../../core/include/fxcrt/fx_string.h" // For CFX_WideString enum FXJSOBJTYPE { @@ -66,11 +67,10 @@ v8::Handle<v8::Object> JS_GetThisObj(IJS_Runtime * pJSRuntime); int JS_GetObjDefnID(v8::Handle<v8::Object> pObj); IJS_Runtime* JS_GetRuntime(v8::Handle<v8::Object> pObj); int JS_GetObjDefnID(IJS_Runtime * pJSRuntime, const wchar_t* pObjName); -void JS_Error(v8::Value * pError,const wchar_t * main,const wchar_t * sub); +void JS_Error(v8::Isolate* isolate, const CFX_WideString& message); unsigned JS_CalcHash(const wchar_t* main, unsigned nLen); unsigned JS_CalcHash(const wchar_t* main); const wchar_t* JS_GetTypeof(v8::Handle<v8::Value> pObj); -const wchar_t* JS_GetClassname(v8::Handle<v8::Object> pObj); void JS_SetPrivate(IJS_Runtime* pJSRuntime, v8::Handle<v8::Object> pObj, void* p); void* JS_GetPrivate(IJS_Runtime* pJSRuntime, v8::Handle<v8::Object> pObj); void JS_SetPrivate(v8::Handle<v8::Object> pObj, void* p); |