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

Unified Diff: ppapi/proxy/ppb_graphics_3d_proxy.cc

Issue 10387182: Browser Plugin: PpapiCommandBufferProxy should see a lost context if the embedder has deleted the P… (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 8 years, 7 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
Index: ppapi/proxy/ppb_graphics_3d_proxy.cc
diff --git a/ppapi/proxy/ppb_graphics_3d_proxy.cc b/ppapi/proxy/ppb_graphics_3d_proxy.cc
index 75f7d83a920b8f36c5e01b90c0f47b9195c3a4ab..aa1d299d1ddd5fa7d54a9b9674c95d9322e9956c 100644
--- a/ppapi/proxy/ppb_graphics_3d_proxy.cc
+++ b/ppapi/proxy/ppb_graphics_3d_proxy.cc
@@ -248,8 +248,10 @@ void PPB_Graphics3D_Proxy::OnMsgSetGetBuffer(
void PPB_Graphics3D_Proxy::OnMsgGetState(const HostResource& context,
gpu::CommandBuffer::State* state) {
EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
- if (enter.failed())
+ if (enter.failed()) {
+ state->error = gpu::error::kLostContext;
piman 2012/05/18 02:42:46 Mmh, this is a little bogus, because we're not fil
Fady Samuel 2012/05/18 19:27:48 Done.
return;
+ }
PP_Graphics3DTrustedState pp_state = enter.object()->GetState();
*state = GPUStateFromPPState(pp_state);
}
@@ -259,8 +261,10 @@ void PPB_Graphics3D_Proxy::OnMsgFlush(const HostResource& context,
int32 last_known_get,
gpu::CommandBuffer::State* state) {
EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
- if (enter.failed())
+ if (enter.failed()) {
+ state->error = gpu::error::kLostContext;
return;
+ }
PP_Graphics3DTrustedState pp_state = enter.object()->FlushSyncFast(
put_offset, last_known_get);
*state = GPUStateFromPPState(pp_state);
« ppapi/proxy/ppapi_command_buffer_proxy.cc ('K') | « ppapi/proxy/ppapi_command_buffer_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698