diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-06-06 17:31:44 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-06-06 17:31:44 +0000 |
commit | 2f6a861d2082bff2fe1125445b84cc5f7e11b826 (patch) | |
tree | 3d807b4ff3791aa358bf016cec6ad966d143602e | |
parent | 4f01c0e5eb5f1054e003e34a690c8919ccd8642d (diff) | |
download | pdfium-2f6a861d2082bff2fe1125445b84cc5f7e11b826.tar.xz |
[xfa] Make class error description better
This CL changes the JS error produced by the CFXJSE_Class when a method
call returns with error. Instead of outputing something like:
JS Error: resolveNode.:
we will now get:
JS Error: Root.resolveNode:
which at least lets us know we're looking at the Root class.
Bug: pdfium:1097
Change-Id: I4982109398e290d9ebc2763fcc2421a642c581a5
Reviewed-on: https://pdfium-review.googlesource.com/34090
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
-rw-r--r-- | fxjs/cfxjse_class.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fxjs/cfxjse_class.cpp b/fxjs/cfxjse_class.cpp index c35ee4aa29..2a2e0da333 100644 --- a/fxjs/cfxjse_class.cpp +++ b/fxjs/cfxjse_class.cpp @@ -95,7 +95,8 @@ void DynPropGetterAdapter_MethodCallback( CJS_Return result = lpClass->dynMethodCall(info, szFxPropName); if (result.HasError()) { - WideString err = JSFormatErrorString(*szPropName, "", result.Error()); + WideString err = + JSFormatErrorString(lpClass->name, *szPropName, result.Error()); v8::MaybeLocal<v8::String> str = v8::String::NewFromUtf8( info.GetIsolate(), ByteString::FromUnicode(err).c_str(), v8::NewStringType::kNormal); |