зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1356546: Follow-up: Fix rooting hazard warning.
MozReview-Commit-ID: JDDjiEbbErK --HG-- extra : rebase_source : 48d6fe05597da32517035e6a524f3a143581e4f5
This commit is contained in:
Родитель
d3ac7845d4
Коммит
fb74d7df50
|
@ -94,17 +94,16 @@ StructuredCloneBlob::Deserialize(JSContext* aCx, JS::HandleObject aTargetScope,
|
|||
/* static */ JSObject*
|
||||
StructuredCloneBlob::ReadStructuredClone(JSContext* aCx, JSStructuredCloneReader* aReader)
|
||||
{
|
||||
RefPtr<StructuredCloneBlob> holder = new StructuredCloneBlob();
|
||||
|
||||
if (!holder->ReadStructuredCloneInternal(aCx, aReader)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
JS::RootedObject obj(aCx);
|
||||
if (holder->WrapObject(aCx, nullptr, &obj)) {
|
||||
return obj.get();
|
||||
{
|
||||
RefPtr<StructuredCloneBlob> holder = new StructuredCloneBlob();
|
||||
|
||||
if (!holder->ReadStructuredCloneInternal(aCx, aReader) ||
|
||||
!holder->WrapObject(aCx, nullptr, &obj)) {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
return obj.get();
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
Загрузка…
Ссылка в новой задаче