Commit 988ea995 authored by jochen@chromium.org's avatar jochen@chromium.org

Introduce an api to query the microtask autorun state of an isolate

BUG=none
R=adamk@chromium.org, svenpanne@chromium.org
LOG=y

Review URL: https://codereview.chromium.org/264333004

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21250 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c43789b6
......@@ -4393,6 +4393,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;
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment