Bug 866450 Part 8: Fix a missed nsContentUtils::WrapNative call on a CLOSED TREE

This commit is contained in:
Ms2ger 2013-05-02 12:10:11 +02:00
parent 3625f24cd0
commit 7cfc5260d3

View File

@ -68,10 +68,9 @@ public:
return false;
}
rv = nsContentUtils::WrapNative(sc->GetNativeContext(),
sc->GetNativeGlobal(),
adapter,
aValue);
JSContext* cx = sc->GetNativeContext();
JS::Rooted<JSObject*> global(cx, sc->GetNativeGlobal());
rv = nsContentUtils::WrapNative(cx, global, adapter, aValue);
if (NS_FAILED(rv)) {
NS_WARNING("Cannot create native object!");
SetError(NS_LITERAL_STRING("BluetoothNativeObjectError"));