summaryrefslogtreecommitdiffstats
path: root/js/xpconnect/src
diff options
context:
space:
mode:
Diffstat (limited to 'js/xpconnect/src')
-rw-r--r--js/xpconnect/src/XPCJSContext.cpp9
-rw-r--r--js/xpconnect/src/XPCShellImpl.cpp23
-rw-r--r--js/xpconnect/src/XPCVariant.cpp8
3 files changed, 4 insertions, 36 deletions
diff --git a/js/xpconnect/src/XPCJSContext.cpp b/js/xpconnect/src/XPCJSContext.cpp
index bedb7c650..f5f6a11bb 100644
--- a/js/xpconnect/src/XPCJSContext.cpp
+++ b/js/xpconnect/src/XPCJSContext.cpp
@@ -59,10 +59,6 @@
#include "nsIXULRuntime.h"
#include "nsJSPrincipals.h"
-#ifdef MOZ_CRASHREPORTER
-#include "nsExceptionHandler.h"
-#endif
-
#if defined(MOZ_JEMALLOC4)
#include "mozmemory.h"
#endif
@@ -709,11 +705,6 @@ XPCJSContext::GCSliceCallback(JSContext* cx,
if (!self)
return;
-#ifdef MOZ_CRASHREPORTER
- CrashReporter::SetGarbageCollecting(progress == JS::GC_CYCLE_BEGIN ||
- progress == JS::GC_SLICE_BEGIN);
-#endif
-
if (self->mPrevGCSliceCallback)
(*self->mPrevGCSliceCallback)(cx, progress, desc);
}
diff --git a/js/xpconnect/src/XPCShellImpl.cpp b/js/xpconnect/src/XPCShellImpl.cpp
index d9629bfed..45d00d390 100644
--- a/js/xpconnect/src/XPCShellImpl.cpp
+++ b/js/xpconnect/src/XPCShellImpl.cpp
@@ -59,11 +59,6 @@
#include <unistd.h> /* for isatty() */
#endif
-#ifdef MOZ_CRASHREPORTER
-#include "nsExceptionHandler.h"
-#include "nsICrashReporter.h"
-#endif
-
using namespace mozilla;
using namespace JS;
using mozilla::dom::AutoJSAPI;
@@ -1372,18 +1367,6 @@ XRE_XPCShellMain(int argc, char** argv, char** envp,
argv += 2;
}
-#ifdef MOZ_CRASHREPORTER
- const char* val = getenv("MOZ_CRASHREPORTER");
- if (val && *val) {
- rv = CrashReporter::SetExceptionHandler(greDir, true);
- if (NS_FAILED(rv)) {
- printf("CrashReporter::SetExceptionHandler failed!\n");
- return 1;
- }
- MOZ_ASSERT(CrashReporter::GetEnabled());
- }
-#endif
-
{
if (argc > 1 && !strcmp(argv[1], "--greomni")) {
nsCOMPtr<nsIFile> greOmni;
@@ -1603,12 +1586,6 @@ XRE_XPCShellMain(int argc, char** argv, char** envp,
dirprovider.ClearPluginDir();
dirprovider.ClearAppFile();
-#ifdef MOZ_CRASHREPORTER
- // Shut down the crashreporter service to prevent leaking some strings it holds.
- if (CrashReporter::GetEnabled())
- CrashReporter::UnsetExceptionHandler();
-#endif
-
NS_LogTerm();
return result;
diff --git a/js/xpconnect/src/XPCVariant.cpp b/js/xpconnect/src/XPCVariant.cpp
index a3d2b88c5..4c1230172 100644
--- a/js/xpconnect/src/XPCVariant.cpp
+++ b/js/xpconnect/src/XPCVariant.cpp
@@ -55,7 +55,7 @@ XPCTraceableVariant::~XPCTraceableVariant()
{
Value val = GetJSValPreserveColor();
- MOZ_ASSERT(val.isGCThing(), "Must be traceable or unlinked");
+ MOZ_ASSERT(val.isGCThing() || val.isNull(), "Must be traceable or unlinked");
mData.Cleanup();
@@ -65,7 +65,7 @@ XPCTraceableVariant::~XPCTraceableVariant()
void XPCTraceableVariant::TraceJS(JSTracer* trc)
{
- MOZ_ASSERT(GetJSValPreserveColor().isMarkable());
+ MOZ_ASSERT(GetJSValPreserveColor().isGCThing());
JS::TraceEdge(trc, &mJSVal, "XPCTraceableVariant::mJSVal");
}
@@ -86,7 +86,7 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(XPCVariant)
tmp->mData.Cleanup();
- if (val.isMarkable()) {
+ if (val.isGCThing()) {
XPCTraceableVariant* v = static_cast<XPCTraceableVariant*>(tmp);
v->RemoveFromRootSet();
}
@@ -99,7 +99,7 @@ XPCVariant::newVariant(JSContext* cx, const Value& aJSVal)
{
RefPtr<XPCVariant> variant;
- if (!aJSVal.isMarkable())
+ if (!aJSVal.isGCThing())
variant = new XPCVariant(cx, aJSVal);
else
variant = new XPCTraceableVariant(cx, aJSVal);