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

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

Issue 1814093003: LayoutTests: migrate nested-plugin-objects to ppapi (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@update_linux_plugins_expectations
Patch Set: rebase Created 4 years, 9 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
« no previous file with comments | « content/renderer/pepper/plugin_object.cc ('k') | ppapi/tests/blink_deprecated_test_plugin.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/plugin_var_tracker.h" 5 #include "ppapi/proxy/plugin_var_tracker.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 DCHECK(iter->second.ref_count == 0); 400 DCHECK(iter->second.ref_count == 0);
401 SendReleaseObjectMsg(*object); 401 SendReleaseObjectMsg(*object);
402 402
403 UserDataToPluginImplementedVarMap::iterator found = 403 UserDataToPluginImplementedVarMap::iterator found =
404 user_data_to_plugin_.find(object->user_data()); 404 user_data_to_plugin_.find(object->user_data());
405 if (found != user_data_to_plugin_.end()) { 405 if (found != user_data_to_plugin_.end()) {
406 // This object is implemented in the plugin. 406 // This object is implemented in the plugin.
407 if (found->second.instance == 0) { 407 if (found->second.instance == 0) {
408 // Instance is destroyed. This means that we'll never get a Deallocate 408 // Instance is destroyed. This means that we'll never get a Deallocate
409 // call from the renderer and we should do so now. 409 // call from the renderer and we should do so now.
410 found->second.ppp_class->Deallocate(found->first); 410 CallWhileUnlocked(found->second.ppp_class->Deallocate, found->first);
411 user_data_to_plugin_.erase(found); 411 user_data_to_plugin_.erase(found);
412 } else { 412 } else {
413 // The plugin is releasing its last reference to an object it implements. 413 // The plugin is releasing its last reference to an object it implements.
414 // Clear the tracking data that links our "plugin implemented object" to 414 // Clear the tracking data that links our "plugin implemented object" to
415 // the var. If the instance is destroyed and there is no ID, we know that 415 // the var. If the instance is destroyed and there is no ID, we know that
416 // we should just call Deallocate on the object data. 416 // we should just call Deallocate on the object data.
417 // 417 //
418 // See the plugin_object_id declaration for more info. 418 // See the plugin_object_id declaration for more info.
419 found->second.plugin_object_id = 0; 419 found->second.plugin_object_id = 0;
420 } 420 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 int id, 507 int id,
508 PP_Instance instance, 508 PP_Instance instance,
509 base::SharedMemoryHandle* handle, 509 base::SharedMemoryHandle* handle,
510 uint32_t* size_in_bytes) { 510 uint32_t* size_in_bytes) {
511 NOTREACHED(); 511 NOTREACHED();
512 return false; 512 return false;
513 } 513 }
514 514
515 } // namesace proxy 515 } // namesace proxy
516 } // namespace ppapi 516 } // namespace ppapi
OLDNEW
« no previous file with comments | « content/renderer/pepper/plugin_object.cc ('k') | ppapi/tests/blink_deprecated_test_plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698