@QA: This CL is a no-op.
Caused by incorrectly covering base::Thread when using regex
"base::(Time|Thread)(Ticks|Delta)?\b"
This script removed base/time/time.h if:
1) "base::Thread" is present
2) There is no (Time|ThreadTicks|Days|Hours|Minutes|Seconds|
Milliseconds|Microseconds|Nanoseconds|Hertz)
string in the file (no base:: prefix required to skip removal)
Bug: 1026641
Change-Id: I9df5e8beccc74054bf9bfff12320a1d4e0295b62
AX-Relnotes: n/a.
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3563202
Commit-Queue: Gabriel Charette <gab@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#988045}
This CL is a no-op.
Only fixing instances where base::Time (and Ticks/Delta) is used in
a statement (i.e. not as a parameter to avoid adding includes in mere
overrides). Skipping pointer and reference qualified instances.
i.e. matches this regex:
'(\n *[^/\n][^/\n][^/\n]*base::(Time|Thread)(Ticks|Delta)?\b[^*&][^)]*;)'
and skipping files that have any existing fwd-decl for any of the
variants.
This is a prereq to remove unused base/task/post_task.h includes in
https://chromium-review.googlesource.com/c/chromium/src/+/3555247
Bug: 1026641
Change-Id: I87b43a8dc92bdceb67f4bd59b327b54813aa72a6
AX-Relnotes: n/a.
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3557354
Commit-Queue: Gabriel Charette <gab@chromium.org>
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Owners-Override: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#987283}
Removes `#include "base/macros.h"` from remaining .cc, .h and .mm files
that do not contain `ignore_result(` and do not trigger pre-commit or
pre-upload errors.
Bug: 1010217
No-Try: true
Change-Id: I4cc5207b3deafa7901764d2e633bbb1ad43cfb73
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3276692
Commit-Queue: Peter Boström <pbos@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#941054}
This replaces DISALLOW_COPY_AND_ASSIGN with explicit constructor deletes
where a local script is able to detect its insertion place (~Foo() is
public => insert before this line).
This is incomplete as not all classes have a public ~Foo() declared, so
not all DISALLOW_COPY_AND_ASSIGN occurrences are replaced.
IWYU cleanup is left as a separate pass that is easier when these macros
go away.
Bug: 1010217
Change-Id: Iab44b67c7ca86cf5cfb1f6b27de5c18769d36632
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3177680
Auto-Submit: Peter Boström <pbos@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#924479}
As part of Flash API removal, remove instances of
PreCacheFontForFlash. Generally, cache priming for GDI fonts
on Windows still seems to be needed for printing and PDF processes
but the flash reference can be deleted.
Bug: 1139287
Change-Id: Iebaac7c48b5fddbb81219b0fcc08b091597dee2f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2478990
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#818851}
The vast majority of this CL is about changing code that used
base::TaskRunner and invoked RunsTasksInCurrentSequence() on it.
For the most part this CL is a logical no-op and a semantical
improvement as almost all APIs who loosely took a TaskRunner in fact
required a SequencedTaskRunner (e.g. were accessing unsynchronized
state) but it "worked" because their callers already happened to provide
task runners that were Sequenced/SingleThreadTaskRunners.
Some impls even used single-threaded APIs such as MessageLoopCurrent or
declaring methods invoked from that TaskRunner as "must run on the UI
thread". Those were changed to use SingleThreadTaskRunner (again, all
callers already were providing one but the API was too loose).
In a few cases where a parallel TaskRunner was actually intended, some
DCHECK(task_runner->RunsTasksInCurrentSequence()) were simply removed as
they were mere impl details, already obvious by the context. There was a
single case where it made sense to assert "doesn't run on a core thread"
in wallpaper_resizer.cc; that was migrated to
base::AssertLongCPUWorkAllowed().
Implementations of base::TaskRunner were either promoted to
Sequenced/SingleThreadTaskRunner when that's what it was actually used
as or the RunsTasksInCurrentSequence() override was removed.
The few actual logic changes:
- ash/.../wallpaper_resizer.cc : base::AssertLongCPUWorkAllowed()
- base/android/.../task_runner_android.h : TODO to make the same change
on the Java side, for now things seem happy when always returning
false from parallel TaskRunnerImpl.
Removed dead code:
- base::debug::ActivityTracker::SetBackgroundTaskRunner()
- AfterStartupTaskUtils::Runner
- net/url_request/test_url_request_interceptor.(h|cc)
Includes were mostly kept as-is (fwd-decls as fwd-decls and
includes-as-includes) except where it was outright wrong or necessary to
make callers happy (remember that foo.h is required in order to have
scoped_refptr<Foo> be fully defined -- and hence required by IWYU if you
have such a member and arguably if taking/returning one by value as part
of your core API).
Pointer semantics are also intentionally unchanged unless 100% incorrect
and easy to update in place (e.g. in some cases raw pointers are used to
return refcounted objects; that should probably be fixed, but not in this
CL).
Bug: 1026641
Change-Id: I1b33744d3a30a05fdb091d3f976270cd59917873
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1957211
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Miguel Casas <mcasas@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: Brian White <bcwhite@chromium.org>
Reviewed-by: Brad Nelson <bradnelson@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
Reviewed-by: Maksim Orlovich <morlovich@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org>
Reviewed-by: Ken Rockot <rockot@google.com>
Reviewed-by: Sorin Jianu <sorin@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Victor Costan <pwnall@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#725203}
This CL removes code that shares base::SharedMemoryHandle with remote.
This code is no longer used because base::SharedMemoryHandle is
deprecated and replaced with base::*SharedMemoryRegion.
Bug: 795291
Change-Id: I5974bd77b6e40bee662dc2fb4092b7a61f725afb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1916827
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Auto-Submit: Alex Ilin <alexilin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715867}
These tests were previously migrated from single-threaded MessageLoop to
a multi-threaded TaskEnvironment (then named ScopedTaskEnvironment) as
part of crbug.com/891670.
//base OWNERS decided in retrospect that it was better to keep a
single-threaded option for TaskEnvironment and introduced
SingleThreadTaskEnvironment. This CL retrofits that decision for
/ppapi.
This CL is a no-op if it passes CQ.
This CL was uploaded by git cl split.
R=raymes@chromium.org
Bug: 891670
Change-Id: If34abed08d559545ffa762cc495eb511e43eb435
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1786944
Auto-Submit: Gabriel Charette <gab@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#693534}
This is a reland of 18947083c7
The move_source_file.py script's formatting rules incorrectly
formatted services/device/generic_sensor/platform_sensor_and_provider_unittest_win.cc
after all. But we also can't rely 100% on git cl format (crbug.com/997063)
so I ended up performing a git cl format && git add -up
(+interactive addition of missing blank line after foo.h when included
from top of foo.cc)
Also added
$ tools/git/move_source_file.py net/test/test_with_scoped_task_environment.h net/test/test_with_task_environment.h
Original change's description:
> [TaskEnvironment] Complete migration with header rename
>
> This is merely:
>
> $ tools/git/move_source_file.py base/test/scoped_task_environment.h base/test/task_environment.h
> $ tools/git/move_source_file.py base/test/scoped_task_environment.cc base/test/task_environment.cc
> $ tools/git/move_source_file.py base/test/scoped_task_environment_unittest.cc base/test/task_environment_unittest.cc
> $ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle.h content/public/test/browser_task_environment.h
> $ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle.cc content/public/test/browser_task_environment.cc
> $ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle_unittest.cc content/public/test/browser_task_environment_unittest.cc
> $ tools/git/move_source_file.py ios/web/public/test/test_web_thread_bundle.h ios/web/public/test/web_task_environment.h
> $ tools/git/move_source_file.py ios/web/test/test_web_thread_bundle.cc ios/web/test/web_task_environment.cc
>
> and a few manual renames in DEPS files missed by the script
>
> This CL uses --bypass-hooks to avoid having to git cl format because
> many headers are being reordered by git cl format and it's too many to
> figure out in a no-op CL which ones are okay with it.
> windows.h for one should typically be first and another one of the
> reorderings in PS3 even caused a compile failure:
> https://chromium-review.googlesource.com/c/chromium/src/+/1764962/3/components/services/font/font_loader_unittest.cc
>
> TBR=dcheng@chromium.org
>
> Bug: 992483
> Change-Id: I32a4afd43ef779393c95d9873c157be2d3da1dd1
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1764962
> Reviewed-by: Gabriel Charette <gab@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Commit-Queue: Gabriel Charette <gab@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#689778}
TBR=dcheng@chromium.org
Bug: 992483
Change-Id: I6179dd1329a4d30bf5c65450ea893537f31e6f85
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1767658
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689794}
This reverts commit 18947083c7.
Reason for revert: broke Win
Original change's description:
> [TaskEnvironment] Complete migration with header rename
>
> This is merely:
>
> $ tools/git/move_source_file.py base/test/scoped_task_environment.h base/test/task_environment.h
> $ tools/git/move_source_file.py base/test/scoped_task_environment.cc base/test/task_environment.cc
> $ tools/git/move_source_file.py base/test/scoped_task_environment_unittest.cc base/test/task_environment_unittest.cc
> $ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle.h content/public/test/browser_task_environment.h
> $ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle.cc content/public/test/browser_task_environment.cc
> $ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle_unittest.cc content/public/test/browser_task_environment_unittest.cc
> $ tools/git/move_source_file.py ios/web/public/test/test_web_thread_bundle.h ios/web/public/test/web_task_environment.h
> $ tools/git/move_source_file.py ios/web/test/test_web_thread_bundle.cc ios/web/test/web_task_environment.cc
>
> and a few manual renames in DEPS files missed by the script
>
> This CL uses --bypass-hooks to avoid having to git cl format because
> many headers are being reordered by git cl format and it's too many to
> figure out in a no-op CL which ones are okay with it.
> windows.h for one should typically be first and another one of the
> reorderings in PS3 even caused a compile failure:
> https://chromium-review.googlesource.com/c/chromium/src/+/1764962/3/components/services/font/font_loader_unittest.cc
>
> TBR=dcheng@chromium.org
>
> Bug: 992483
> Change-Id: I32a4afd43ef779393c95d9873c157be2d3da1dd1
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1764962
> Reviewed-by: Gabriel Charette <gab@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Commit-Queue: Gabriel Charette <gab@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#689778}
TBR=dcheng@chromium.org,gab@chromium.org
Change-Id: I9aa8ff558d1ff78cebe0c25e559c017578ad4f53
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 992483
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1767657
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689780}
This is merely:
$ tools/git/move_source_file.py base/test/scoped_task_environment.h base/test/task_environment.h
$ tools/git/move_source_file.py base/test/scoped_task_environment.cc base/test/task_environment.cc
$ tools/git/move_source_file.py base/test/scoped_task_environment_unittest.cc base/test/task_environment_unittest.cc
$ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle.h content/public/test/browser_task_environment.h
$ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle.cc content/public/test/browser_task_environment.cc
$ tools/git/move_source_file.py content/public/test/test_browser_thread_bundle_unittest.cc content/public/test/browser_task_environment_unittest.cc
$ tools/git/move_source_file.py ios/web/public/test/test_web_thread_bundle.h ios/web/public/test/web_task_environment.h
$ tools/git/move_source_file.py ios/web/test/test_web_thread_bundle.cc ios/web/test/web_task_environment.cc
and a few manual renames in DEPS files missed by the script
This CL uses --bypass-hooks to avoid having to git cl format because
many headers are being reordered by git cl format and it's too many to
figure out in a no-op CL which ones are okay with it.
windows.h for one should typically be first and another one of the
reorderings in PS3 even caused a compile failure:
https://chromium-review.googlesource.com/c/chromium/src/+/1764962/3/components/services/font/font_loader_unittest.ccTBR=dcheng@chromium.org
Bug: 992483
Change-Id: I32a4afd43ef779393c95d9873c157be2d3da1dd1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1764962
Reviewed-by: Gabriel Charette <gab@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689778}
MessageLoop will go away, eventually.
ScopedTaskEnvironment will per default start a ThreadPool, which should
be fine in most of the cases. If you belive your test needs to make sure
that no ThreadPool runs let me know and I will update the patch.
BUG=891670
This CL was uploaded by git cl split.
R=piman@chromium.org
Change-Id: Ida93c455e32bf058063b6bf48800b289c972823b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1649326
Auto-Submit: Carlos Caballero <carlscab@google.com>
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#667191}
As a final step, replace all includes back:
- mv message_loop_current.h message_loop.h
- s/message_loop_forward.h/message_loop.h/ in all includes.
- s/message_loop_forward.h/message_loop.h/ in base/BUILD.gn
- Remove message_loop_forward.h from third_party/DEPS.
TBR=gab@chromium.orgR=gab@chromium.org
BUG=891670
Change-Id: I623077025701459ddb7045cbcfdad138aa90a9e4
Reviewed-on: https://chromium-review.googlesource.com/c/1313110
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604690}
To facilitate splitting MessageLoop into MessageLoop and MessageLoopImpl
introduce message_loop_forward.h and use it everywhere.
- s/message_loop.h/message_loop_forward.h/ in all includes.
- Add message_loop_forward.h to base/BUILD.gn.
- Add message_loop_forward.h to third_party/DEPS.
TBR=gab@chromium.org
BUG=891670
Change-Id: Ibac3a24f5bd4291c9d57dd32c627477e4e6ef324
Reviewed-on: https://chromium-review.googlesource.com/c/1313108
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Gabriel Charette <gab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604672}
This CL adds two new methods, ShareUnsafeSharedMemoryRegionWithRemote() and
ShareReadOnlySharedMemoryRegionWithRemote() to
ppapi::proxy::ProxyChannel::Delegate and to content::RendererPpapiHost classes
and all implementation classes.
These new methods are similar to the SharedSharedMemoryHandleWithRemote()
method in those classes but are supposed to work with the new shared memory
API.
Bug: 845985
Change-Id: I8ccd92a1c81dca9495c85119e9a4e40fd6b69abf
Reviewed-on: https://chromium-review.googlesource.com/1078847
Commit-Queue: Alexandr Ilin <alexilin@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563571}
This is a pre-req to removing the dependency from RunLoop->MessageLoop
as many files only include run_loop.h but instantiate a MessageLoop.
The following fix script was applied to each file in the codebase
(plus a few hand fixes for DEPS and for //base):
def Fix(file_path):
content = refactor_lib.ReadFile(file_path)
# Assume fwd-decls are correct in first pass.
if 'class MessageLoop;' in content:
return False
if 'class MessageLoopForUI;' in content:
return False
if 'class MessageLoopForIO;' in content:
return False
# Using base:: prefix ensures we don't match fwd-decls and other things.
# Will require a few fixups for missing includes in //base proper.
# Complex prefix in regex attempts to skip comments.
matches = re.compile(r'(\n *[^/\n][^/\n][^/\n]*base::MessageLoop(ForUI|ForIO)?\b[^*])', re.DOTALL).findall(content)
if not matches:
return False
# Ignore unique pointers in headers in first pass...
if os.path.splitext(file_path)[1] == '.h':
found = False
for match in matches:
if not 'std::unique_ptr<base::MessageLoop' in match[0]:
found = True
break
if not found:
return False
updated_content = refactor_lib.AddInclude(file_path, content, "base/message_loop/message_loop.h")
if updated_content == content:
return False
# Write updated file
refactor_lib.WriteFile(file_path, updated_content)
return True
TBR=gab@chromium.org
BUG=703346
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Review-Url: https://codereview.chromium.org/2876013002
Cr-Commit-Position: refs/heads/master@{#471412}
This fixes the 'overloaded-virtual' Clang warning on Windows (currently
disabled; will be enabled in a follow-up CL).
- PpapiThread::PreCacheFont: Renamed to PreCacheFontForFlash to avoid
conflict with PreCacheFont method in base class ChildThreadImpl. (This
method is only called by another method called PreCacheFontForFlash so
the new name is appropriate.)
- PrintingContextSytemDialogWin::InitializeSettings: Renamed to
InitializeSettingsWithRanges to avoid conflict with InitializeSettings
in base class PrintingContextWin. (These two methods are called on
different code paths and the former is not meant to override the
latter, so they should have different names.)
- Removed PrintingContextWin::ShowPrintDialog. This method was totally
unused and its name was conflicting with a method in a subclass.
BUG=505301
Review URL: https://codereview.chromium.org/1216013005
Cr-Commit-Position: refs/heads/master@{#337735}
This CL is a refactor. This CL contains no intended behavior changes.
Pepper code assumes that SharedMemoryHandle is backed by a PlatformFile, and
that the relevant HANDLE or fd can be cast to an int. These assumptions will no
longer be true once SharedMemory is backed by Mach primitives on Mac.
This CL adds the method ShareSharedMemoryHandleWithRemote() to
ProxyChannel::Delegate. This method is used in place of ShareHandleWithRemote()
when a SharedMemory object is being shared between processes. This CL updates
the type of all SharedMemory handles to be SharedMemoryHandle.
BUG=466437
Review URL: https://codereview.chromium.org/1154613006
Cr-Commit-Position: refs/heads/master@{#332325}
[Sending this chunk by itself since it's slightly less rote than the others]
The Google style guide states that only one of {virtual,override,final} should be used for each declaration, since override implies virtual and final implies both virtual and override.
This patch was manually generated using a regex and a text editor.
BUG=417463
Review URL: https://codereview.chromium.org/1100733003
Cr-Commit-Position: refs/heads/master@{#326504}
Introduce ResourceMessageFilter and UDPSocketFilter to receive messages on the IO thread. This allows us to queue messages up when there's no callback, and dispatch them directly to the appropriate thread when there is a callback pending. (This depends on TrackedCallback being Run()-able without the ProxyLock; see https://codereview.chromium.org/923263003/)
BUG=439588
Review URL: https://codereview.chromium.org/869883003
Cr-Commit-Position: refs/heads/master@{#323517}
Reason for revert:
reverted due to 431529
Original issue's description:
> PPAPI: Make GetProxiedInterface not re-enter the plugin
>
> It's important that we never re-enter the plugin when it is blocked on
> synchronous calls to the renderer (unless they are scripting messages, which
> have to be re-entrant). This especially breaks assumptions in OpenGL usage.
>
> This required making the plugin side of the PPB_VideoDecoder_Dev proxy check
> for the interface prior to sending its synchronous Create message. I audited
> all the other uses of GetProxiedInterface from the renderer, and none of the
> others happen as a result of a sync plugin->renderer message.
>
> I also renamed the existing "SupportsInterface" message to "IsInterfaceSupported" to make the intent more obvious, and because I liked the SupportsInterface name better for the new usage: Telling the renderer that an interface is supported.
>
> BUG=418651
>
> Committed: https://crrev.com/a17de8faa97ca33d1e58e08392dbdc3e316d6cbe
> Cr-Commit-Position: refs/heads/master@{#303247}
TBR=teravest@chromium.org,tsepez@chromium.org,piman@chromium.org,dmichael@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=418651
Review URL: https://codereview.chromium.org/714483002
Cr-Commit-Position: refs/heads/master@{#303388}
It's important that we never re-enter the plugin when it is blocked on
synchronous calls to the renderer (unless they are scripting messages, which
have to be re-entrant). This especially breaks assumptions in OpenGL usage.
This required making the plugin side of the PPB_VideoDecoder_Dev proxy check
for the interface prior to sending its synchronous Create message. I audited
all the other uses of GetProxiedInterface from the renderer, and none of the
others happen as a result of a sync plugin->renderer message.
I also renamed the existing "SupportsInterface" message to "IsInterfaceSupported" to make the intent more obvious, and because I liked the SupportsInterface name better for the new usage: Telling the renderer that an interface is supported.
BUG=418651
Review URL: https://codereview.chromium.org/704913002
Cr-Commit-Position: refs/heads/master@{#303247}
Blocking renderer->plugin messages can be interrupted by any message
from the plugin->renderer (even async ones). So while handline a blocking
message, such as HandleInputEvent or HandleBlockingMessage, it's currently
possible to re-enter JavaScript. This patch makes that impossible by
queueing up Plugin->Renderer messages sent via PPB_Messaging::PostMessage
while any renderer->plugin sync message is on the stack.
BUG=384528
Committed: https://crrev.com/f73075c99b5ba30e8d62dc5f13fdfb210d0fc506
Cr-Commit-Position: refs/heads/master@{#296311}
Committed: https://crrev.com/3fe4ceee750b2cd130bd402de3d371d8518c3eba
Cr-Commit-Position: refs/heads/master@{#296807}
Review URL: https://codereview.chromium.org/589213003
Cr-Commit-Position: refs/heads/master@{#297308}
Reason for revert:
Still causing a crash in Canary
Original issue's description:
> PPAPI: Never re-enter JavaScript for PostMessage.
>
> Blocking renderer->plugin messages can be interrupted by any message
> from the plugin->renderer (even async ones). So while handline a blocking
> message, such as HandleInputEvent or HandleBlockingMessage, it's currently
> possible to re-enter JavaScript. This patch makes that impossible by
> queueing up Plugin->Renderer messages sent via PPB_Messaging::PostMessage
> while any renderer->plugin sync message is on the stack.
>
> BUG=384528
>
> Committed: https://crrev.com/f73075c99b5ba30e8d62dc5f13fdfb210d0fc506
> Cr-Commit-Position: refs/heads/master@{#296311}
>
> Committed: https://crrev.com/3fe4ceee750b2cd130bd402de3d371d8518c3eba
> Cr-Commit-Position: refs/heads/master@{#296807}
TBR=raymes@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=384528
Review URL: https://codereview.chromium.org/605393002
Cr-Commit-Position: refs/heads/master@{#297030}
Blocking renderer->plugin messages can be interrupted by any message
from the plugin->renderer (even async ones). So while handline a blocking
message, such as HandleInputEvent or HandleBlockingMessage, it's currently
possible to re-enter JavaScript. This patch makes that impossible by
queueing up Plugin->Renderer messages sent via PPB_Messaging::PostMessage
while any renderer->plugin sync message is on the stack.
BUG=384528
Committed: https://crrev.com/f73075c99b5ba30e8d62dc5f13fdfb210d0fc506
Cr-Commit-Position: refs/heads/master@{#296311}
Review URL: https://codereview.chromium.org/589213003
Cr-Commit-Position: refs/heads/master@{#296807}
Reason for revert:
May be crashing Chrome:
https://code.google.com/p/chromium/issues/detail?id=417511
Original issue's description:
> PPAPI: Never re-enter JavaScript for PostMessage.
>
> Blocking renderer->plugin messages can be interrupted by any message
> from the plugin->renderer (even async ones). So while handline a blocking
> message, such as HandleInputEvent or HandleBlockingMessage, it's currently
> possible to re-enter JavaScript. This patch makes that impossible by
> queueing up Plugin->Renderer messages sent via PPB_Messaging::PostMessage
> while any renderer->plugin sync message is on the stack.
>
> BUG=384528
>
> Committed: https://crrev.com/f73075c99b5ba30e8d62dc5f13fdfb210d0fc506
> Cr-Commit-Position: refs/heads/master@{#296311}
TBR=raymes@chromium.org,dmichael@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=384528
Review URL: https://codereview.chromium.org/601923003
Cr-Commit-Position: refs/heads/master@{#296571}
Blocking renderer->plugin messages can be interrupted by any message
from the plugin->renderer (even async ones). So while handline a blocking
message, such as HandleInputEvent or HandleBlockingMessage, it's currently
possible to re-enter JavaScript. This patch makes that impossible by
queueing up Plugin->Renderer messages sent via PPB_Messaging::PostMessage
while any renderer->plugin sync message is on the stack.
BUG=384528
Review URL: https://codereview.chromium.org/589213003
Cr-Commit-Position: refs/heads/master@{#296311}
Needed to break dependency of ppapi_proxy on webkit code.
resource_creation_proxy now creates BrowserFontResource_Trusted
by going through PluginGlobals -> PluginProxyDelegate implemented
in content by PpapiThread.
R=jam@chromium.org, yzshen@chromium.org
BUG=237249
Review URL: https://codereview.chromium.org/20214004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213684 0039d316-1c4b-4281-b951-d872f2087c98
Some PPB interfaces have methods that set a custom callback. Usually, the callback has to be called on the same thread as the one it was set on. ThreadAwareCallback keeps track of the target thread, and posts a task to run on it if requested from a different thread.
BUG=None
TEST=newly added unittests.
Review URL: https://chromiumcodereview.appspot.com/11859015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177319 0039d316-1c4b-4281-b951-d872f2087c98
When the browser process launches the plugin, it explicitly tells each side the PID of the other side, and we now use this PID for sharing handles. Previously we'd use the PID from the IPC channel.
Using the PID from the IPC channel creates a race condition because the PID isn't set until the "hello" message from the opposite side is processed, which isn't guaranteed at any particular time.
BUG=168222
Review URL: https://codereview.chromium.org/11722017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175190 0039d316-1c4b-4281-b951-d872f2087c98
- unlock the pepper proxy lock when sending sync messages to the browser;
- remove the SendToBrowser() method from the PluginProxyDelegate;
TEST=None
BUG=161286
Review URL: https://chromiumcodereview.appspot.com/11299147
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169781 0039d316-1c4b-4281-b951-d872f2087c98
The following fixes are contained in this patch:
-Construction/destruction of ppapi globals has been moved to the thread
on which those globals are used (to prevent thread-safety CHECKs firing).
-Some tests for the state of the var tracker in the plugin have been moved
onto the plugin thread (to prevent thread-safety CHECKs firing).
-Fixed a crash in ppp_instance_private_proxy_unittest.cc which was due
to not passing a |PPP_Class_Deprecated| to |PPB_Var_Deprecated->CreateObject|
which is required when deleting a var on the plugin side.
-Set up a |PluginProxyDelegate| in |PluginGlobals| so that a channel to the
browser can be correctly obtained for unittests.
BUG=none
TEST=Ran ppapi_unittests
Review URL: https://chromiumcodereview.appspot.com/10913258
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157469 0039d316-1c4b-4281-b951-d872f2087c98
Note that the new file name is file_chooser_resource in the proxy. I decided to drop the ppb_ prefix for the "new-style" files to help differentiate them, and also because it's technically wrong. PPB is an interface, and a resource "object" may support multiple interfaces. I think FooResource is easier to type and read.
Review URL: https://chromiumcodereview.appspot.com/10544089
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146737 0039d316-1c4b-4281-b951-d872f2087c98
This is just like the NPAPI plugin process and many of the other child
processes we have. I wire the command line parameter up to a new Flash setting.
TEST=manual
BUG=none
Review URL: https://chromiumcodereview.appspot.com/10541088
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141434 0039d316-1c4b-4281-b951-d872f2087c98
The browser will show an infobar allowing you to terminate the plugin.
BUG=122795
Review URL: https://chromiumcodereview.appspot.com/10014013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132245 0039d316-1c4b-4281-b951-d872f2087c98