Backed out changeset e451b39305f6 (bug 949488) for breaking mochitest-8 on at least b2g

This commit is contained in:
Wes Kocher
2014-01-06 18:10:34 -08:00
parent b218163df5
commit 4cf8013e7f
10 changed files with 24 additions and 205 deletions

View File

@@ -15,7 +15,6 @@
#include "nsIScriptContext.h"
#include "nsContentUtils.h"
#include "nsTArray.h"
#include "nsJSUtils.h"
namespace mozilla {
namespace dom {
@@ -93,25 +92,6 @@ void DestroyScriptSettings()
delete ptr;
}
// This mostly gets the entry global, but doesn't entirely match the spec in
// certain edge cases. It's good enough for some purposes, but not others. If
// you want to call this function, ping bholley and describe your use-case.
nsIGlobalObject*
BrokenGetEntryGlobal()
{
// We need the current JSContext in order to check the JS for
// scripted frames that may have appeared since anyone last
// manipulated the stack. If it's null, that means that there
// must be no entry point on the stack.
JSContext *cx = nsContentUtils::GetCurrentJSContextForThread();
if (!cx) {
MOZ_ASSERT(ScriptSettingsStack::Ref().EntryPoint() == nullptr);
return nullptr;
}
return nsJSUtils::GetDynamicScriptGlobal(cx);
}
// Note: When we're ready to expose it, GetEntryGlobal will look similar to
// GetIncumbentGlobal below.