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

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

Issue 12398007: Replaced deprecated v8 API calls by their non-deprecated counterparts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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') | net/proxy/proxy_resolver_v8.h » ('j') | 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 573ff76bb1de82c478ea0952b5e622681b2d0175..9308f64803609c564f696350a503369a93277968 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -855,8 +855,10 @@ void BrowserPlugin::PersistRequestObject(
return;
}
+ v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::Persistent<v8::Value> weak_request =
- v8::Persistent<v8::Value>::New(WebKit::WebBindings::toV8Value(request));
+ v8::Persistent<v8::Value>::New(isolate,
+ WebKit::WebBindings::toV8Value(request));
AliveV8PermissionRequestItem* new_item =
new std::pair<int, base::WeakPtr<BrowserPlugin> >(
@@ -867,12 +869,12 @@ 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(request_item, WeakCallbackForPersistObject);
+ weak_request.MakeWeak(isolate, request_item, WeakCallbackForPersistObject);
}
// static
void BrowserPlugin::WeakCallbackForPersistObject(
- v8::Persistent<v8::Value> object, void* param) {
+ v8::Isolate* isolate, v8::Persistent<v8::Value> object, void* param) {
v8::Persistent<v8::Object> persistent_object =
v8::Persistent<v8::Object>::Cast(object);
@@ -882,7 +884,7 @@ void BrowserPlugin::WeakCallbackForPersistObject(
base::WeakPtr<BrowserPlugin> plugin = item_ptr->second;
delete item_ptr;
- persistent_object.Dispose();
+ persistent_object.Dispose(isolate);
persistent_object.Clear();
if (plugin) {
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.h ('k') | net/proxy/proxy_resolver_v8.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698