Commit b021722d authored by Noemi Erli's avatar Noemi Erli
Browse files

Backed out changeset e06349a5b0f2 (bug 1829050) for causing build bustages in...

Backed out changeset e06349a5b0f2 (bug 1829050) for causing build bustages in rlbox_wasm2c_sandbox.hpp
parent 62397ae5
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -8,8 +8,6 @@
// For MOZ_CRASH_UNSAFE_PRINTF
#  include "mozilla/Assertions.h"

#  include "mozilla/mozalloc_oom.h"

// Load general firefox configuration of RLBox
#  include "mozilla/rlbox/rlbox_config.h"
#  include "mozilla/rlbox/rlbox_wasm2c_tls.hpp"
@@ -36,13 +34,6 @@ void moz_wasm2c_memgrow_failed() {
  CrashReporter::AnnotateCrashReport(
      CrashReporter::Annotation::WasmLibrarySandboxMallocFailed, true);
}

// This function is called when mozalloc_handle_oom is called from within
// the sandbox. We redirect to that function, ignoring the ctx argument, which
// is the sandbox itself.
void Z_hostgeckoZ_mozalloc_handle_oomZ_vi(void* ctx, uint32_t size) {
  mozalloc_handle_oom(size);
}
}

#endif
+2 −4
Original line number Diff line number Diff line
@@ -103,7 +103,6 @@ void* moz_xmemdup(const void* ptr, size_t size) {
  return newPtr;
}

#ifndef __wasm__
#ifndef HAVE_MEMALIGN
// We always have a definition of memalign, but system headers don't
// necessarily come with a declaration.
@@ -119,7 +118,6 @@ void* moz_xmemalign(size_t boundary, size_t size) {
  // non-NULL ptr or errno == EINVAL
  return ptr;
}
#endif

size_t moz_malloc_usable_size(void* ptr) {
  if (!ptr) return 0;
+1 −6
Original line number Diff line number Diff line
@@ -14,12 +14,7 @@
 * Called when memory is critically low.  Returns iff it was able to
 * remedy the critical memory situation; if not, it will abort().
 */
#ifdef __wasm__
__attribute__((import_module("hostgecko")))
__attribute__((import_name("mozalloc_handle_oom")))
#endif
MFBT_API void
mozalloc_handle_oom(size_t requestedSize);
MFBT_API void mozalloc_handle_oom(size_t requestedSize);

extern MFBT_DATA size_t gOOMAllocationSize;

+21 −25
Original line number Diff line number Diff line
@@ -8,8 +8,6 @@
#ifndef mozilla_throw_gcc_h
#define mozilla_throw_gcc_h

#ifndef __wasm__

#include "mozilla/Attributes.h"

#include <stdio.h>   // snprintf
@@ -147,6 +145,4 @@ MOZ_THROW_NORETURN MOZ_EXPORT MOZ_ALWAYS_INLINE void __throw_regex_error(
#undef MOZ_THROW_NORETURN
#undef MOZ_THROW_INLINE

#endif

#endif  // mozilla_throw_gcc_h
+0 −1
Original line number Diff line number Diff line
@@ -767,7 +767,6 @@ class WasmFlags(TargetCompileFlags):
                context.config.substs.get("MOZ_FILE_PREFIX_MAP_FLAGS"),
                ("WASM_CFLAGS", "WASM_CXXFLAGS"),
            ),
            ("STL", context.config.substs.get("STL_FLAGS"), ("WASM_CXXFLAGS",)),
        )

        TargetCompileFlags.__init__(self, context)
Loading