Posts

Showing posts with the label Chromium

A New Collection of Thoughtful Learning Apps — Now Available on iOS & Android

Image
I’m excited to share a set of mobile apps I’ve recently completed and published on both the Google Play Store and the Apple App Store. These apps are designed with a simple goal in mind: to make meaningful, structured content more accessible, whether you’re studying theology or improving your English vocabulary. 📱 Now Available on Both Platforms All apps are live and available for download: Google Play Developer Page: https://play.google.com/store/apps/dev?id=5835943159853189043 Apple App Store Developer Page: https://apps.apple.com/ca/developer/q-z-l-corp/id1888794100 📖 Theology & Confession Study Apps For those interested in Reformed theology and classical Christian teachings, I’ve developed a series of apps that present foundational texts in a clean, focused reading format: The Belgic Confession Canons of Dort Heidelberg Catechism Westminster Shorter Catechism Each app is designed to provide a distraction-free experience, making it easier to read, reflect, and revisit these im...

fix up chromium m47 build error: unsupported reloc 42 against global symbol gmon_start

Error: ld.gold: error: /usr/lib/gcc/x86_64-linux-gnu/5.3.1/../../../x86_64-linux-gnu/crti.o: unsupported reloc 42 against global symbol gmon_start Solution: export GYP_DEFINES="linux_use_bundled_gold=0"

MessageLoop in Cobalt/Chromium

Image

chromium : extensions, how a extension list on web store was installed to chrome

Image
If you find a liked extension on chrome web store , you can install it just by simple click the "ADD TO CHROME" button. Let's go deep into chromium codes, and see how it happened. The key module is chrome.webstore, which a buildin JS object in chrome. chrome/renderer/extensions/webstore_bindings.cc chrome/renderer/extensions/webstore_bindings.h   WebstoreBindings::Install TabHelper::DoInlineInstall WebstoreInlineInstaller::BeginInstall WebstoreStandaloneInstaller::ProceedWithInstallPrompt ShowInstallUI   show install prompt dialog WebstoreStandaloneInstaller::ProceedWithInstallPrompt NavigationObserver::OnInstallPromptDone ExtensionService::EnableExtension ExtensionRegistrar::EnableExtension

chromium : extensions, how background scripts/page get loaded.

Summary a generated background page such as chrome-extension://ffdhgjkakefolmigapfdgbcneopmidbf/_generated_background_page.html will be loaded soon afer extensions service init. the content of background page is generated by GeneratedBackgroundPageJob. specially for scheme "chrome-extension://" GenerateBackgroundPageContents #3 0x56110ab93b63 extensions::(anonymous namespace)::GeneratedBackgroundPageJob::GetData() #4 0x7fb7125791e9 net::URLRequestSimpleJob::GetRefCountedData() #5 0x7fb712578baf net::URLRequestSimpleJob::StartAsync() extensions::CreateExtensionProtocolHandler void ProfileIOData::SetUpJobFactoryDefaultsForBuilder( net::URLRequestContextBuilder* builder, content::URLRequestInterceptorScopedVector request_interceptors, std::unique_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> protocol_handler_interceptor) const { // NOTE(willchan): Keep these protocol handlers in sync with // ProfileIOData::IsHandled...

chromium : extensions, how content scripts get executed

extensions::Dispatcher::RunScriptsAtDocumentEnd #2 0x5595477272c3 extensions::Dispatcher::RunScriptsAtDocumentEnd() #3 0x55954c42bb3c ChromeExtensionsRendererClient::RunScriptsAtDocumentEnd() #4 0x55954c382721 ChromeContentRendererClient::RunScriptsAtDocumentEnd() #5 0x7ff32f28b88c content::RenderFrameImpl::RunScriptsAtDocumentReady() #6 0x7ff3226b9739 blink::LocalFrameClientImpl::RunScriptsAtDocumentReady() #7 0x7ff322f6de36 blink::FrameLoader::FinishedParsing() #8 0x7ff32239b40b blink::Document::FinishedParsing() #9 0x7ff323a6a773 blink::HTMLConstructionSite::FinishedParsing() #10 0x7ff323adf2d7 blink::HTMLTreeBuilder::Finished() #11 0x7ff323a7e316 blink::HTMLDocumentParser::end() #12 0x7ff323a74c7f blink::HTMLDocumentParser::AttemptToRunDeferredScriptsAndEnd() #13 0x7ff323a749a6 blink::HTMLDocumentParser::PrepareToStopParsing() #14 0x7ff323a7a9cc blink::HTMLDocumentParser::ProcessTokenizedChunkFromBackgroundParser() #15 0x7ff323a7657d blink::HTMLDocumentParser::P...

chromium : how extension install prompt dialog get showed

Image
  #2 0x5589ca9aaeba ExtensionInstallPrompt::ShowDialog() #3 0x5589ca9aac7c ExtensionInstallPrompt::ShowDialog() #4 0x5589ca9aa96e ExtensionInstallPrompt::ShowDialog() #5 0x5589cb168cca extensions::WebstorePrivateBeginInstallWithManifest3Function::OnWebstoreParseSuccess() #6 0x5589cab3821b extensions::WebstoreInstallHelper::ReportResultsIfComplete() #7 0x5589cab37efd extensions::WebstoreInstallHelper::OnFetchComplete() #8 0x5589c85da07b chrome::BitmapFetcher::OnImageDecoded() #9 0x5589c85dc1d1 ImageDecoder::OnDecodeImageSucceeded() #10 0x5589c7303c4f _ZN4base8internal13FunctorTraitsIMN10extensions8internal26ScopedCallbackRunnerHelperIFvRKNSt3__16vectorIhNS5_9allocatorIhEEEEN6device5mojom18SerialReceiveErrorEEEEFvSB_SE_EvE6InvokeIPSG_JS9_SE_EEEvSI_OT_DpOT0_ #11 0x5589c7303baa _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIMN10extensions8internal26ScopedCallbackRunnerHelperIFvRKNSt3__16vectorIhNS7_9allocatorIhEEEEN6device5mojom18SerialReceiveErrorEEEEFvSD_SG_EJPSI_SB_SG_EEEvOT_DpO...

chromium : extensions load back trace

#2 0x55c01d36db9d extensions::ExtensionRegistry::AddEnabled() #3 0x55c01d3696cf extensions::ExtensionRegistrar::AddExtension() #4 0x55c020eda0f6 ExtensionService::AddExtension() #5 0x55c020f7e344 extensions::InstalledLoader::Load() #6 0x55c020f7f31b extensions::InstalledLoader::LoadAllExtensions() #7 0x55c020ed12e5 ExtensionService::Init() #8 0x55c020f10a82 extensions::ExtensionSystemImpl::Shared::Init() #9 0x55c020f11462 extensions::ExtensionSystemImpl::InitForRegularProfile() #10 0x55c01eb6419a ProfileManager::DoFinalInitForServices() #11 0x55c01eb63fd3 ProfileManager::DoFinalInit() #12 0x55c01eb65d73 ProfileManager::AddProfile() #13 0x55c01eb576d2 ProfileManager::CreateAndInitializeProfile() #14 0x55c01eb57227 ProfileManager::GetProfile() #15 0x55c0222cb5f8 GetStartupProfile() #16 0x55c01e6db67f (anonymous namespace)::CreatePrimaryProfile() #17 0x55c01e6d9366 ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #18 0x55c01e6d85cc ChromeBrowserMainParts::PreMainMessageLoopRun() #19 0...

chromium : How KeyedService was created

DependencyManager::CreateContextServices void DependencyManager::CreateContextServices(base::SupportsUserData* context, bool is_testing_context) { MarkContextLive(context); std::vector<DependencyNode*> construction_order; if (!dependency_graph_.GetConstructionOrder(&construction_order)) { NOTREACHED(); } #ifndef NDEBUG DumpContextDependencies(context); #endif for (auto* dependency_node : construction_order) { KeyedServiceBaseFactory* factory = static_cast<KeyedServiceBaseFactory*>(dependency_node); if (is_testing_context && factory->ServiceIsNULLWhileTesting() && !factory->HasTestingFactory(context)) { factory->SetEmptyTestingFactory(context); } else if (factory->ServiceIsCreatedWithContext()) { factory->CreateServiceNow(context); } } }   #14 0x7f08ec0395de DependencyManager::CreateContextServices() #15 0...

chromium : extensions UI(chrome://extensions) create back trace

#2 0x561c61ba4b95 (anonymous namespace)::GetWebUIFactoryFunction() #3 0x561c61ba35b2 ChromeWebUIControllerFactory::GetWebUIType() #4 0x561c61ba5962 ChromeWebUIControllerFactory::UseWebUIForURL() #5 0x7fe6df4aa299 content::WebUIControllerFactoryRegistry::UseWebUIForURL() #6 0x7fe6df4aa3f5 content::WebUIControllerFactoryRegistry::IsURLAcceptableForWebUI() #7 0x7fe6df4b2147 content::WebUIImpl::OnWebUISend() #8 0x7fe6df4b59ef _ZN3IPC20DispatchToMethodImplIN7content9WebUIImplEMS2_FvPNS1_15RenderFrameHostERK4GURLRKNSt3__112basic_stringIcNS8_11char_traitsIcEENS8_9allocatorIcEEEERKN4base9ListValueEES3_NS8_5tupleIJS5_SE_SI_EEEJLm0ELm1ELm2EEEEvPT_T0_PT1_OT2_NS8_16integer_sequenceImJXspT3_EEEE #9 0x7fe6df4b58d0 _ZN3IPC16DispatchToMethodIN7content9WebUIImplENS1_15RenderFrameHostEJRK4GURLRKNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEERKN4base9ListValueEENS7_5tupleIJS4_SD_SH_EEEEENS7_9enable_ifIXeqsZT1_sr3std10tuple_sizeINS7_5decayIT2_E4typeEEE5valueEvE4typeEPT_MST_FvPT0_DpT1_ESW...

chromium : extensions RendererStartupHelper InitializeProcess back trace

#2 0x561c5ce30032 extensions::RendererStartupHelper::InitializeProcess() #3 0x561c5ce2f331 extensions::RendererStartupHelper::Observe() #4 0x7fe6def2a33f content::NotificationServiceImpl::Notify() #5 0x7fe6df12ebac content::RenderProcessHostImpl::OnProcessLaunched() #6 0x7fe6de83aebc content::ChildProcessLauncher::Notify() #7 0x7fe6de83da40 content::internal::ChildProcessLauncherHelper::PostLaunchOnClientThread() #8 0x7fe6de83e529 _ZN4base8internal13FunctorTraitsIMN7content8internal26ChildProcessLauncherHelperEFvNS4_7ProcessEiEvE6InvokeI13scoped_refptrIS4_EJS5_iEEEvS7_OT_DpOT0_ #9 0x7fe6de83e43a _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIMN7content8internal26ChildProcessLauncherHelperEFvNS6_7ProcessEiEJ13scoped_refptrIS6_ES7_iEEEvOT_DpOT0_ #10 0x7fe6de83e3a3 _ZN4base8internal7InvokerINS0_9BindStateIMN7content8internal26ChildProcessLauncherHelperEFvNS5_7ProcessEiEJ13scoped_refptrIS5_ENS0_13PassedWrapperIS6_EEiEEEFvvEE7RunImplIS8_NSt3__15tupleIJSA_SC_iEEEJLm0ELm1ELm2EEEEvOT_OT0_NSH_...

chromium : extensions::Extension construction back trace in Browser process

#2 0x55aaedfdafa6 extensions::Extension::Create() #3 0x55aaedfdaf22 extensions::Extension::Create() #4 0x55aaeec372eb extensions::ComponentLoader::CreateExtension() #5 0x55aaeec34321 extensions::ComponentLoader::Load() #6 0x55aaeec34100 extensions::ComponentLoader::LoadAll() #7 0x55aaeecc028c ExtensionService::Init() #8 0x55aaeecffa72 extensions::ExtensionSystemImpl::Shared::Init() #9 0x55aaeed00452 extensions::ExtensionSystemImpl::InitForRegularProfile() #10 0x55aaec95317a ProfileManager::DoFinalInitForServices() #11 0x55aaec952fb3 ProfileManager::DoFinalInit() #12 0x55aaec954d53 ProfileManager::AddProfile() #13 0x55aaec9466b2 ProfileManager::CreateAndInitializeProfile() #14 0x55aaec946207 ProfileManager::GetProfile() #15 0x55aaf00ba618 GetStartupProfile() #16 0x55aaec4ca65f (anonymous namespace)::CreatePrimaryProfile() #17 0x55aaec4c8346 ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #18 0x55aaec4c75ac ChromeBrowserMainParts::PreMainMessageLoopRun() #19 0x7f1d0223d1e4 content::B...

chromium : extensions::Extension construction back trace in Render process

extensions/renderer/dispatcher.cc extensions::Dispatcher receive ExtensionMsg_Loaded from extensions/browser/renderer_startup_helper.cc RendererStartupHelper::InitializeProcess // Loaded extensions. std::vector<ExtensionMsg_Loaded_Params> loaded_extensions; BrowserContext* renderer_context = process->GetBrowserContext(); const ExtensionSet& extensions = ExtensionRegistry::Get(browser_context_)->enabled_extensions(); for (const auto& ext : extensions) { // OnLoadedExtension should have already been called for the extension. DCHECK(base::ContainsKey(extension_process_map_, ext->id())); DCHECK(!base::ContainsKey(extension_process_map_[ext->id()], process)); if (!IsExtensionVisibleToContext(*ext, renderer_context)) continue; // TODO(kalman): Only include tab specific permissions for extension // processes, no other process needs it, so it's mildly wasteful. // I am not sure this is possible to know this...

How to generate crash backtrace just from your serial crash log, without coredump file.

If your crash log have dump maps, user stacks, and you have symbols too, You can try to get a backtrace via below python scripts. [2-11624.8825] PC, LR MEMINFO [2-11624.8825] -------------------------------------------------------------------------------------- [2-11624.8825] PC:46cbfc92, LR:46cbfc59 [2-11624.8825] -------------------------------------------------------------------------------------- [2-11624.8825] PC meminfo (0x46cc005d to 0x46cc0092) [2-11624.8825] 0040:                                                                                [2-11624.8825] 0060: be07e9cd 801cf8d0 f04fb08...

How to fetch chromium codes on windows with proxy.

Image
If you can access googlesource without proxy, please refer to: https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md#Install

How to fix gn Unexpected token error

Today I encountered a strange error when I try to compile latest android-chromium. $gn gen --args='target_os="android"' out/Default ERROR at //.gn:30:16: Unexpected token '{' default_args = {                ^

How to define new IPC Messages in Chromium project

I encountered some strange errors when I added my own IPC messages in xxx_messages.h like: IPC_ENUM_TRAITS(xxx) IPC_MESSAGE_CONTROL1(xxxx, std::string)

How zygote and render process was created in Chromium

How zygote process was created