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

Side by Side Diff: content/renderer/pepper/plugin_object.cc

Issue 1834223009: Revert of Ensure we don't leak ObjectProxy objects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/renderer/pepper/plugin_object.h" 5 #include "content/renderer/pepper/plugin_object.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 try_catch.ThrowException(kInvalidValueException); 175 try_catch.ThrowException(kInvalidValueException);
176 result.clear(); 176 result.clear();
177 return result; 177 return result;
178 } 178 }
179 } 179 }
180 180
181 return result; 181 return result;
182 } 182 }
183 183
184 void PluginObject::InstanceDeleted() { 184 void PluginObject::InstanceDeleted() {
185 ppp_class_->Deallocate(ppp_class_data_);
186 instance_ = NULL; 185 instance_ = NULL;
187 } 186 }
188 187
189 PluginObject::PluginObject(PepperPluginInstanceImpl* instance, 188 PluginObject::PluginObject(PepperPluginInstanceImpl* instance,
190 const PPP_Class_Deprecated* ppp_class, 189 const PPP_Class_Deprecated* ppp_class,
191 void* ppp_class_data) 190 void* ppp_class_data)
192 : gin::NamedPropertyInterceptor(instance->GetIsolate(), this), 191 : gin::NamedPropertyInterceptor(instance->GetIsolate(), this),
193 instance_(instance), 192 instance_(instance),
194 ppp_class_(ppp_class), 193 ppp_class_(ppp_class),
195 ppp_class_data_(ppp_class_data), 194 ppp_class_data_(ppp_class_data),
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 return function_template; 297 return function_template;
299 function_template = 298 function_template =
300 gin::CreateFunctionTemplate( 299 gin::CreateFunctionTemplate(
301 isolate, base::Bind(&PluginObject::Call, weak_factory_.GetWeakPtr(), 300 isolate, base::Bind(&PluginObject::Call, weak_factory_.GetWeakPtr(),
302 name)); 301 name));
303 template_cache_.Set(name, function_template); 302 template_cache_.Set(name, function_template);
304 return function_template; 303 return function_template;
305 } 304 }
306 305
307 } // namespace content 306 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698