Remove uses of MOZ_ALWAYS_INLINE in Stream.cpp. No bug, rs=till on IRC.
authorJason Orendorff <jorendorff@mozilla.com>
Wed, 24 Oct 2018 10:08:01 -0500
changeset 491109 75c0470ab2be5ebe088e87344dc33afbbb4f8bb8
parent 491108 be944769416fd05768e14019b519b011ce4fff23
child 491127 39c53a79d86b2aafdbfa41a7cacc86ababf8fca6
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewerstill
milestone65.0a1
Remove uses of MOZ_ALWAYS_INLINE in Stream.cpp. No bug, rs=till on IRC.
js/src/builtin/Stream.cpp
--- a/js/src/builtin/Stream.cpp
+++ b/js/src/builtin/Stream.cpp
@@ -155,24 +155,24 @@ constexpr uint8_t ControllerEmbeddingFla
 
 enum BYOBRequestSlots {
     BYOBRequestSlot_Controller,
     BYOBRequestSlot_View,
     BYOBRequestSlotCount
 };
 
 template<class T>
-MOZ_ALWAYS_INLINE bool
+bool
 Is(const HandleValue v)
 {
     return v.isObject() && v.toObject().is<T>();
 }
 
 template<class T>
-MOZ_ALWAYS_INLINE bool
+bool
 IsMaybeWrapped(const HandleValue v)
 {
     if (!v.isObject()) {
         return false;
     }
     JSObject* obj = &v.toObject();
     if (obj->is<T>()) {
         return true;
@@ -300,17 +300,17 @@ JSObject::is<ReadableStreamReader>() con
 
 /**
  * Checks that |obj| is an unwrapped instance of T or throws an error.
  *
  * This overload must only be used if the caller can ensure that failure to
  * unwrap is the only possible source of exceptions.
  */
 template<class T>
-static MOZ_ALWAYS_INLINE T*
+static T*
 ToUnwrapped(JSContext* cx, JSObject* obj)
 {
     if (IsWrapper(obj)) {
         obj = CheckedUnwrap(obj);
         if (!obj) {
             ReportAccessDenied(cx);
             return nullptr;
         }
@@ -318,17 +318,17 @@ ToUnwrapped(JSContext* cx, JSObject* obj
 
     return &obj->as<T>();
 }
 
 /**
  * Checks that |obj| is an unwrapped instance of T or throws an error.
  */
 template<class T>
-static MOZ_ALWAYS_INLINE T*
+static T*
 ToUnwrapped(JSContext* cx, JSObject* obj, const char* description)
 {
     if (IsWrapper(obj)) {
         obj = CheckedUnwrap(obj);
         if (!obj) {
             ReportAccessDenied(cx);
             return nullptr;
         }
@@ -346,17 +346,17 @@ ToUnwrapped(JSContext* cx, JSObject* obj
 
 /**
  * Checks that |obj| is an unwrapped instance of T or throws an error.
  *
  * If the caller can ensure that failure to unwrap is the only possible
  * source of exceptions, it may omit the error messages.
  */
 template<class T>
-static MOZ_ALWAYS_INLINE T*
+static T*
 ToUnwrapped(JSContext* cx, JSObject* obj, const char* className, const char* methodName)
 {
     if (IsWrapper(obj)) {
         obj = CheckedUnwrap(obj);
         if (!obj) {
             ReportAccessDenied(cx);
             return nullptr;
         }
@@ -377,17 +377,17 @@ ToUnwrapped(JSContext* cx, JSObject* obj
  *
  * Throws exceptions if the value isn't an object, cannot be unwrapped, or
  * isn't an instance of the expected type.
  *
  * If the caller can ensure that failure to unwrap is the only possible
  * source of exceptions, it may omit the error messages.
  */
 template<class T>
-static MOZ_ALWAYS_INLINE T*
+static T*
 ToUnwrapped(JSContext* cx,
             HandleValue val,
             const char* className = "",
             const char* methodName = "")
 {
     if (!val.isObject()) {
         JS_ReportErrorNumberLatin1(cx, GetErrorMessage, nullptr, JSMSG_INCOMPATIBLE_PROTO,
                                    className, methodName, InformalValueTypeName(val));
@@ -404,17 +404,17 @@ ToUnwrapped(JSContext* cx,
  * compartment.
  *
  * If the stream cannot be unwrapped, which can only happen if it's a dead
  * wrapper object, a nullptr is returned. If a JSContext is available, this
  * case will also report an exception. The JSContext isn't mandatory to make
  * use easier for call sites that don't otherwise need a JSContext and can
  * provide useful defaults in case the stream is a dead wrapper.
  */
-MOZ_ALWAYS_INLINE static MOZ_MUST_USE ReadableStream*
+static MOZ_MUST_USE ReadableStream*
 StreamFromReader(JSContext *maybeCx, const ReadableStreamReader* reader)
 {
     MOZ_ASSERT(ReaderHasStream(reader));
     JSObject* streamObj = &reader->getFixedSlot(ReaderSlot_Stream).toObject();
     if (IsProxy(streamObj)) {
         if (JS_IsDeadWrapper(streamObj)) {
             if (maybeCx) {
                 JS_ReportErrorNumberASCII(maybeCx, GetErrorMessage, nullptr, JSMSG_DEAD_OBJECT);
@@ -439,17 +439,17 @@ StreamFromReader(JSContext *maybeCx, con
  * object from the currently active compartment.
  *
  * If the reader cannot be unwrapped, which can only happen if it's a dead
  * wrapper object, a nullptr is returned. If a JSContext is available, an
  * exception is reported, too. The JSContext isn't mandatory to make use
  * easier for call sites that don't otherwise need a JSContext and can provide
  * useful defaults in case the reader is a dead object wrapper.
  */
-MOZ_ALWAYS_INLINE static MOZ_MUST_USE ReadableStreamReader*
+static MOZ_MUST_USE ReadableStreamReader*
 ReaderFromStream(JSContext* maybeCx, const ReadableStream* stream)
 {
     JSObject* readerObj = &stream->getFixedSlot(StreamSlot_Reader).toObject();
     if (IsProxy(readerObj)) {
         if (JS_IsDeadWrapper(readerObj)) {
             if (maybeCx) {
                 JS_ReportErrorNumberASCII(maybeCx, GetErrorMessage, nullptr, JSMSG_DEAD_OBJECT);
             }