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

Unified Diff: src/frames.h

Issue 6791014: Revert r7483 "Move SafeStackFrameIterator::active_count_ into an isolate." (Closed)
Patch Set: Created 9 years, 9 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 | « no previous file | src/frames.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.h
diff --git a/src/frames.h b/src/frames.h
index b5969ced3ab6050e729f16aec29b4a38c96c621c..3294eeee26eb08d371d54de249d352f81b90f018 100644
--- a/src/frames.h
+++ b/src/frames.h
@@ -739,7 +739,7 @@ class SafeStackFrameIterator BASE_EMBEDDED {
void Advance();
void Reset();
- static bool is_active(Isolate* isolate);
+ static bool is_active() { return active_count_ > 0; }
static bool IsWithinBounds(
Address low_bound, Address high_bound, Address addr) {
@@ -786,13 +786,13 @@ class SafeStackFrameIterator BASE_EMBEDDED {
// heap objects.
class ActiveCountMaintainer BASE_EMBEDDED {
public:
- explicit ActiveCountMaintainer(Isolate* isolate);
- ~ActiveCountMaintainer();
- private:
- Isolate* isolate_;
+ ActiveCountMaintainer() { active_count_++; }
+ ~ActiveCountMaintainer() { active_count_--; }
};
ActiveCountMaintainer maintainer_;
+ // TODO(isolates): this is dangerous.
+ static int active_count_;
StackAddressValidator stack_validator_;
const bool is_valid_top_;
const bool is_valid_fp_;
« no previous file with comments | « no previous file | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698