Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(680)

Unified Diff: content/browser/renderer_host/accelerated_plugin_view_mac.mm

Issue 8261004: Prevent recursive calls to globalFrameDidChange. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/accelerated_plugin_view_mac.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/accelerated_plugin_view_mac.mm
===================================================================
--- content/browser/renderer_host/accelerated_plugin_view_mac.mm (revision 105227)
+++ content/browser/renderer_host/accelerated_plugin_view_mac.mm (working copy)
@@ -72,6 +72,7 @@
swapInterval = 1;
[glContext_ setValues:&swapInterval forParameter:NSOpenGLCPSwapInterval];
+ handlingGlobalFrameDidChange_ = NO;
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(globalFrameDidChange:)
@@ -151,6 +152,12 @@
}
- (void)globalFrameDidChange:(NSNotification*)notification {
+ // Short-circuit recursive calls.
+ if (handlingGlobalFrameDidChange_)
+ return;
+
+ handlingGlobalFrameDidChange_ = YES;
+
// This call to -update can call -globalFrameDidChange: again, see
// http://crbug.com/55754 comments 22 and 24.
[glContext_ update];
@@ -160,6 +167,8 @@
NSSize size = [self frame].size;
glViewport(0, 0, size.width, size.height);
CGLSetCurrentContext(0);
+
+ handlingGlobalFrameDidChange_ = NO;
}
- (void)prepareForGLRendering {
« no previous file with comments | « content/browser/renderer_host/accelerated_plugin_view_mac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698