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

Unified Diff: Source/bindings/modules/v8/ModuleBindingsInitializer.cpp

Issue 389903002: Split V8RecursionScope into core and modules. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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/bindings/core/v8/V8RecursionScope.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/modules/v8/ModuleBindingsInitializer.cpp
diff --git a/Source/bindings/modules/v8/ModuleBindingsInitializer.cpp b/Source/bindings/modules/v8/ModuleBindingsInitializer.cpp
index 2bd16851e99f2ddb11644fb3d29ccb9b5049401d..1815ae10f2435676a1232395d29b67a59d7adc03 100644
--- a/Source/bindings/modules/v8/ModuleBindingsInitializer.cpp
+++ b/Source/bindings/modules/v8/ModuleBindingsInitializer.cpp
@@ -12,6 +12,7 @@
#include "modules/EventModulesInterfaces.h"
#include "modules/EventTargetModulesHeaders.h"
#include "modules/EventTargetModulesInterfaces.h"
+#include "modules/indexeddb/IDBPendingTransactionMonitor.h"
namespace WebCore {
@@ -46,10 +47,18 @@ static v8::Handle<v8::Value> toV8ForModuleEventTarget(EventTarget* impl, v8::Han
#undef TRY_TO_TOV8_WITH_INTERFACE
+static void didLeaveScriptContextForModule(ExecutionContext& executionContext)
+{
+ // Indexed DB requires that transactions are created with an internal |active| flag
+ // set to true, but the flag becomes false when control returns to the event loop.
+ IDBPendingTransactionMonitor::from(executionContext).deactivateNewTransactions();
+}
+
void ModuleBindingsInitializer::init()
{
ModuleProxy::moduleProxy().registerWrapForEvent(wrapForModuleEvent);
ModuleProxy::moduleProxy().registerToV8ForEventTarget(toV8ForModuleEventTarget);
+ ModuleProxy::moduleProxy().registerDidLeaveScriptContextForRecursionScope(didLeaveScriptContextForModule);
}
} // namespace WebCore
« no previous file with comments | « Source/bindings/core/v8/V8RecursionScope.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698