mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-26 02:17:34 +09:00
Merge remote-tracking branch 'origin/master' into custom
This commit is contained in:
commit
f55c7f6d89
11 changed files with 62 additions and 39 deletions
|
|
@ -3224,6 +3224,12 @@ nsGlobalWindow::SetNewDocument(nsIDocument* aDocument,
|
|||
newInnerWindow->mLocalStorage = nullptr;
|
||||
newInnerWindow->mSessionStorage = nullptr;
|
||||
|
||||
newInnerWindow->mPerformance = nullptr;
|
||||
|
||||
// This must be called after nulling the internal objects because
|
||||
// we might recreate them here by calling the getter methods, and
|
||||
// store them into the JS slots. If we null them after, the slot
|
||||
// values and the objects will be out of sync.
|
||||
newInnerWindow->ClearDocumentDependentSlots(cx);
|
||||
}
|
||||
} else {
|
||||
|
|
@ -3364,10 +3370,16 @@ nsGlobalWindow::InnerSetNewDocument(JSContext* aCx, nsIDocument* aDocument)
|
|||
}
|
||||
|
||||
mDoc = aDocument;
|
||||
ClearDocumentDependentSlots(aCx);
|
||||
mFocusedNode = nullptr;
|
||||
mLocalStorage = nullptr;
|
||||
mSessionStorage = nullptr;
|
||||
mPerformance = nullptr;
|
||||
|
||||
// This must be called after nulling the internal objects because we might
|
||||
// recreate them here by calling the getter methods, and store them into the JS
|
||||
// slots. If we null them after, the slot values and the objects will be
|
||||
// out of sync.
|
||||
ClearDocumentDependentSlots(aCx);
|
||||
|
||||
#ifdef DEBUG
|
||||
mLastOpenedURI = aDocument->GetDocumentURI();
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@
|
|||
#include "WebGLBuffer.h"
|
||||
#include "WebGLVertexArray.h"
|
||||
|
||||
#include "mozilla/CheckedInt.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
WebGLRefPtr<WebGLBuffer>*
|
||||
|
|
@ -345,6 +347,16 @@ WebGLContext::BufferData(GLenum target, WebGLsizeiptr size, GLenum usage)
|
|||
|
||||
////
|
||||
|
||||
const auto checkedSize = CheckedInt<size_t>(size);
|
||||
if (!checkedSize.isValid())
|
||||
return ErrorOutOfMemory("%s: Size too large for platform.", funcName);
|
||||
|
||||
#if defined(XP_MACOSX)
|
||||
if (gl->WorkAroundDriverBugs() && size > 1200000000) {
|
||||
return ErrorOutOfMemory("Allocations larger than 1200000000 fail on MacOS.");
|
||||
}
|
||||
#endif
|
||||
|
||||
const UniqueBuffer zeroBuffer(calloc(size, 1));
|
||||
if (!zeroBuffer)
|
||||
return ErrorOutOfMemory("%s: Failed to allocate zeros.", funcName);
|
||||
|
|
|
|||
|
|
@ -1257,6 +1257,9 @@ IDBDatabase::LastRelease()
|
|||
AssertIsOnOwningThread();
|
||||
|
||||
CloseInternal();
|
||||
|
||||
// Make sure that file actors created after the database was closed are expired.
|
||||
ExpireFileActors(/* aExpireAll */ true);
|
||||
|
||||
ExpireFileActors(/* aExpireAll */ true);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue