Bug 887334 - Enter a compartment in indexedDB's ThreadLocalJSRuntime. r=bent

This commit is contained in:
Bobby Holley 2013-07-17 11:53:54 -07:00
parent 6934cef71d
commit 3de3782239

View File

@ -560,6 +560,11 @@ class ThreadLocalJSRuntime
return mContext;
}
JSObject *Global() const
{
return mGlobal;
}
~ThreadLocalJSRuntime()
{
MOZ_COUNT_DTOR(ThreadLocalJSRuntime);
@ -4033,6 +4038,7 @@ CreateIndexHelper::InsertDataFromObjectStore(mozIStorageConnection* aConnection)
JSContext* cx = tlsEntry->Context();
JSAutoRequest ar(cx);
JSAutoCompartment ac(cx, tlsEntry->Global());
do {
StructuredCloneReadInfo cloneReadInfo;