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

Unified Diff: content/renderer/browser_plugin/browser_plugin.cc

Issue 15952012: remove remaining calls to old style MakeWeak (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/browser_plugin/browser_plugin.cc
diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
index a7c0c7125d0aee08180bada2dbf98229c91be878..758de690c51d1332986af11328ea58eab833495c 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -997,14 +997,13 @@ void BrowserPlugin::PersistRequestObject(
std::make_pair(id, new_item));
CHECK(result.second); // Inserted in the map.
AliveV8PermissionRequestItem* request_item = result.first->second;
- weak_request.MakeWeak(isolate, request_item, WeakCallbackForPersistObject);
+ weak_request.MakeWeak(
+ isolate, static_cast<void*>(request_item), WeakCallbackForPersistObject);
}
// static
void BrowserPlugin::WeakCallbackForPersistObject(
- v8::Isolate* isolate, v8::Persistent<v8::Value> object, void* param) {
- v8::Persistent<v8::Object> persistent_object =
- v8::Persistent<v8::Object>::Cast(object);
+ v8::Isolate* isolate, v8::Persistent<v8::Value>* object, void* param) {
AliveV8PermissionRequestItem* item_ptr =
static_cast<AliveV8PermissionRequestItem*>(param);
@@ -1012,8 +1011,7 @@ void BrowserPlugin::WeakCallbackForPersistObject(
base::WeakPtr<BrowserPlugin> plugin = item_ptr->second;
delete item_ptr;
- persistent_object.Dispose(isolate);
- persistent_object.Clear();
+ object->Dispose();
if (plugin) {
// Asynchronously remove item from |alive_v8_permission_request_objects_|.
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698