OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "../../include/javascript/JavaScript.h" | 7 #include "../../include/javascript/JavaScript.h" |
8 #include "../../include/javascript/IJavaScript.h" | 8 #include "../../include/javascript/IJavaScript.h" |
9 #include "../../include/javascript/JS_Define.h" | 9 #include "../../include/javascript/JS_Define.h" |
10 #include "../../include/javascript/JS_Object.h" | 10 #include "../../include/javascript/JS_Object.h" |
(...skipping 1916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1927 CJS_Context* pContext = (CJS_Context*)cc; | 1927 CJS_Context* pContext = (CJS_Context*)cc; |
1928 ASSERT(pContext != NULL); | 1928 ASSERT(pContext != NULL); |
1929 | 1929 |
1930 if (params.size() != 2) { | 1930 if (params.size() != 2) { |
1931 sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR); | 1931 sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR); |
1932 return FALSE; | 1932 return FALSE; |
1933 } | 1933 } |
1934 | 1934 |
1935 CJS_Value params1 = params[1]; | 1935 CJS_Value params1 = params[1]; |
1936 | 1936 |
1937 if (!params1.IsArrayObject() && params1.GetType() != VT_string) { | 1937 if (!params1.IsArrayObject() && params1.GetType() != CJS_Value::VT_string) { |
1938 sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR); | 1938 sError = JSGetStringFromID(pContext, IDS_STRING_JSPARAMERROR); |
1939 return FALSE; | 1939 return FALSE; |
1940 } | 1940 } |
1941 | 1941 |
1942 CPDFSDK_Document* pReaderDoc = pContext->GetReaderDocument(); | 1942 CPDFSDK_Document* pReaderDoc = pContext->GetReaderDocument(); |
1943 ASSERT(pReaderDoc != NULL); | 1943 ASSERT(pReaderDoc != NULL); |
1944 | 1944 |
1945 CPDFSDK_InterForm* pReaderInterForm = pReaderDoc->GetInterForm(); | 1945 CPDFSDK_InterForm* pReaderInterForm = pReaderDoc->GetInterForm(); |
1946 ASSERT(pReaderInterForm != NULL); | 1946 ASSERT(pReaderInterForm != NULL); |
1947 | 1947 |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2118 nums.SetElement(nIndex, CJS_Value(isolate, sPart.c_str())); | 2118 nums.SetElement(nIndex, CJS_Value(isolate, sPart.c_str())); |
2119 } | 2119 } |
2120 | 2120 |
2121 if (nums.GetLength() > 0) | 2121 if (nums.GetLength() > 0) |
2122 vRet = nums; | 2122 vRet = nums; |
2123 else | 2123 else |
2124 vRet.SetNull(); | 2124 vRet.SetNull(); |
2125 | 2125 |
2126 return TRUE; | 2126 return TRUE; |
2127 } | 2127 } |
OLD | NEW |