зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 438598073b9b (bug 1474540) for assertion failure at ScriptSettings.cpp:493 on Android. CLOSED TREE
This commit is contained in:
Родитель
09db278bed
Коммит
f03960010a
|
@ -19,8 +19,6 @@
|
|||
#include "nsINode.h"
|
||||
#include "nsIPrincipal.h"
|
||||
|
||||
#include "js/Wrapper.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -186,7 +184,6 @@ nsBrowserElement::Download(const nsAString& aUrl,
|
|||
RefPtr<DOMRequest> req;
|
||||
nsCOMPtr<nsIXPConnectWrappedJS> wrappedObj = do_QueryInterface(mBrowserElementAPI);
|
||||
MOZ_ASSERT(wrappedObj, "Failed to get wrapped JS from XPCOM component.");
|
||||
MOZ_RELEASE_ASSERT(!js::IsWrapper(wrappedObj->GetJSObject()));
|
||||
AutoJSAPI jsapi;
|
||||
if (!jsapi.Init(wrappedObj->GetJSObject())) {
|
||||
aRv.Throw(NS_ERROR_UNEXPECTED);
|
||||
|
@ -406,7 +403,6 @@ nsBrowserElement::ExecuteScript(const nsAString& aScript,
|
|||
RefPtr<DOMRequest> req;
|
||||
nsCOMPtr<nsIXPConnectWrappedJS> wrappedObj = do_QueryInterface(mBrowserElementAPI);
|
||||
MOZ_ASSERT(wrappedObj, "Failed to get wrapped JS from XPCOM component.");
|
||||
MOZ_RELEASE_ASSERT(!js::IsWrapper(wrappedObj->GetJSObject()));
|
||||
AutoJSAPI jsapi;
|
||||
if (!jsapi.Init(wrappedObj->GetJSObject())) {
|
||||
aRv.Throw(NS_ERROR_UNEXPECTED);
|
||||
|
|
|
@ -490,7 +490,6 @@ AutoJSAPI::Init(nsIGlobalObject* aGlobalObject)
|
|||
bool
|
||||
AutoJSAPI::Init(JSObject* aObject)
|
||||
{
|
||||
MOZ_ASSERT(!js::IsCrossCompartmentWrapper(aObject));
|
||||
return Init(xpc::NativeGlobal(aObject));
|
||||
}
|
||||
|
||||
|
|
|
@ -228,8 +228,7 @@ public:
|
|||
MOZ_MUST_USE bool Init(nsIGlobalObject* aGlobalObject);
|
||||
|
||||
// This is a helper that grabs the native global associated with aObject and
|
||||
// invokes the above Init() with that. aObject must not be a cross-compartment
|
||||
// wrapper: CCWs are not associated with a single global.
|
||||
// invokes the above Init() with that.
|
||||
MOZ_MUST_USE bool Init(JSObject* aObject);
|
||||
|
||||
// Unsurprisingly, this uses aCx and enters the compartment of aGlobalObject.
|
||||
|
|
Загрузка…
Ссылка в новой задаче