New issue
Advanced search Search tips

Issue 784443 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Nov 2017
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 746953



Sign in to add a comment

SendMessage methods collide with Windows SendMessage macro

Project Member Reported by brat...@opera.com, Nov 13 2017

Issue description

In Windows SendMessage is a macro, mapping SendMessage to either SendMessageA or SendMessageW. That means that if you have Windows headers in your environment, local SendMessage definitions might be renamed SendMessageA or SendMessageW.

To avoid that magic renaming some code has removed the macro with undef but in
jumbo build that will cause problems with other Windows headers missing the SendMessage macro.

The best suggestion I have right now is to not use the name SendMessage in Chromium code.

The same problem exists with PostMessage (-> PostMessageA, PostMessageW).

 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3e074d719a0c63cb514dfa6afe7eb4447924b4ea

commit 3e074d719a0c63cb514dfa6afe7eb4447924b4ea
Author: Daniel Bratell <bratell@opera.com>
Date: Tue Nov 14 11:32:47 2017

Avoid using the name SendMessage because of Windows

In Windows SendMessage is a macro that maps to either
SendMessageA (Ascii) or SendMessageW (Unicode) so if you have
a local function SendMessage it can be magically renamed.

The code tried to avoid SendMessage problems by removing the
macro, but in jumbo builds that made other headers in Windows
fail because that code tried to use SendMessage.

Instead the method is renamed SendIpcMessage for lack of
better imagination.

Bug:  784443 
Change-Id: I75651542f0dae2a4df0f0dec1ca253de8c1def9b
Reviewed-on: https://chromium-review.googlesource.com/766374
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#516269}
[modify] https://crrev.com/3e074d719a0c63cb514dfa6afe7eb4447924b4ea/content/browser/service_worker/embedded_worker_instance.cc
[modify] https://crrev.com/3e074d719a0c63cb514dfa6afe7eb4447924b4ea/content/browser/service_worker/embedded_worker_instance.h
[modify] https://crrev.com/3e074d719a0c63cb514dfa6afe7eb4447924b4ea/content/browser/service_worker/service_worker_version.cc

Status: Fixed (was: Untriaged)

Sign in to add a comment