OnContextReleased 和OnContextCreated记录

void ClientApp::OnContextReleased
CefContentRendererClient::WillReleaseScriptContext
CefRenderFrameObserver::WillReleaseScriptContext
RenderFrameImpl::willReleaseScriptContext
WindowProxy::disposeContext  bindings/core/v8/WindowProxy.cpp
#3  0x00002b071fa0d145 in blink::WindowProxy::clearForNavigation() () at ../../third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp:139
#4  0x00002b071f98339f in blink::ScriptController::clearWindowProxy() ()
#5  0x00002b071f26dc6a in blink::LocalFrame::setDOMWindow(WTF::PassRefPtr<blink::LocalDOMWindow>) ()
#6  0x00002b071f3e2ef3 in blink::DocumentLoader::createWriterFor(blink::Document const*, blink::DocumentInit const&, WTF::AtomicString const&, WTF::AtomicString const&, bool) () at ../../third_party/WebKit/Source/core/loader/DocumentLoader.cpp:827
#7  0x00002b071f3e2d67 in blink::DocumentLoader::ensureWriter(WTF::AtomicString const&, blink::KURL const&) ()
#8  0x00002b071f3e14f5 in blink::DocumentLoader::commitData(char const*, unsigned long) ()
#9  0x00002b071f3e3321 in blink::DocumentLoader::dataReceived(blink::Resource*, char const*, int) ()
#10 0x00002b071f1e8d13 in blink::RawResource::appendData(char const*, int) () at ../../third_party/WebKit/Source/core/fetch/RawResource.cpp:48
#11 0x00002b071f21491f in blink::ResourceLoader::didReceiveData(blink::WebURLLoader*, char const*, int, int) ()
../../third_party/WebKit/Source/core/fetch/ResourceLoader.cpp
#12 0x00002b0723a06008 in content::WebURLLoaderImpl::Context::OnReceivedData(char const*, int, int) ()
../../content/child/web_url_loader_impl.cc
#13 0x00002b07239ba3ce in content::ResourceDispatcher::OnReceivedData(int, int, int, int) () at ../../content/child/resource_dispatcher.cc:472
#14 0x00002b07239bcd65 in void DispatchToMethod<content::ResourceDispatcher, void (content::ResourceDispatcher::*)(int, int, int, int), int, int, int, int>(content::ResourceDispatcher*, void (content::ResourceDispatcher::*)(int, int, int, int), Tuple4<int, int, int, int> const&) ()
#15 0x00002b07239bc477 in bool ResourceMsg_DataReceived::Dispatch<content::ResourceDispatcher, content::ResourceDispatcher, void, void (content::ResourceDispatcher::*)(int, int, int, int)>(IPC::Message const*, content::ResourceDispatcher*, content::ResourceDispatcher*, void*, void (content::ResourceDispatcher::*)(int, int, int, int)) () at ../../content/common/resource_messages.h:303
#16 0x00002b07239b8c50 in content::ResourceDispatcher::DispatchMessage(IPC::Message const&) ()
#17 0x00002b07239b81bf in content::ResourceDispatcher::OnMessageReceived(IPC::Message const&) ()
#18 0x00002b0723903b71 in content::ChildThread::OnMessageReceived(IPC::Message const&) () at ../../content/child/child_thread.cc:456
#19 0x00002b0720b1d04d in IPC::ChannelProxy::Context::OnDispatchMessage(IPC::Message const&) () at ../../ipc/ipc_channel_proxy.cc:274
#20 0x00002b0720b2522a in base::internal::RunnableAdapter<void (IPC::ChannelProxy::Context::*)(IPC::Message const&)>::Run(IPC::ChannelProxy::Context*, IPC::Message const&) () at ../../base/bind_internal.h:190


client_app.cpp:void ClientApp::OnContextCreated
CefContentRendererClient::DidCreateScriptContext
RenderFrameImpl::didCreateScriptContext
WindowProxy::initialize bindings/core/v8/WindowProxy.cpp
#2  0x00002b1542f17356 in blink::WindowProxy::initialize() () at ../../third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp:189
#3  0x00002b1542f17302 in blink::WindowProxy::initializeIfNeeded() () at ../../third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp:182
#4  0x00002b1542e8c194 in blink::ScriptController::windowProxy(blink::DOMWrapperWorld&) ()
#5  0x00002b1542e8bfc4 in blink::ScriptController::initializeMainWorld() ()
#6  0x00002b1542e8d7d3 in blink::ScriptController::updateDocument() ()
#7  0x00002b1542763932 in blink::LocalDOMWindow::installNewDocument(WTF::String const&, blink::DocumentInit const&, bool) ()
#8  0x00002b15428ecf2c in blink::DocumentLoader::createWriterFor(blink::Document const*, blink::DocumentInit const&, WTF::AtomicString const&, WTF::AtomicString const&, bool) () at ../../third_party/WebKit/Source/core/loader/DocumentLoader.cpp:829
#9  0x00002b15428ecd67 in blink::DocumentLoader::ensureWriter(WTF::AtomicString const&, blink::KURL const&) ()
#10 0x00002b15428eb4f5 in blink::DocumentLoader::commitData(char const*, unsigned long) ()
#11 0x00002b15428ed321 in blink::DocumentLoader::dataReceived(blink::Resource*, char const*, int) ()
#12 0x00002b15426f2d13 in blink::RawResource::appendData(char const*, int) () at ../../third_party/WebKit/Source/core/fetch/RawResource.cpp:48
#13 0x00002b154271e91f in blink::ResourceLoader::didReceiveData(blink::WebURLLoader*, char const*, int, int) ()
#14 0x00002b1546f10018 in content::WebURLLoaderImpl::Context::OnReceivedData(char const*, int, int) ()
#15 0x00002b1546ec43de in content::ResourceDispatcher::OnReceivedData(int, int, int, int) () at ../../content/child/resource_dispatcher.cc:472
#16 0x00002b1546ec6d75 in void DispatchToMethod<content::ResourceDispatcher, void (content::ResourceDispatcher::*)(int, int, int, int), int, int, int, int>(content::ResourceDispatcher*, void (content::ResourceDispatcher::*)(int, int, int, int), Tuple4<int, int, int, int> const&) ()
#17 0x00002b1546ec6487 in bool ResourceMsg_DataReceived::Dispatch<content::ResourceDispatcher, content::ResourceDispatcher, void, void (content::ResourceDispatcher::*)(int, int, int, int)>(IPC::Message const*, content::ResourceDispatcher*, content::ResourceDispatcher*, void*, void (content::ResourceDispatcher::*)(int, int, int, int)) () at ../../content/common/resource_messages.h:303
#18 0x00002b1546ec2c60 in content::ResourceDispatcher::DispatchMessage(IPC::Message const&) ()
#19 0x00002b1546ec21cf in content::ResourceDispatcher::OnMessageReceived(IPC::Message const&) ()
#20 0x00002b1546e0db81 in content::ChildThread::OnMessageReceived(IPC::Message const&) () at ../../content/child/child_thread.cc:456
#21 0x00002b154402705d in IPC::ChannelProxy::Context::OnDispatchMessage(IPC::Message const&) () at ../../ipc/ipc_channel_proxy.cc:274

怎么让他直接用前面的环境 还在研究中 下次打开网页的时候m_writer是空的

如果是第一次打开网页

#2  0x00002b011fd72356 in blink::WindowProxy::initialize() () at ../../third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp:189
#3  0x00002b011fd72302 in blink::WindowProxy::initializeIfNeeded() () at ../../third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp:182
#4  0x00002b011fce7194 in blink::ScriptController::windowProxy(blink::DOMWrapperWorld&) ()
#5  0x00002b011fd31e53 in blink::toV8Context(blink::LocalFrame*, blink::DOMWrapperWorld&) ()
#6  0x00002b011fce909d in blink::ScriptController::evaluateScriptInMainWorld(blink::ScriptSourceCode const&, blink::AccessControlStatus, blink::ScriptController::ExecuteScriptPolicy, double*) () at ../../third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp:725
#7  0x00002b011fce9b79 in blink::ScriptController::executeScriptInMainWorld(blink::ScriptSourceCode const&, blink::AccessControlStatus, double*) () at ../../third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp:697
#8  0x00002b011ebc8b09 in blink::ScriptLoader::executeScript(blink::ScriptSourceCode const&, double*) ()
#9  0x00002b011ebc7367 in blink::ScriptLoader::prepareScript(WTF::TextPosition const&, blink::ScriptLoader::LegacyTypeSupport) ()
#10 0x00002b011f199e09 in blink::HTMLScriptRunner::runScript(blink::Element*, WTF::TextPosition const&) ()
#11 0x00002b011f199af9 in blink::HTMLScriptRunner::execute(WTF::PassRefPtr<blink::Element>, WTF::TextPosition const&) ()
#12 0x00002b011f1798fd in blink::HTMLDocumentParser::runScriptsForPausedTreeBuilder() ()
#13 0x00002b011f17aed6 in blink::HTMLDocumentParser::processParsedChunkFromBackgroundParser(WTF::PassOwnPtr<blink::HTMLDocumentParser::ParsedChunk>) () at ../../third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp:490
#14 0x00002b011f1794da in blink::HTMLDocumentParser::pumpPendingSpeculations() ()
#15 0x00002b011f179dbd in blink::HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser(WTF::PassOwnPtr<blink::HTMLDocumentParser::ParsedChunk>) () at ../../third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp:370
#16 0x00002b011f165627 in WTF::FunctionWrapper<void (blink::HTMLDocumentParser::*)(WTF::PassOwnPtr<blink::HTMLDocumentParser::ParsedChunk>)>::operator()(WTF::WeakPtr<blink::HTMLDocumentParser> const&, WTF::PassOwnPtr<blink::HTMLDocumentParser::ParsedChunk>) ()
#17 0x00002b011f165557 in WTF::BoundFunctionImpl<WTF::FunctionWrapper<void (blink::HTMLDocumentParser::*)(WTF::PassOwnPtr<blink::HTMLDocumentParser::ParsedChunk>)>, void (WTF::WeakPtr<blink::HTMLDocumentParser>, WTF::PassOwnPtr<blink::HTMLDocumentParser::ParsedChunk>)>::operator()()
#18 0x00002b011d763a70 in WTF::Function<void ()>::operator()() const () at ../../third_party/WebKit/Source/wtf/Functional.h:1077
#19 0x00002b011da1acad in WTF::callFunctionObject(void*) () at ../../third_party/WebKit/Source/wtf/MainThread.cpp:65
#20 0x00002b011ea3312d in WTF::FunctionWrapper<void (*)(void*)>::operator()(void*) () at ../../third_party/WebKit/Source/wtf/Functional.h:78
#21 0x00002b011ea33105 in WTF::BoundFunctionImpl<WTF::FunctionWrapper<void (*)(void*)>, void (void*)>::operator()() ()


DocumentLoader 创建时机堆栈

#2  0x00002b8bb7530057 in blink::DocumentLoader::DocumentLoader(blink::LocalFrame*, blink::ResourceRequest const&, blink::SubstituteData const&) () at ../../third_party/WebKit/Source/core/loader/DocumentLoader.cpp:89
#3  0x00002b8bb67e1b3e in blink::WebDataSourceImpl::WebDataSourceImpl(blink::LocalFrame*, blink::ResourceRequest const&, blink::SubstituteData const&) () at ../../third_party/WebKit/Source/web/WebDataSourceImpl.cpp:153
#4  0x00002b8bb67e1398 in blink::WebDataSourceImpl::create(blink::LocalFrame*, blink::ResourceRequest const&, blink::SubstituteData const&) ()at ../../third_party/WebKit/Source/web/WebDataSourceImpl.cpp:49
#5  0x00002b8bb679f7c9 in blink::FrameLoaderClientImpl::createDocumentLoader(blink::LocalFrame*, blink::ResourceRequest const&, blink::SubstituteData const&) () at ../../third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp:590
#6  0x00002b8bb75401bd in blink::FrameLoader::init() () at ../../third_party/WebKit/Source/core/loader/FrameLoader.cpp:152
#7  0x00002b8bb6829b2c in blink::LocalFrame::init() () at ../../third_party/WebKit/Source/core/frame/LocalFrame.h:191
#8  0x00002b8bb68261f0 in blink::WebLocalFrameImpl::initializeCoreFrame(blink::FrameHost*, blink::FrameOwner*, WTF::AtomicString const&, WTF::AtomicString const&) () at ../../third_party/WebKit/Source/web/WebLocalFrameImpl.cpp:1581
#9  0x00002b8bb686777b in blink::WebViewImpl::setMainFrame(blink::WebFrame*) () at ../../third_party/WebKit/Source/web/WebViewImpl.cpp:332
#10 0x00002b8bbb75154d in content::RenderViewImpl::Initialize(content::RenderViewImplParams*) ()
#11 0x00002b8bbb7544af in content::RenderViewImpl::Create(int, bool, content::RendererPreferences const&, content::WebPreferences const&, int, int, int, long, std::basic_string<unsigned short, base::string16_char_traits, std::allocator<unsigned short> > const&, bool, bool, int, bool, bool, int, blink::WebScreenInfo const&) () at ../../content/renderer/render_view_impl.cc:1172
#12 0x00002b8bbb740bba in content::RenderThreadImpl::OnCreateNewView(ViewMsg_New_Params const&) ()
#13 0x00002b8bbb745497 in void DispatchToMethod<content::RenderThreadImpl, void (content::RenderThreadImpl::*)(ViewMsg_New_Params const&), ViewMsg_New_Params>(content::RenderThreadImpl*, void (content::RenderThreadImpl::*)(ViewMsg_New_Params const&), Tuple1<ViewMsg_New_Params> const&)
#14 0x00002b8bbb744c2f in bool ViewMsg_New::Dispatch<content::RenderThreadImpl, content::RenderThreadImpl, void, void (content::RenderThreadImpl::*)(ViewMsg_New_Params const&)>(IPC::Message const*, content::RenderThreadImpl*, content::RenderThreadImpl*, void*, void (content::RenderThreadImpl::*)(ViewMsg_New_Params const&)) () at ../../content/common/view_messages.h:537
#15 0x00002b8bbb7405ba in content::RenderThreadImpl::OnControlMessageReceived(IPC::Message const&) ()
#16 0x00002b8bbb740f0f in non-virtual thunk to content::RenderThreadImpl::OnControlMessageReceived(IPC::Message const&) ()
#17 0x00002b8bbba542f5 in content::ChildThread::OnMessageReceived(IPC::Message const&) () at ../../content/child/child_thread.cc:489
#18 0x00002b8bb8c6d04d in IPC::ChannelProxy::Context::OnDispatchMessage(IPC::Message const&) () at ../../ipc/ipc_channel_proxy.cc:274
#19 0x00002b8bb8c7522a in base::internal::RunnableAdapter<void (IPC::ChannelProxy::Context::*)(IPC::Message const&)>::Run(IPC::ChannelProxy::Context*, IPC::Message const&) () at ../../base/bind_internal.h:190
#20 0x00002b8bb8c75181 in base::internal::InvokeHelper<false, void, base::internal::RunnableAdapter<void (IPC::ChannelProxy::Context::*)(IPC::Message const&)>, void (IPC::ChannelProxy::Context* const&, IPC::Message const&)>::MakeItSo(base::internal

FrameHost::create时机堆栈

#2  0x00002b642d4b0c83 in blink::FrameHost::create(blink::Page&) () at ../../third_party/WebKit/Source/core/frame/FrameHost.cpp:43
#3  0x00002b642d6cb3a7 in blink::Page::Page(blink::Page::PageClients&) () at ../../third_party/WebKit/Source/core/page/Page.cpp:142
#4  0x00002b642c9900e2 in blink::WebViewImpl::WebViewImpl(blink::WebViewClient*) () at ../../third_party/WebKit/Source/web/WebViewImpl.cpp:435
#5  0x00002b642c98f4eb in blink::WebViewImpl::create(blink::WebViewClient*) () at ../../third_party/WebKit/Source/web/WebViewImpl.cpp:293
#6  0x00002b642c98f4b5 in blink::WebView::create(blink::WebViewClient*) () at ../../third_party/WebKit/Source/web/WebViewImpl.cpp:287
#7  0x00002b6431878de9 in content::RenderViewImpl::Initialize(content::RenderViewImplParams*) () at ../../content/renderer/render_view_impl.cc:717
#8  0x00002b643187c4bf in content::RenderViewImpl::Create(int, bool, content::RendererPreferences const&, content::WebPreferences const&, int, int, int, long, std::basic_string<unsigned short, base::string16_char_traits, std::allocator<unsigned short> > const&, bool, bool, int, bool, bool, int, blink::WebScreenInfo const&) () at ../../content/renderer/render_view_impl.cc:1172
#9  0x00002b6431868bca in content::RenderThreadImpl::OnCreateNewView(ViewMsg_New_Params const&) () at ../../content/renderer/render_thread_impl.cc:1362
#10 0x00002b643186d4a7 in void DispatchToMethod<content::RenderThreadImpl, void (content::RenderThreadImpl::*)(ViewMsg_New_Params const&), ViewMsg_New_Params>(content::RenderThreadImpl*, void (content::RenderThreadImpl::*)(ViewMsg_New_Params const&), Tuple1<ViewMsg_New_Params> const&)() at ../../base/tuple.h:548
#11 0x00002b643186cc3f in bool ViewMsg_New::Dispatch<content::RenderThreadImpl, content::RenderThreadImpl, void, void (content::RenderThreadImpl::*)(ViewMsg_New_Params const&)>(IPC::Message const*, content::RenderThreadImpl*, content::RenderThreadImpl*, void*, void (content::RenderThreadImpl::*)(ViewMsg_New_Params const&)) () at ../../content/common/view_messages.h:537
#12 0x00002b64318685ca in content::RenderThreadImpl::OnControlMessageReceived(IPC::Message const&) () at ../../content/renderer/render_thread_impl.cc:1321
#13 0x00002b6431868f1f in non-virtual thunk to content::RenderThreadImpl::OnControlMessageReceived(IPC::Message const&) () at ../../content/renderer/render_thread_impl.cc:1339
#14 0x00002b6431b7c305 in content::ChildThread::OnMessageReceived(IPC::Message const&) () at ../../content/child/child_thread.cc:489
#15 0x00002b642ed9505d in IPC::ChannelProxy::Context::OnDispatchMessage(IPC::Message const&) () at ../../ipc/ipc_channel_proxy.cc:274
#16 0x00002b642ed9d23a in base::internal::RunnableAdapter<void (IPC::ChannelProxy::Context::*)(IPC::Message const&)>::Run(IPC::ChannelProxy::Context*, IPC::Message const&) () at ../../base/bind_internal.h:190
#17 0x00002b642ed9d191 in base::internal::InvokeHelper<false, void, base::internal::RunnableAdapter<void (IPC::ChannelProxy::Context::*)(IPC::Message const&)>, void (IPC::ChannelProxy::Context* const&, IPC::Message const&)>::MakeItSo(base::internal::RunnableAdapter<void (IPC::ChannelProxy::Context::*)(IPC::Message const&)>, IPC::ChannelProxy::Context* const&, IPC::Message const&) () at ../../base/bind_internal.h:898
#18 0x00002b642ed9d12c in base::internal::Invoker<2, base::internal::BindState<base::internal::RunnableAdapter<void (IPC::ChannelProxy::Context::*)(IPC::Message const&)>, void (IPC::ChannelProxy::Context*, IPC::Message const&), void (IPC::ChannelProxy::Context*, IPC::Message)>, void (IPC::ChannelProxy::Context*, IPC::Message const&)>::Run(base::internal::BindStateBase*) () at ../../base/bind_internal.h:1248
#19 0x00002b642b1c7fae in base::Callback<void ()>::Run() const () at ../../third_party/WebKit/Source/base/callback.h:401
#20 0x00002b642b41d8c0 in base::debug::TaskAnnotator::RunTask(char const*, char const*, base::PendingTask const&) () at ../../base/debug/task_annotator.cc:62
#21 0x00002b642b4c3ac7 in base::MessageLoop::RunTask(base::PendingTask const&) () at ../../base/message_loop/message_loop.cc:445


评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值