Reviewers: Sven Panne,
Description:
Introduce an api to query the microtask autorun state of an isolate
BUG=none
[email protected]
LOG=y
Please review this at https://codereview.chromium.org/264333004/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+11, -0 lines):
M include/v8.h
M src/api.cc
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index
d39dca96bba8d5b60f46d0ec2e05f616cf71cd0e..809ac1325eb5439b533933d3adf042f809315e4a
100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -4389,6 +4389,12 @@ class V8_EXPORT Isolate {
*/
void SetAutorunMicrotasks(bool autorun);
+ /**
+ * Experimental: Returns whether the Microtask Work Queue is
automatically
+ * run when the script call depth decrements to zero.
+ */
+ bool WillAutorunMicrotasks() const;
+
private:
template<class K, class V, class Traits> friend class PersistentValueMap;
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index
8a99c278cb1da885fcda1f4ef5c34a0f3a6eef12..cbb4163c7c3db5308b0ca498d6a3971b28ab566e
100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -6659,6 +6659,11 @@ void Isolate::SetAutorunMicrotasks(bool autorun) {
}
+bool Isolate::WillAutorunMicrotasks() const {
+ return reinterpret_cast<const i::Isolate*>(this)->autorun_microtasks();
+}
+
+
String::Utf8Value::Utf8Value(v8::Handle<v8::Value> obj)
: str_(NULL), length_(0) {
i::Isolate* isolate = i::Isolate::Current();
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.