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

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: Updated per piman@'s suggestions 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..2a708a36dbd49d4bdf0a694722c8d040c09e99a5 100644
--- a/ppapi/proxy/ppb_graphics_3d_proxy.cc
+++ b/ppapi/proxy/ppb_graphics_3d_proxy.cc
@@ -246,24 +246,32 @@ void PPB_Graphics3D_Proxy::OnMsgSetGetBuffer(
}
void PPB_Graphics3D_Proxy::OnMsgGetState(const HostResource& context,
- gpu::CommandBuffer::State* state) {
+ gpu::CommandBuffer::State* state,
+ bool* success) {
EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
- if (enter.failed())
+ if (enter.failed()) {
+ *success = false;
return;
+ }
PP_Graphics3DTrustedState pp_state = enter.object()->GetState();
*state = GPUStateFromPPState(pp_state);
+ *success = true;
}
void PPB_Graphics3D_Proxy::OnMsgFlush(const HostResource& context,
int32 put_offset,
int32 last_known_get,
- gpu::CommandBuffer::State* state) {
+ gpu::CommandBuffer::State* state,
+ bool* success) {
EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
- if (enter.failed())
+ if (enter.failed()) {
+ *success = false;
return;
+ }
PP_Graphics3DTrustedState pp_state = enter.object()->FlushSyncFast(
put_offset, last_known_get);
*state = GPUStateFromPPState(pp_state);
+ *success = true;
}
void PPB_Graphics3D_Proxy::OnMsgAsyncFlush(const HostResource& context,
« 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