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

Unified Diff: Source/WebCore/Modules/indexeddb/IDBRequest.cpp

Issue 11337028: Merge 132922 - Remove ensureAuxiliaryContext (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years, 2 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/Modules/indexeddb/IDBRequest.h ('k') | Source/WebCore/bindings/v8/IDBBindingUtilities.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/Modules/indexeddb/IDBRequest.cpp
===================================================================
--- Source/WebCore/Modules/indexeddb/IDBRequest.cpp (revision 132933)
+++ Source/WebCore/Modules/indexeddb/IDBRequest.cpp (working copy)
@@ -42,6 +42,9 @@
#include "IDBTracing.h"
#include "IDBTransaction.h"
#include "ScriptExecutionContext.h"
+#if USE(V8)
+#include "V8Binding.h"
+#endif
namespace WebCore {
@@ -76,6 +79,9 @@
, m_pendingCursor(0)
, m_didFireUpgradeNeededEvent(false)
, m_preventPropagation(false)
+#if USE(V8)
+ , m_worldContextHandle(UseCurrentWorld)
+#endif
{
if (m_transaction) {
m_transaction->registerRequest(this);
@@ -284,6 +290,14 @@
if (!shouldEnqueueEvent())
return;
+#if USE(V8)
+ v8::HandleScope handleScope;
+ v8::Local<v8::Context> context = toV8Context(scriptExecutionContext(), m_worldContextHandle);
+ if (context.IsEmpty())
+ CRASH();
+ v8::Context::Scope contextScope(context);
+#endif
+
ScriptValue value = deserializeIDBValue(scriptExecutionContext(), serializedValue);
ASSERT(m_cursorType != IDBCursorBackendInterface::InvalidCursorType);
RefPtr<IDBCursor> cursor;
@@ -340,6 +354,14 @@
if (!shouldEnqueueEvent())
return;
+#if USE(V8)
+ v8::HandleScope handleScope;
+ v8::Local<v8::Context> context = toV8Context(scriptExecutionContext(), m_worldContextHandle);
+ if (context.IsEmpty())
+ CRASH();
+ v8::Context::Scope contextScope(context);
+#endif
+
ScriptValue value = deserializeIDBValue(scriptExecutionContext(), serializedScriptValue);
onSuccessInternal(value);
}
@@ -363,6 +385,14 @@
if (!shouldEnqueueEvent())
return;
+#if USE(V8)
+ v8::HandleScope handleScope;
+ v8::Local<v8::Context> context = toV8Context(scriptExecutionContext(), m_worldContextHandle);
+ if (context.IsEmpty())
+ CRASH();
+ v8::Context::Scope contextScope(context);
+#endif
+
#ifndef NDEBUG
ASSERT(keyPath == effectiveObjectStore(m_source)->keyPath());
#endif
@@ -404,6 +434,14 @@
if (!shouldEnqueueEvent())
return;
+#if USE(V8)
+ v8::HandleScope handleScope;
+ v8::Local<v8::Context> context = toV8Context(scriptExecutionContext(), m_worldContextHandle);
+ if (context.IsEmpty())
+ CRASH();
+ v8::Context::Scope contextScope(context);
+#endif
+
ScriptValue value = deserializeIDBValue(scriptExecutionContext(), serializedValue);
ASSERT(m_pendingCursor);
setResultCursor(m_pendingCursor.release(), key, primaryKey, value);
@@ -449,6 +487,15 @@
ASSERT(scriptExecutionContext());
ASSERT(event->target() == this);
ASSERT_WITH_MESSAGE(m_readyState < DONE, "When dispatching event %s, m_readyState < DONE(%d), was %d", event->type().string().utf8().data(), DONE, m_readyState);
+
+#if USE(V8)
+ v8::HandleScope handleScope;
+ v8::Local<v8::Context> context = toV8Context(scriptExecutionContext(), m_worldContextHandle);
+ if (context.IsEmpty())
+ CRASH();
+ v8::Context::Scope contextScope(context);
+#endif
+
if (event->type() != eventNames().blockedEvent)
m_readyState = DONE;
« no previous file with comments | « Source/WebCore/Modules/indexeddb/IDBRequest.h ('k') | Source/WebCore/bindings/v8/IDBBindingUtilities.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698