It is necessary to call initialize() after creating a WebURLResponse object. It is easy to forget this, leading to crashes. The initialize() method can be removed. See blink-dev thread: https://groups.google.com/a/chromium.org/d/msg/blink-dev/1n0GNq0i5IA/zB4T5WR5AwAJ
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1a1f044d3edb9634238a267b9ec7186dd7933581 commit 1a1f044d3edb9634238a267b9ec7186dd7933581 Author: kinuko <kinuko@chromium.org> Date: Fri Jul 08 00:46:03 2016 Remove WebURLResponse::initialize() The implementation of WebURLResponse::initialize() was trivial and could easily be moved to the constructor. Remove it. Also remove the public assign() method and the reset() method. BUG= 625529 patch from issue 2120233003 at patchset 40001 (http://crrev.com/2120233003#ps40001) Review-Url: https://codereview.chromium.org/2117313002 Cr-Commit-Position: refs/heads/master@{#404279} [modify] https://crrev.com/1a1f044d3edb9634238a267b9ec7186dd7933581/content/child/web_url_loader_impl.cc [modify] https://crrev.com/1a1f044d3edb9634238a267b9ec7186dd7933581/content/child/web_url_loader_impl_unittest.cc [modify] https://crrev.com/1a1f044d3edb9634238a267b9ec7186dd7933581/content/renderer/render_view_browsertest.cc [modify] https://crrev.com/1a1f044d3edb9634238a267b9ec7186dd7933581/media/blink/cache_util_unittest.cc [modify] https://crrev.com/1a1f044d3edb9634238a267b9ec7186dd7933581/third_party/WebKit/Source/core/fetch/MultipartImageResourceParserTest.cpp [modify] https://crrev.com/1a1f044d3edb9634238a267b9ec7186dd7933581/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp [modify] https://crrev.com/1a1f044d3edb9634238a267b9ec7186dd7933581/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp [modify] https://crrev.com/1a1f044d3edb9634238a267b9ec7186dd7933581/third_party/WebKit/Source/platform/exported/WebURLResponse.cpp [modify] https://crrev.com/1a1f044d3edb9634238a267b9ec7186dd7933581/third_party/WebKit/Source/platform/exported/WebURLResponsePrivate.h [modify] https://crrev.com/1a1f044d3edb9634238a267b9ec7186dd7933581/third_party/WebKit/Source/platform/exported/WrappedResourceResponse.h [modify] https://crrev.com/1a1f044d3edb9634238a267b9ec7186dd7933581/third_party/WebKit/Source/platform/testing/URLTestHelpers.cpp [modify] https://crrev.com/1a1f044d3edb9634238a267b9ec7186dd7933581/third_party/WebKit/Source/web/AssociatedURLLoaderTest.cpp [modify] https://crrev.com/1a1f044d3edb9634238a267b9ec7186dd7933581/third_party/WebKit/Source/web/WebDataSourceImpl.cpp [modify] https://crrev.com/1a1f044d3edb9634238a267b9ec7186dd7933581/third_party/WebKit/Source/web/WebEmbeddedWorkerImplTest.cpp [modify] https://crrev.com/1a1f044d3edb9634238a267b9ec7186dd7933581/third_party/WebKit/Source/web/tests/FrameSerializerTest.cpp [modify] https://crrev.com/1a1f044d3edb9634238a267b9ec7186dd7933581/third_party/WebKit/Source/web/tests/WebFrameTest.cpp [modify] https://crrev.com/1a1f044d3edb9634238a267b9ec7186dd7933581/third_party/WebKit/Source/web/tests/WebURLResponseTest.cpp [modify] https://crrev.com/1a1f044d3edb9634238a267b9ec7186dd7933581/third_party/WebKit/public/platform/WebURLResponse.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8036fd1c9bbd45f18ab78716e641c6d6cf974f79 commit 8036fd1c9bbd45f18ab78716e641c6d6cf974f79 Author: ricea <ricea@chromium.org> Date: Mon Jul 11 07:34:36 2016 Remove class blink::WebURLResponsePrivate WebURLResponse can directly point to a ResourceResponse object instead. BUG= 625529 Review-Url: https://codereview.chromium.org/2133693002 Cr-Commit-Position: refs/heads/master@{#404611} [modify] https://crrev.com/8036fd1c9bbd45f18ab78716e641c6d6cf974f79/third_party/WebKit/Source/platform/blink_platform.gypi [modify] https://crrev.com/8036fd1c9bbd45f18ab78716e641c6d6cf974f79/third_party/WebKit/Source/platform/exported/WebURLResponse.cpp [delete] https://crrev.com/64bca6a72146bba4d144d216b6ad62259545f0c9/third_party/WebKit/Source/platform/exported/WebURLResponsePrivate.h [modify] https://crrev.com/8036fd1c9bbd45f18ab78716e641c6d6cf974f79/third_party/WebKit/Source/platform/exported/WrappedResourceResponse.h [modify] https://crrev.com/8036fd1c9bbd45f18ab78716e641c6d6cf974f79/third_party/WebKit/public/platform/WebURLResponse.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a2b5c2e4f27582316b4bb7d55d1a456ef8480aca commit a2b5c2e4f27582316b4bb7d55d1a456ef8480aca Author: kinuko <kinuko@chromium.org> Date: Wed Jul 13 02:12:37 2016 Remove WebURLRequest::initialize() and simplify WebURLRequest Does the same as we did for WebURLResponse in https://crrev.com/2117313002 and https://crrev.com/2133693002. BUG= 625529 TBR=jochen@chromium.org for components Review-Url: https://codereview.chromium.org/2140523002 Cr-Commit-Position: refs/heads/master@{#404894} [modify] https://crrev.com/a2b5c2e4f27582316b4bb7d55d1a456ef8480aca/components/nacl/renderer/ppb_nacl_private_impl.cc [modify] https://crrev.com/a2b5c2e4f27582316b4bb7d55d1a456ef8480aca/components/plugins/renderer/mobile_youtube_plugin.cc [modify] https://crrev.com/a2b5c2e4f27582316b4bb7d55d1a456ef8480aca/content/child/web_url_loader_impl.cc [modify] https://crrev.com/a2b5c2e4f27582316b4bb7d55d1a456ef8480aca/content/child/web_url_loader_impl_unittest.cc [modify] https://crrev.com/a2b5c2e4f27582316b4bb7d55d1a456ef8480aca/content/renderer/fetchers/resource_fetcher_impl.cc [modify] https://crrev.com/a2b5c2e4f27582316b4bb7d55d1a456ef8480aca/content/renderer/fetchers/resource_fetcher_impl.h [modify] https://crrev.com/a2b5c2e4f27582316b4bb7d55d1a456ef8480aca/content/renderer/pepper/url_request_info_util.cc [modify] https://crrev.com/a2b5c2e4f27582316b4bb7d55d1a456ef8480aca/third_party/WebKit/Source/platform/blink_platform.gypi [modify] https://crrev.com/a2b5c2e4f27582316b4bb7d55d1a456ef8480aca/third_party/WebKit/Source/platform/exported/WebURLRequest.cpp [delete] https://crrev.com/b36392c2dc38c81c6165a591e217e37598605137/third_party/WebKit/Source/platform/exported/WebURLRequestPrivate.h [modify] https://crrev.com/a2b5c2e4f27582316b4bb7d55d1a456ef8480aca/third_party/WebKit/Source/platform/exported/WebURLResponse.cpp [modify] https://crrev.com/a2b5c2e4f27582316b4bb7d55d1a456ef8480aca/third_party/WebKit/Source/platform/exported/WrappedResourceRequest.h [modify] https://crrev.com/a2b5c2e4f27582316b4bb7d55d1a456ef8480aca/third_party/WebKit/Source/platform/exported/WrappedResourceResponse.h [modify] https://crrev.com/a2b5c2e4f27582316b4bb7d55d1a456ef8480aca/third_party/WebKit/Source/platform/testing/weburl_loader_mock.cc [modify] https://crrev.com/a2b5c2e4f27582316b4bb7d55d1a456ef8480aca/third_party/WebKit/Source/web/AssociatedURLLoaderTest.cpp [modify] https://crrev.com/a2b5c2e4f27582316b4bb7d55d1a456ef8480aca/third_party/WebKit/Source/web/WebDataSourceImpl.cpp [modify] https://crrev.com/a2b5c2e4f27582316b4bb7d55d1a456ef8480aca/third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp [modify] https://crrev.com/a2b5c2e4f27582316b4bb7d55d1a456ef8480aca/third_party/WebKit/Source/web/tests/WebFrameTest.cpp [modify] https://crrev.com/a2b5c2e4f27582316b4bb7d55d1a456ef8480aca/third_party/WebKit/Source/web/tests/WebURLRequestTest.cpp [modify] https://crrev.com/a2b5c2e4f27582316b4bb7d55d1a456ef8480aca/third_party/WebKit/Source/web/tests/WebViewTest.cpp [modify] https://crrev.com/a2b5c2e4f27582316b4bb7d55d1a456ef8480aca/third_party/WebKit/Source/web/tests/sim/SimTest.cpp [modify] https://crrev.com/a2b5c2e4f27582316b4bb7d55d1a456ef8480aca/third_party/WebKit/public/platform/WebURLRequest.h [modify] https://crrev.com/a2b5c2e4f27582316b4bb7d55d1a456ef8480aca/third_party/WebKit/public/platform/WebURLResponse.h
Comment 1 by tkent@chromium.org
, Jul 5 2016