Loading browser/components/BrowserGlue.sys.mjs +8 −0 Original line number Diff line number Diff line Loading @@ -2855,6 +2855,14 @@ BrowserGlue.prototype = { }, }, { // Starts the JSOracle process for ORB JavaScript validation, if it hasn't started already. name: "start-orb-javascript-oracle", task: () => { ChromeUtils.ensureJSOracleStarted(); }, }, { name: "browser-startup-idle-tasks-finished", task: () => { Loading dom/base/ChromeUtils.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ #include "ChromeUtils.h" #include "JSOracleParent.h" #include "js/CharacterEncoding.h" #include "js/Object.h" // JS::GetClass #include "js/PropertyAndElement.h" // JS_DefineProperty, JS_DefinePropertyById, JS_Enumerate, JS_GetProperty, JS_GetPropertyById, JS_SetProperty, JS_SetPropertyById, JS::IdVector Loading Loading @@ -1762,6 +1763,12 @@ bool ChromeUtils::IsDarkBackground(GlobalObject&, Element& aElement) { double ChromeUtils::DateNow(GlobalObject&) { return JS_Now() / 1000.0; } /* static */ void ChromeUtils::EnsureJSOracleStarted(GlobalObject&) { JSOracleParent::WithJSOracle( [](JSOracleParent* aParent) { MOZ_DIAGNOSTIC_ASSERT(aParent); }); } /* static */ unsigned ChromeUtils::AliveUtilityProcesses(const GlobalObject&) { const auto& utilityProcessManager = Loading dom/base/ChromeUtils.h +2 −0 Original line number Diff line number Diff line Loading @@ -285,6 +285,8 @@ class ChromeUtils { static double DateNow(GlobalObject&); static void EnsureJSOracleStarted(GlobalObject&); static unsigned AliveUtilityProcesses(const GlobalObject&); }; Loading dom/chrome-webidl/ChromeUtils.webidl +5 −0 Original line number Diff line number Diff line Loading @@ -654,6 +654,11 @@ partial namespace ChromeUtils { */ boolean isDarkBackground(Element element); /** * Starts the JSOracle process for ORB JavaScript validation, if it hasn't started already. */ undefined ensureJSOracleStarted(); /** * The number of currently alive utility processes. */ Loading Loading
browser/components/BrowserGlue.sys.mjs +8 −0 Original line number Diff line number Diff line Loading @@ -2855,6 +2855,14 @@ BrowserGlue.prototype = { }, }, { // Starts the JSOracle process for ORB JavaScript validation, if it hasn't started already. name: "start-orb-javascript-oracle", task: () => { ChromeUtils.ensureJSOracleStarted(); }, }, { name: "browser-startup-idle-tasks-finished", task: () => { Loading
dom/base/ChromeUtils.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ #include "ChromeUtils.h" #include "JSOracleParent.h" #include "js/CharacterEncoding.h" #include "js/Object.h" // JS::GetClass #include "js/PropertyAndElement.h" // JS_DefineProperty, JS_DefinePropertyById, JS_Enumerate, JS_GetProperty, JS_GetPropertyById, JS_SetProperty, JS_SetPropertyById, JS::IdVector Loading Loading @@ -1762,6 +1763,12 @@ bool ChromeUtils::IsDarkBackground(GlobalObject&, Element& aElement) { double ChromeUtils::DateNow(GlobalObject&) { return JS_Now() / 1000.0; } /* static */ void ChromeUtils::EnsureJSOracleStarted(GlobalObject&) { JSOracleParent::WithJSOracle( [](JSOracleParent* aParent) { MOZ_DIAGNOSTIC_ASSERT(aParent); }); } /* static */ unsigned ChromeUtils::AliveUtilityProcesses(const GlobalObject&) { const auto& utilityProcessManager = Loading
dom/base/ChromeUtils.h +2 −0 Original line number Diff line number Diff line Loading @@ -285,6 +285,8 @@ class ChromeUtils { static double DateNow(GlobalObject&); static void EnsureJSOracleStarted(GlobalObject&); static unsigned AliveUtilityProcesses(const GlobalObject&); }; Loading
dom/chrome-webidl/ChromeUtils.webidl +5 −0 Original line number Diff line number Diff line Loading @@ -654,6 +654,11 @@ partial namespace ChromeUtils { */ boolean isDarkBackground(Element element); /** * Starts the JSOracle process for ORB JavaScript validation, if it hasn't started already. */ undefined ensureJSOracleStarted(); /** * The number of currently alive utility processes. */ Loading