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

Unified Diff: src/execution.h

Issue 1433423004: Introduce JavascriptExecutionObserver scope. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/execution.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/execution.h
diff --git a/src/execution.h b/src/execution.h
index f1b1057a61439bcdc40eb51df425fdbc9770acc4..faf984ca583357e91322e87cf03cc1adb6699516 100644
--- a/src/execution.h
+++ b/src/execution.h
@@ -247,6 +247,24 @@ class StackGuard final {
DISALLOW_COPY_AND_ASSIGN(StackGuard);
};
+
+// Stack-allocated object to track Javascript execution within its scope.
+class JavascriptExecutionObserver BASE_EMBEDDED {
+ public:
+ explicit JavascriptExecutionObserver(Isolate* isolate);
+ ~JavascriptExecutionObserver();
+
+ static void SetObserved(Isolate* isolate);
+ bool observed() const { return observed_; }
+
+ private:
+ Isolate* isolate_;
+ JavascriptExecutionObserver* prev_;
+ bool observed_;
+
+ DISALLOW_COPY_AND_ASSIGN(JavascriptExecutionObserver);
+};
+
} // namespace internal
} // namespace v8
« no previous file with comments | « no previous file | src/execution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698