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

Side by Side Diff: ppapi/proxy/ppb_instance_proxy.cc

Issue 383143003: Pepper: Make sure 'out' params are initialized for all code paths. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ppapi/proxy/ppb_instance_proxy.h" 5 #include "ppapi/proxy/ppb_instance_proxy.h"
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "ppapi/c/pp_errors.h" 9 #include "ppapi/c/pp_errors.h"
10 #include "ppapi/c/pp_time.h" 10 #include "ppapi/c/pp_time.h"
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 490
491 void PPB_Instance_Proxy::ZoomLimitsChanged(PP_Instance instance, 491 void PPB_Instance_Proxy::ZoomLimitsChanged(PP_Instance instance,
492 double minimum_factor, 492 double minimum_factor,
493 double maximium_factor) { 493 double maximium_factor) {
494 // Not proxied yet. 494 // Not proxied yet.
495 NOTIMPLEMENTED(); 495 NOTIMPLEMENTED();
496 } 496 }
497 497
498 PP_Var PPB_Instance_Proxy::GetDocumentURL(PP_Instance instance, 498 PP_Var PPB_Instance_Proxy::GetDocumentURL(PP_Instance instance,
499 PP_URLComponents_Dev* components) { 499 PP_URLComponents_Dev* components) {
500 // Clear |components| so we don't send unitialized memory to the plugin.
501 // https://crbug.com/391023.
502 memset(components, 0, sizeof(*components));
dmichael (off chromium) 2014/07/11 15:22:26 ditto
bbudge 2014/07/11 17:01:55 Backed out my change here. |components| may be NUL
500 ReceiveSerializedVarReturnValue result; 503 ReceiveSerializedVarReturnValue result;
501 PP_URLComponents_Dev url_components = {{0}}; 504 PP_URLComponents_Dev url_components = {{0}};
502 dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetDocumentURL( 505 dispatcher()->Send(new PpapiHostMsg_PPBInstance_GetDocumentURL(
503 API_ID_PPB_INSTANCE, instance, &url_components, &result)); 506 API_ID_PPB_INSTANCE, instance, &url_components, &result));
504 if (components) 507 if (components)
505 *components = url_components; 508 *components = url_components;
506 return result.Return(dispatcher()); 509 return result.Return(dispatcher());
507 } 510 }
508 511
509 #if !defined(OS_NACL) 512 #if !defined(OS_NACL)
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
1436 PP_Instance instance) { 1439 PP_Instance instance) {
1437 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> 1440 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())->
1438 GetInstanceData(instance); 1441 GetInstanceData(instance);
1439 if (!data) 1442 if (!data)
1440 return; // Instance was probably deleted. 1443 return; // Instance was probably deleted.
1441 data->should_do_request_surrounding_text = false; 1444 data->should_do_request_surrounding_text = false;
1442 } 1445 }
1443 1446
1444 } // namespace proxy 1447 } // namespace proxy
1445 } // namespace ppapi 1448 } // namespace ppapi
OLDNEW
« ppapi/proxy/ppb_image_data_proxy.cc ('K') | « ppapi/proxy/ppb_image_data_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698