Skip to content

Commit 17f3983

Browse files
committed
Bug 1461605 part 1 - Rename CompartmentOptions to RealmOptions. r=luke,bz
1 parent b222e04 commit 17f3983

File tree

77 files changed

+225
-227
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+225
-227
lines changed

devtools/shared/heapsnapshot/tests/gtest/DevTools.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ struct DevTools : public ::testing::Test {
8888
{
8989
/* Create the global object. */
9090
JS::RootedObject newGlobal(cx);
91-
JS::CompartmentOptions options;
91+
JS::RealmOptions options;
9292
newGlobal = JS_NewGlobalObject(cx, getGlobalClass(), nullptr,
9393
JS::FireOnNewGlobalHook, options);
9494
if (!newGlobal)

devtools/shared/heapsnapshot/tests/gtest/DoesCrossCompartmentBoundaries.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
DEF_TEST(DoesCrossCompartmentBoundaries, {
1111
// Create a new global to get a new compartment.
12-
JS::CompartmentOptions options;
12+
JS::RealmOptions options;
1313
JS::RootedObject newGlobal(cx, JS_NewGlobalObject(cx,
1414
getGlobalClass(),
1515
nullptr,

devtools/shared/heapsnapshot/tests/gtest/DoesntCrossCompartmentBoundaries.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
DEF_TEST(DoesntCrossCompartmentBoundaries, {
1111
// Create a new global to get a new compartment.
12-
JS::CompartmentOptions options;
12+
JS::RealmOptions options;
1313
JS::RootedObject newGlobal(cx, JS_NewGlobalObject(cx,
1414
getGlobalClass(),
1515
nullptr,

dom/base/ProcessGlobal.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ ProcessGlobal::Init()
129129

130130
bool
131131
ProcessGlobal::WrapGlobalObject(JSContext* aCx,
132-
JS::CompartmentOptions& aOptions,
132+
JS::RealmOptions& aOptions,
133133
JS::MutableHandle<JSObject*> aReflector)
134134
{
135135
bool ok = ContentProcessMessageManagerBinding::Wrap(aCx, this, this, aOptions,

dom/base/ProcessGlobal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class ProcessGlobal :
6464
MOZ_CRASH("We should never get here!");
6565
}
6666
virtual bool WrapGlobalObject(JSContext* aCx,
67-
JS::CompartmentOptions& aOptions,
67+
JS::RealmOptions& aOptions,
6868
JS::MutableHandle<JSObject*> aReflector) override;
6969

7070
using MessageManagerGlobal::AddMessageListener;

dom/base/nsFrameMessageManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1468,7 +1468,7 @@ nsMessageManagerScriptExecutor::InitChildGlobalInternal(const nsACString& aID)
14681468

14691469
nsContentUtils::GetSecurityManager()->GetSystemPrincipal(getter_AddRefs(mPrincipal));
14701470

1471-
JS::CompartmentOptions options;
1471+
JS::RealmOptions options;
14721472
options.creationOptions().setSystemZone();
14731473

14741474
xpc::InitGlobalObjectOptions(options, mPrincipal);

dom/base/nsFrameMessageManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ class nsMessageManagerScriptExecutor
465465
bool aRunInGlobalScope);
466466
bool InitChildGlobalInternal(const nsACString& aID);
467467
virtual bool WrapGlobalObject(JSContext* aCx,
468-
JS::CompartmentOptions& aOptions,
468+
JS::RealmOptions& aOptions,
469469
JS::MutableHandle<JSObject*> aReflector) = 0;
470470
void Trace(const TraceCallbacks& aCallbacks, void* aClosure);
471471
void Unlink();

dom/base/nsGlobalWindowOuter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,9 +1562,9 @@ InitializeLegacyNetscapeObject(JSContext* aCx, JS::Handle<JSObject*> aGlobal)
15621562
return JS_DefineFunctions(aCx, obj, EnablePrivilegeSpec);
15631563
}
15641564

1565-
static JS::CompartmentCreationOptions&
1565+
static JS::RealmCreationOptions&
15661566
SelectZone(nsGlobalWindowInner* aNewInner,
1567-
JS::CompartmentCreationOptions& aOptions)
1567+
JS::RealmCreationOptions& aOptions)
15681568
{
15691569
if (aNewInner->GetOuterWindow()) {
15701570
nsGlobalWindowOuter *top = aNewInner->GetTopInternal();
@@ -1600,7 +1600,7 @@ CreateNativeGlobalForInner(JSContext* aCx,
16001600
nsCOMPtr<nsIExpandedPrincipal> nsEP = do_QueryInterface(aPrincipal);
16011601
MOZ_RELEASE_ASSERT(!nsEP, "DOMWindow with nsEP is not supported");
16021602

1603-
JS::CompartmentOptions options;
1603+
JS::RealmOptions options;
16041604

16051605
SelectZone(aNewInner, options.creationOptions());
16061606

dom/base/nsInProcessTabChildGlobal.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ NS_IMPL_RELEASE_INHERITED(nsInProcessTabChildGlobal, DOMEventTargetHelper)
178178

179179
bool
180180
nsInProcessTabChildGlobal::WrapGlobalObject(JSContext* aCx,
181-
JS::CompartmentOptions& aOptions,
181+
JS::RealmOptions& aOptions,
182182
JS::MutableHandle<JSObject*> aReflector)
183183
{
184184
bool ok = ContentFrameMessageManagerBinding::Wrap(aCx, this, this, aOptions,

dom/base/nsInProcessTabChildGlobal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class nsInProcessTabChildGlobal final : public mozilla::dom::ContentFrameMessage
6969
MOZ_CRASH("We should never get here!");
7070
}
7171
virtual bool WrapGlobalObject(JSContext* aCx,
72-
JS::CompartmentOptions& aOptions,
72+
JS::RealmOptions& aOptions,
7373
JS::MutableHandle<JSObject*> aReflector) override;
7474

7575
virtual already_AddRefed<nsPIDOMWindowOuter>

0 commit comments

Comments
 (0)