Home | History | Annotate | Download | only in fm2js
      1 // Copyright 2017 PDFium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #include "xfa/fxfa/fm2js/cxfa_fmtojavascriptdepth.h"
      6 
      7 namespace {
      8 
      9 // Arbitarily picked by looking at how deep a translation got before hitting
     10 // the getting fuzzer memory limits. Should be larger then |kMaxParseDepth| in
     11 // cxfa_fmparser.cpp.
     12 const unsigned int kMaxDepth = 5000;
     13 
     14 }  // namespace
     15 
     16 unsigned long CXFA_FMToJavaScriptDepth::depth_ = 0;
     17 unsigned long CXFA_FMToJavaScriptDepth::max_depth_ = kMaxDepth;
     18 
     19 void CXFA_FMToJavaScriptDepth::Reset() {
     20   depth_ = 0;
     21 }
     22