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

Unified Diff: Source/WebCore/bindings/v8/V8RecursionScope.h

Issue 9355009: Merge 107170 - DOM mutations should not be delivered on worker threads (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 10 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 | « Source/WebCore/bindings/v8/V8Proxy.cpp ('k') | Source/WebCore/bindings/v8/V8RecursionScope.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/bindings/v8/V8RecursionScope.h
===================================================================
--- Source/WebCore/bindings/v8/V8RecursionScope.h (revision 108090)
+++ Source/WebCore/bindings/v8/V8RecursionScope.h (working copy)
@@ -35,20 +35,29 @@
namespace WebCore {
+class ScriptExecutionContext;
+
class V8RecursionScope {
WTF_MAKE_NONCOPYABLE(V8RecursionScope);
public:
- V8RecursionScope() { V8BindingPerIsolateData::current()->incrementRecursionLevel(); }
+ explicit V8RecursionScope(ScriptExecutionContext* context)
+ : m_context(context)
+ {
+ V8BindingPerIsolateData::current()->incrementRecursionLevel();
+ }
+
~V8RecursionScope()
{
if (!V8BindingPerIsolateData::current()->decrementRecursionLevel())
- didLeaveScriptContext();
+ didLeaveScriptContext(m_context);
}
static int recursionLevel() { return V8BindingPerIsolateData::current()->recursionLevel(); }
private:
- static void didLeaveScriptContext();
+ static void didLeaveScriptContext(ScriptExecutionContext*);
+
+ ScriptExecutionContext* m_context;
};
} // namespace WebCore
« no previous file with comments | « Source/WebCore/bindings/v8/V8Proxy.cpp ('k') | Source/WebCore/bindings/v8/V8RecursionScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698