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

Unified Diff: xfa/src/fxjse/src/context.cpp

Issue 1730553002: Fixing whitespace lint errors. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Review fixes Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/src/fxfa/src/parser/xfa_utils_imp.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/src/fxjse/src/context.cpp
diff --git a/xfa/src/fxjse/src/context.cpp b/xfa/src/fxjse/src/context.cpp
index 269e817cd622b62fdd5aac2e192ee2dc0b8c54e9..ba76cb2b191289a196d9a6ab616bb76375efed8b 100644
--- a/xfa/src/fxjse/src/context.cpp
+++ b/xfa/src/fxjse/src/context.cpp
@@ -40,15 +40,31 @@ FXJSE_HRUNTIME FXJSE_Context_GetRuntime(FXJSE_HCONTEXT hContext) {
: NULL;
}
static const FX_CHAR* szCompatibleModeScripts[] = {
- "(function (global, list) { 'use strict'; var objname; for (objname in list) { var globalobj = global[objname];\n\
- if (globalobj) { list[objname].forEach( function (name) { if (!globalobj[name]) { Object.defineProperty(globalobj, name, {writable: true, enumerable: false, value: \n\
- (function (obj) {\n\
- if (arguments.length === 0) {\n\
- throw new TypeError('missing argument 0 when calling function ' + objname + '.' + name);\n\
- }\n\
- return globalobj.prototype[name].apply(obj, Array.prototype.slice.call(arguments, 1));\n\
-})});}});}}}(this, {String: ['substr', 'toUpperCase']}));",
-};
+ "(function(global, list) {\n"
+ " 'use strict';\n"
+ " var objname;\n"
+ " for (objname in list) {\n"
+ " var globalobj = global[objname];\n"
+ " if (globalobj) {\n"
+ " list[objname].forEach(function(name) {\n"
+ " if (!globalobj[name]) {\n"
+ " Object.defineProperty(globalobj, name, {\n"
+ " writable: true,\n"
+ " enumerable: false,\n"
+ " value: (function(obj) {\n"
+ " if (arguments.length === 0) {\n"
+ " throw new TypeError('missing argument 0 when calling "
+ " function ' + objname + '.' + name);\n"
+ " }\n"
+ " return globalobj.prototype[name].apply(obj, "
+ " Array.prototype.slice.call(arguments, 1));\n"
+ " })\n"
+ " });\n"
+ " }\n"
+ " });\n"
+ " }\n"
+ " }\n"
+ "}(this, {String: ['substr', 'toUpperCase']}));"};
void FXJSE_Context_EnableCompatibleMode(FXJSE_HCONTEXT hContext,
FX_DWORD dwCompatibleFlags) {
for (uint32_t i = 0; i < (uint32_t)FXJSE_COMPATIBLEMODEFLAGCOUNT; i++) {
« no previous file with comments | « xfa/src/fxfa/src/parser/xfa_utils_imp.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698