调用堆栈
在看这篇文章前,请参见webkit调试之一 --初始化page
第一步讲述了初始化page的工作,现在我们来看看初始化frame的工作
看看call stack
webkit.dll!WebCore::Page::setMainFrame(WTF::PassRefPtr<WebCore::Frame> mainFrame) 行 247 C++
webkit.dll!WebCore::Frame::create(WebCore::Page * page, WebCore::HTMLFrameOwnerElement * ownerElement, WebCore::FrameLoaderClient * client) 行 191 C++
webkit.dll!WebKit::WebFrameImpl::initializeAsMainFrame(WebCore::Page * page) 行 2166 + 0x16 字节 C++
webkit.dll!WebKit::WebViewImpl::initializeMainFrame(WebKit::WebFrameClient * frameClient) 行 311 C++
> content.dll!content::RenderViewImpl::Initialize(content::RenderViewImplParams * params) 行 763 + 0x4e 字节 C++
content.dll!content::RenderViewImpl::Create(int opener_id, const content::RendererPreferences & renderer_prefs, const WebPreferences & webkit_prefs, base::RefCountedData<int> * counter, int routing_id, int surface_id, __int64 session_storage_namespace_id, const std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > & frame_name, bool is_renderer_created, bool swapped_out, int next_page_id, const WebKit::WebScreenInfo & screen_info, AccessibilityMode accessibility_mode, bool allow_partial_swap) 行 931 C++
content.dll!content::RenderThreadImpl::OnCreateNewView(const ViewMsg_New_Params & params) 行 1207 + 0xca 字节 C++
content.dll!DispatchToMethod<content::RenderThreadImpl,void (__thiscall content::RenderThreadImpl::*)(ViewMsg_New_Params const &),ViewMsg_New_Params>(content::RenderThreadImpl * obj, void (const ViewMsg_New_Params &)* method, const Tuple1<ViewMsg_New_Params> & arg) 行 546 + 0xf 字节 C++
content.dll!ViewMsg_New::Dispatch<content::RenderThreadImpl,content::RenderThreadImpl,void (__thiscall content::RenderThreadImpl::*)(ViewMsg_New_Params const &)>(const IPC::Message * msg, content::RenderThreadImpl * obj, content::RenderThreadImpl * sender, void (const ViewMsg_New_Params &)* func) 行 785 + 0x82 字节 C++
content.dll!content::RenderThreadImpl::OnControlMessageReceived(const IPC::Message & msg) 行 1179 + 0x84 字节 C++
content.dll!content::ChildThread::OnMessageReceived(const IPC::Message & msg) 行 269 + 0x13 字节 C++
ipc.dll!IPC::ChannelProxy::Context::OnDispatchMessage(const IPC::Message & message) 行 261 + 0x18 字节 C++
ipc.dll!base::internal::RunnableAdapter<void (__thiscall IPC::ChannelProxy::Context::*)(IPC::Message const &)>::Run(IPC::ChannelProxy::Context * object, const IPC::Message & a1) 行 190 + 0x21 字节 C++
ipc.dll!base::internal::InvokeHelper<0,void,base::internal::RunnableAdapter<void (__thiscall IPC::ChannelProxy::Context::*)(IPC::Message const &)>,void __cdecl(IPC::ChannelProxy::Context * const &,IPC::Message const &)>::MakeItSo(base::internal::RunnableAdapter<void (__thiscall IPC::ChannelProxy::Context::*)(IPC::Message const &)> runnable, IPC::ChannelProxy::Context * const & a1, const IPC::Message & a2) 行 900 C++
ipc.dll!base::internal::Invoker<2,base::internal::BindState<base::internal::RunnableAdapter<void (__thiscall IPC::ChannelProxy::Context::*)(IPC::Message const &)>,void __cdecl(IPC::ChannelProxy::Context *,IPC::Message const &),void __cdecl(IPC::ChannelProxy::Context *,IPC::Message)>,void __cdecl(IPC::ChannelProxy::Context *,IPC::Message const &)>::Run(base::internal::BindStateBase * base) 行 1257 + 0x2a 字节 C++
base.dll!base::Callback<void __cdecl(void)>::Run() 行 396 + 0xe 字节 C++
base.dll!base::MessageLoop::RunTask(const base::PendingTask & pending_task) 行 486 C++
base.dll!base::MessageLoop::DeferOrRunPendingTask(const base::PendingTask & pending_task) 行 499 C++
base.dll!base::MessageLoop::DoWork() 行 688 + 0xc 字节 C++
base.dll!base::MessagePumpForUI::DoRunLoop() 行 241 + 0x1d 字节 C++
base.dll!base::MessagePumpWin::RunWithDispatcher(base::MessagePump::Delegate * delegate, base::MessagePumpDispatcher * dispatcher) 行 64 + 0xf 字节 C++
base.dll!base::MessagePumpWin::Run(base::MessagePump::Delegate * delegate) 行 48 + 0x1c 字节 C++
base.dll!base::MessageLoop::RunInternal() 行 441 + 0x29 字节 C++
base.dll!base::MessageLoop::RunHandler() 行 415 C++
base.dll!base::RunLoop::Run() 行 46 C++
base.dll!base::MessageLoop::Run() 行 322 C++
base.dll!base::Thread::Run(base::MessageLoop * message_loop) 行 160 C++
base.dll!base::Thread::ThreadMain() 行 204 + 0x16 字节 C++
相关类图:
可以看到WebFrameImpl起到了沟通chromiumhe webkit的桥梁作用。