Chromium Code Reviews
DescriptionMerge 22383 - Don't call NPP_SetWindow during the painting of windowless plugins.
On Windows, Flash seems to only start executing script actions after it received an NPP_SetWindow with a
nonNULL NPWindow.window (HDC). It is possible that Flash then invokes JS to modify DOM of the page.
If Flash movie's widget is onscreen at page load, this call is made during layout and before even the NPP_Write is called,
which is the desired sequence of events.
However, if it is offscreen, this call occurs during painting, which leads to reentrancy issues (layout while painting)
and bizarre crashes.
As a solution, we remove calls to NPP_SetWindow during painting and instead opt to never provide a null HDC to the plugin.
If no valid HDC is available, we feed it a disposable monochrome 1x1 context to have at least something to draw on.
R=ananta,darin,jam
BUG=16114
TEST=LayoutTests/plugins/flashsetwindowpaintcrash.html (bug reduction).
Review URL: http://codereview.chromium.org/159717
TBR=dglazkov@chromium.org
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=23260
Patch Set 1 #
Messages
Total messages: 1 (0 generated)
|
|||||||||||||||||||||||||||||||||||||