Bug 1465700. Remove the now-unused JS_DeprecatedGetCompartmentPrincipals API. r=jandem
authorBoris Zbarsky <bzbarsky@mit.edu>
Wed, 30 Jan 2019 08:45:49 +0000
changeset 457604 526f7b418884ec46195b4f7f03f14d7a609bb248
parent 457603 25b050d6d1e9d926424fa0c6a2754f4ce3838722
child 457605 dda7c63c1c185ca67f5bb7a67855f3d96f407edc
push id35516
push userrmaries@mozilla.com
push dateFri, 08 Feb 2019 04:23:26 +0000
treeherdermozilla-central@d599d1a73a3a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1465700
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1465700. Remove the now-unused JS_DeprecatedGetCompartmentPrincipals API. r=jandem Differential Revision: https://phabricator.services.mozilla.com/D18036
js/src/jsfriendapi.cpp
js/src/jsfriendapi.h
--- a/js/src/jsfriendapi.cpp
+++ b/js/src/jsfriendapi.cpp
@@ -152,25 +152,16 @@ JS_FRIEND_API JSObject* JS_NewObjectWith
 JS_FRIEND_API bool JS::GetIsSecureContext(JS::Realm* realm) {
   return realm->creationOptions().secureContext();
 }
 
 JS_FRIEND_API void js::AssertCompartmentHasSingleRealm(JS::Compartment* comp) {
   MOZ_RELEASE_ASSERT(comp->realms().length() == 1);
 }
 
-JS_FRIEND_API JSPrincipals* JS_DeprecatedGetCompartmentPrincipals(
-    JS::Compartment* compartment) {
-  // Note: for now we assume a single realm per compartment. This API will go
-  // away after we remove the remaining callers. See bug 1465700.
-  js::AssertCompartmentHasSingleRealm(compartment);
-
-  return compartment->realms()[0]->principals();
-}
-
 JS_FRIEND_API JSPrincipals* JS::GetRealmPrincipals(JS::Realm* realm) {
   return realm->principals();
 }
 
 JS_FRIEND_API void JS::SetRealmPrincipals(JS::Realm* realm,
                                           JSPrincipals* principals) {
   // Short circuit if there's no change.
   if (principals == realm->principals()) {
--- a/js/src/jsfriendapi.h
+++ b/js/src/jsfriendapi.h
@@ -189,19 +189,16 @@ extern JS_FRIEND_API void JS_SetAccumula
 
 enum class JSUseCounter { ASMJS, WASM };
 
 typedef void (*JSSetUseCounterCallback)(JSObject* obj, JSUseCounter counter);
 
 extern JS_FRIEND_API void JS_SetSetUseCounterCallback(
     JSContext* cx, JSSetUseCounterCallback callback);
 
-extern JS_FRIEND_API JSPrincipals* JS_DeprecatedGetCompartmentPrincipals(
-    JS::Compartment* compartment);
-
 extern JS_FRIEND_API JSPrincipals* JS_GetScriptPrincipals(JSScript* script);
 
 namespace js {
 
 // Release-assert the compartment contains exactly one realm.
 extern JS_FRIEND_API void AssertCompartmentHasSingleRealm(
     JS::Compartment* comp);