~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/3rdparty/webkit/JavaScriptCore/wrec/WREC.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
 
41
41
namespace JSC { namespace WREC {
42
42
 
43
 
// Patterns longer than this can hang the compiler.
44
 
static const int MaxPatternSize = (1 << 13);
45
 
 
46
43
CompiledRegExp Generator::compileRegExp(JSGlobalData* globalData, const UString& pattern, unsigned* numSubpatterns_ptr, const char** error_ptr, RefPtr<ExecutablePool>& pool, bool ignoreCase, bool multiline)
47
44
{
48
 
    if (pattern.size() > MaxPatternSize) {
 
45
    if (pattern.size() > MAX_PATTERN_SIZE) {
49
46
        *error_ptr = "regular expression too large";
50
47
        return 0;
51
48
    }
80
77
    }
81
78
 
82
79
    *numSubpatterns_ptr = parser.numSubpatterns();
83
 
    pool = globalData->poolForSize(generator.size());
 
80
    pool = globalData->executableAllocator.poolForSize(generator.size());
84
81
    return reinterpret_cast<CompiledRegExp>(generator.copyCode(pool.get()));
85
82
}
86
83