зеркало из https://github.com/mozilla/gecko-dev.git
Bug 930101 - Fix an exact rooting hazard in JSObjectFromInterface; r=smaug
This commit is contained in:
Родитель
682ab173ee
Коммит
66588eb6ec
|
@ -1044,10 +1044,12 @@ nsJSContext::JSObjectFromInterface(nsISupports* aTarget,
|
|||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
JS::Rooted<JSObject*> rootedObj(cx, obj);
|
||||
nsCOMPtr<nsISupports> targetSupp = do_QueryInterface(aTarget);
|
||||
nsCOMPtr<nsISupports> native =
|
||||
nsContentUtils::XPConnect()->GetNativeOfWrapper(cx, obj);
|
||||
nsContentUtils::XPConnect()->GetNativeOfWrapper(cx, rootedObj);
|
||||
NS_ASSERTION(native == targetSupp, "Native should be the target!");
|
||||
obj = rootedObj;
|
||||
#endif
|
||||
|
||||
*aRet = obj;
|
||||
|
|
Загрузка…
Ссылка в новой задаче