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

Side by Side Diff: src/regexp-stack.cc

Issue 23493019: remove most Isolate::Current asserts (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 21 matching lines...) Expand all
32 namespace internal { 32 namespace internal {
33 33
34 RegExpStackScope::RegExpStackScope(Isolate* isolate) 34 RegExpStackScope::RegExpStackScope(Isolate* isolate)
35 : regexp_stack_(isolate->regexp_stack()) { 35 : regexp_stack_(isolate->regexp_stack()) {
36 // Initialize, if not already initialized. 36 // Initialize, if not already initialized.
37 regexp_stack_->EnsureCapacity(0); 37 regexp_stack_->EnsureCapacity(0);
38 } 38 }
39 39
40 40
41 RegExpStackScope::~RegExpStackScope() { 41 RegExpStackScope::~RegExpStackScope() {
42 ASSERT(Isolate::Current() == regexp_stack_->isolate_);
43 // Reset the buffer if it has grown. 42 // Reset the buffer if it has grown.
44 regexp_stack_->Reset(); 43 regexp_stack_->Reset();
45 } 44 }
46 45
47 46
48 RegExpStack::RegExpStack() 47 RegExpStack::RegExpStack()
49 : isolate_(NULL) { 48 : isolate_(NULL) {
50 } 49 }
51 50
52 51
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 } 101 }
103 thread_local_.memory_ = new_memory; 102 thread_local_.memory_ = new_memory;
104 thread_local_.memory_size_ = size; 103 thread_local_.memory_size_ = size;
105 thread_local_.limit_ = new_memory + kStackLimitSlack * kPointerSize; 104 thread_local_.limit_ = new_memory + kStackLimitSlack * kPointerSize;
106 } 105 }
107 return thread_local_.memory_ + thread_local_.memory_size_; 106 return thread_local_.memory_ + thread_local_.memory_size_;
108 } 107 }
109 108
110 109
111 }} // namespace v8::internal 110 }} // namespace v8::internal
OLDNEW
« src/compiler.h ('K') | « src/regexp-macro-assembler.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698