зеркало из https://github.com/mozilla/gecko-dev.git
cd3c15f774
Because NewObjectInputStreamFromBuffer takes a raw pointer as input, the typical coding pattern to use it is: nsAutoArrayPtr<char> buf; // assign something to buf nsresult rv = NewObjectInputStreamFromBuffer(buf, ...); if (NS_FAILED(rv)) { ... return rv; } buf.forget(); Which is clumsy, error-prone, and obscures the ownership transfer of the pointer into the stream returned by NewObjectInputStreamFromBuffer. Let's address all of these concerns by changing the argument to a UniquePtr<char[]>. |
||
---|---|---|
.. | ||
builtin | ||
crashtests | ||
test | ||
XBLChildrenElement.cpp | ||
XBLChildrenElement.h | ||
moz.build | ||
nsBindingManager.cpp | ||
nsBindingManager.h | ||
nsXBLBinding.cpp | ||
nsXBLBinding.h | ||
nsXBLContentSink.cpp | ||
nsXBLContentSink.h | ||
nsXBLDocumentInfo.cpp | ||
nsXBLDocumentInfo.h | ||
nsXBLEventHandler.cpp | ||
nsXBLEventHandler.h | ||
nsXBLMaybeCompiled.h | ||
nsXBLProtoImpl.cpp | ||
nsXBLProtoImpl.h | ||
nsXBLProtoImplField.cpp | ||
nsXBLProtoImplField.h | ||
nsXBLProtoImplMember.h | ||
nsXBLProtoImplMethod.cpp | ||
nsXBLProtoImplMethod.h | ||
nsXBLProtoImplProperty.cpp | ||
nsXBLProtoImplProperty.h | ||
nsXBLPrototypeBinding.cpp | ||
nsXBLPrototypeBinding.h | ||
nsXBLPrototypeHandler.cpp | ||
nsXBLPrototypeHandler.h | ||
nsXBLPrototypeResources.cpp | ||
nsXBLPrototypeResources.h | ||
nsXBLResourceLoader.cpp | ||
nsXBLResourceLoader.h | ||
nsXBLSerialize.cpp | ||
nsXBLSerialize.h | ||
nsXBLService.cpp | ||
nsXBLService.h | ||
nsXBLWindowKeyHandler.cpp | ||
nsXBLWindowKeyHandler.h |