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

Unified Diff: Source/core/platform/text/RegularExpression.h

Issue 13950014: Revert "Switch RegularExpression from YARR to V8" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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 | « Source/core/html/BaseTextInputType.cpp ('k') | Source/core/platform/text/RegularExpression.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/text/RegularExpression.h
diff --git a/Source/core/platform/text/RegularExpression.h b/Source/core/platform/text/RegularExpression.h
index 2911b435af07292b66d9e2eb06b99873f8aba5da..ad2dadc6fc89c8d34e0802736cd67830d9c8ad18 100644
--- a/Source/core/platform/text/RegularExpression.h
+++ b/Source/core/platform/text/RegularExpression.h
@@ -1,6 +1,5 @@
/*
* Copyright (C) 2003, 2008, 2009 Apple Inc. All rights reserved.
- * Copyright (C) 2013 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -27,10 +26,11 @@
#ifndef RegularExpression_h
#define RegularExpression_h
-#include "ScopedPersistent.h"
+#include <wtf/BumpPointerAllocator.h>
#include <wtf/Noncopyable.h>
+#include <wtf/PassOwnPtr.h>
#include <wtf/text/WTFString.h>
-#include <v8.h>
+#include <yarr/Yarr.h>
namespace WebCore {
@@ -46,10 +46,12 @@ public:
int match(const String&, int startFrom = 0, int* matchLength = 0) const;
- bool isValid() const { return !m_regex.isEmpty(); }
-
private:
- ScopedPersistent<v8::RegExp> m_regex;
+ PassOwnPtr<JSC::Yarr::BytecodePattern> compile(const String&, TextCaseSensitivity, MultilineMode);
+
+ unsigned m_numSubpatterns;
+ OwnPtr<JSC::Yarr::BytecodePattern> m_regExpByteCode;
+ BumpPointerAllocator m_regexAllocator;
};
} // namespace WebCore
« no previous file with comments | « Source/core/html/BaseTextInputType.cpp ('k') | Source/core/platform/text/RegularExpression.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698