Fix memory leak in RegExpStack. (issue 11275037)

8 views
Skip to first unread message

ul...@chromium.org

unread,
Oct 25, 2012, 7:01:06 AM10/25/12
to yan...@chromium.org, v8-...@googlegroups.com
Reviewers: Yang,

Message:
PTAL

Description:
Fix memory leak in RegExpStack.

R=yan...@chromium.org


Please review this at https://chromiumcodereview.appspot.com/11275037/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
M src/regexp-stack.cc


Index: src/regexp-stack.cc
diff --git a/src/regexp-stack.cc b/src/regexp-stack.cc
index
ff9547f3a711ed0f44126aa624d421b734178bb8..fda7253edcee150a6cac9668e0f9db726bd135ce
100644
--- a/src/regexp-stack.cc
+++ b/src/regexp-stack.cc
@@ -72,7 +72,7 @@ char* RegExpStack::RestoreStack(char* from) {


void RegExpStack::Reset() {
- if (thread_local_.memory_size_ > kMinimumStackSize) {
+ if (thread_local_.memory_size_ >= kMinimumStackSize) {
DeleteArray(thread_local_.memory_);
thread_local_ = ThreadLocal();
}


yan...@chromium.org

unread,
Oct 25, 2012, 7:02:27 AM10/25/12
to ul...@chromium.org, v8-...@googlegroups.com
On 2012/10/25 11:01:06, ulan wrote:
> PTAL

LGTM.

https://chromiumcodereview.appspot.com/11275037/
Reply all
Reply to author
Forward
0 new messages