mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 00:38:39 +09:00
Merge remote-tracking branch 'origin/tracking' into custom
This commit is contained in:
commit
beb68187e5
98 changed files with 13981 additions and 982 deletions
|
|
@ -224,6 +224,7 @@
|
|||
#include "mozilla/dom/PrimitiveConversions.h"
|
||||
#include "mozilla/dom/WindowBinding.h"
|
||||
#include "nsITabChild.h"
|
||||
#include "mozilla/dom/ModuleScript.h"
|
||||
#include "mozilla/dom/MediaQueryList.h"
|
||||
#include "mozilla/dom/ScriptSettings.h"
|
||||
#include "mozilla/dom/NavigatorBinding.h"
|
||||
|
|
@ -12949,9 +12950,6 @@ nsGlobalWindow::RunTimeoutHandler(Timeout* aTimeout,
|
|||
RefPtr<Function> callback = handler->GetCallback();
|
||||
|
||||
if (!callback) {
|
||||
// Evaluate the timeout expression.
|
||||
const nsAString& script = handler->GetHandlerText();
|
||||
|
||||
const char* filename = nullptr;
|
||||
uint32_t lineNo = 0, dummyColumn = 0;
|
||||
handler->GetLocation(&filename, &lineNo, &dummyColumn);
|
||||
|
|
@ -12962,9 +12960,22 @@ nsGlobalWindow::RunTimeoutHandler(Timeout* aTimeout,
|
|||
AutoEntryScript aes(this, reason, true);
|
||||
JS::CompileOptions options(aes.cx());
|
||||
options.setFileAndLine(filename, lineNo).setVersion(JSVERSION_DEFAULT);
|
||||
options.setNoScriptRval(true);
|
||||
JS::Rooted<JSObject*> global(aes.cx(), FastGetGlobalJSObject());
|
||||
nsresult rv =
|
||||
nsJSUtils::EvaluateString(aes.cx(), script, global, options);
|
||||
nsresult rv;
|
||||
{
|
||||
nsJSUtils::ExecutionContext exec(aes.cx(), global);
|
||||
rv = exec.Compile(options, handler->GetHandlerText());
|
||||
|
||||
if (rv == NS_OK) {
|
||||
LoadedScript* initiatingScript = handler->GetInitiatingScript();
|
||||
if (initiatingScript) {
|
||||
initiatingScript->AssociateWithScript(exec.GetScript());
|
||||
}
|
||||
|
||||
rv = exec.ExecScript();
|
||||
}
|
||||
}
|
||||
if (rv == NS_SUCCESS_DOM_SCRIPT_EVALUATION_THREW_UNCATCHABLE) {
|
||||
abortIntervalHandler = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue