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

Side by Side Diff: fpdfsdk/src/javascript/PublicMethods.cpp

Issue 1347833002: Ensure functions in FXJS_V8 are prefixed by FXJS_. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, nits, format. Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « fpdfsdk/src/javascript/JS_Value.cpp ('k') | fpdfsdk/src/javascript/app.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/javascript/JS_Value.cpp ('k') | fpdfsdk/src/javascript/app.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698