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

Unified Diff: include/v8.h

Issue 198253004: Introduce per-isolate assert scopes and API to guard JS execution. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: add missing file Created 6 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/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 4f5a8fd0bd855c85f3920319d4e93b7aa5fc5523..e133ded014fcf58b1f00a277c00a203ebab5972a 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -4070,6 +4070,32 @@ class V8_EXPORT Isolate {
Scope& operator=(const Scope&);
};
+
+ /**
+ * Assert that no Javascript code is invoked.
+ */
+ class DisallowJavascriptExecutionScope {
+ public:
+ explicit DisallowJavascriptExecutionScope(Isolate* isolate);
+ ~DisallowJavascriptExecutionScope();
+
+ private:
+ void* internal_;
+ };
jochen (gone - plz use gerrit) 2014/03/19 11:13:16 can you add copy and assign declarations? (like in
+
+
+ /**
+ * Introduce exception to DisallowJavascriptExecutionScope.
+ */
+ class AllowJavascriptExecutionScope {
+ public:
+ explicit AllowJavascriptExecutionScope(Isolate* isolate);
+ ~AllowJavascriptExecutionScope();
+
+ private:
+ void* internal_;
+ };
+
/**
* Types of garbage collections that can be requested via
* RequestGarbageCollectionForTesting.
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698